From: huiyu.eun Date: Thu, 26 Nov 2020 05:38:21 +0000 (+0900) Subject: [NUI][Non-ACR] Modify GetNextFocusableView of CustomView X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F248407%2F2;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI][Non-ACR] Modify GetNextFocusableView of CustomView - Change CustomView to MyCustomView - Override GetNextFocusableView - https://github.com/Samsung/TizenFX/pull/2100 With the above patch, the default return value of the GetnextFocusableView is changed to null. Change-Id: Id3651a28192b1df624a56ced412c917bd262184c Signed-off-by: huiyu.eun --- diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs index cae752e..a80e00b 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs @@ -574,7 +574,7 @@ namespace Tizen.NUI.Tests [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")] public void GetNextFocusableView_CHECK_RETURN_VALUE() { - CustomView customView = new CustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation); + MyCustomView customView = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation); FocusManager.Instance.SetCurrentFocusView(customView); View view = customView.GetNextFocusableView(customView, View.FocusDirection.Up, false); Assert.IsNotNull(view, "Should be not null"); @@ -1131,6 +1131,7 @@ namespace Tizen.NUI.Tests public class MyCustomView : CustomView { + private View _nextFocusView; public View view; public bool calculateRelayoutSizeFlag = false; public bool childAddFlag = false; @@ -1189,6 +1190,15 @@ namespace Tizen.NUI.Tests public MyCustomView(string typeName, CustomViewBehaviour behaviour) : base(typeName, behaviour) { + } + + public override View GetNextFocusableView(View currentFocusedView, FocusDirection direction, bool loopEnabled) + { + if (_nextFocusView == null) + { + _nextFocusView = new View(); + } + return _nextFocusView; } public override void OnCalculateRelayoutSize(DimensionType dimension)