[NUI][Non-ACR] Modify GetNextFocusableView of CustomView 07/248407/2
authorhuiyu.eun <huiyu.eun@samsung.com>
Thu, 26 Nov 2020 05:38:21 +0000 (14:38 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Thu, 26 Nov 2020 07:08:59 +0000 (16:08 +0900)
- 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 <huiyu.eun@samsung.com>
tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs

index cae752e..a80e00b 100755 (executable)
@@ -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)
         {
+        }\r
+\r
+        public override View GetNextFocusableView(View currentFocusedView, FocusDirection direction, bool loopEnabled)
+        {
+            if (_nextFocusView == null)\r
+            {\r
+                _nextFocusView = new View();\r
+            }
+            return _nextFocusView;
         }
 
         public override void OnCalculateRelayoutSize(DimensionType dimension)