[NUI] Add forward and backward direction type (#3932)
authorJoogabYun <40262755+JoogabYun@users.noreply.github.com>
Tue, 22 Feb 2022 04:43:01 +0000 (13:43 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 23 Feb 2022 01:14:10 +0000 (10:14 +0900)
Now, You can get Forward type by pressing Tab key and Backward type by pressing Shift-Tab key.

public override View GetNextFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled)
{
 if (direction == View.FocusDirection.Forward)
 {
  // Tab
 }
 else if (direction == View.FocusDirection.Backward)
 {
  // Shift-Tab
 }
}

src/Tizen.NUI/src/public/BaseComponents/ViewEnum.cs

index bbc1e6e..eb15127 100755 (executable)
@@ -140,7 +140,17 @@ namespace Tizen.NUI.BaseComponents
             /// Move keyboard focus towards the next page direction.
             /// </summary>
             /// <since_tizen> 3 </since_tizen>
-            PageDown
+            PageDown,
+            /// <summary>
+            /// Move keyboard focus towards the forward direction.
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Forward,
+            /// <summary>
+            /// Move keyboard focus towards the backward direction.
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Backward,
         }
 
         internal enum PropertyRange