From 8c7d18022f89899ee8f591c2440b22d349e43e48 Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Thu, 26 Nov 2020 14:38:21 +0900 Subject: [PATCH] [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 --- tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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) -- 2.7.4