瀏覽代碼

working on custom navigation on TV-3

Khubaib 9 月之前
父節點
當前提交
1ecfd7de94
共有 1 個文件被更改,包括 11 次插入13 次删除
  1. 11 13
      app/src/main/java/com/vpn/fastestvpnservice/screensTV/HomeScreenTV.kt

+ 11 - 13
app/src/main/java/com/vpn/fastestvpnservice/screensTV/HomeScreenTV.kt

@@ -704,19 +704,17 @@ fun BoxScope.AddRowSmartTV(
         ) {
             ClickableText(
                 modifier = Modifier
-//                    .onKeyEvent {
-//                        when (it.key) {
-//                            Key.DirectionLeft -> {
-//                                Log.d("test_settings_keys","DirectionDown")
-//                                Toast.makeText(
-//                                    context, "DirectionLeft", Toast.LENGTH_SHORT
-//                                ).show()
-////                                focusRequester2.requestFocus()
-//                                true
-//                            }
-//                            else -> { true }
-//                        }
-//                    }
+                    .onKeyEvent {
+                        when (it.key) {
+                            Key.DirectionLeft -> {
+                                Toast.makeText(
+                                    context, "DirectionLeft Change", Toast.LENGTH_SHORT
+                                ).show()
+                                true
+                            }
+                            else -> { false }
+                        }
+                    }
                     .focusRequester(focusRequester2)
                     .onFocusChanged {
                         isButtonFocused = it.isFocused