From e9e4fd4e8b244748ca7052f0026fe4db43b46c8f Mon Sep 17 00:00:00 2001 From: Revath S Kumar Date: Sun, 19 May 2019 14:10:48 +0530 Subject: TunnelList: Get focus to toggle button via remote for Fire TV This removes a no-longer-needed workaround for the ListView OnItemClickListener (it won't fire if a focusable view is inside the item view). Since converting our ListView instances to RecyclerView instances, we set the OnClick and OnLongClick listeners directly on the item view, and this workaround no longer has any effect. Unsurprisingly, the workaround breaks focusability of the Switch, which is necessary to toggle tunnels on devices with keypad-based navigation, such as the Fire TV. This commit also adds explicit focusability hints for the Switch. Related mail thread: https://lists.zx2c4.com/pipermail/wireguard/2019-May/004112.html Reported-by: Christophe-Marie Duquesne Reported-by: Revath S Kumar [Samuel: sorted attributes; expanded commit message] Signed-off-by: Samuel Holland --- app/src/main/res/layout/tunnel_list_item.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/layout/tunnel_list_item.xml b/app/src/main/res/layout/tunnel_list_item.xml index cf25b83e..13e14fed 100644 --- a/app/src/main/res/layout/tunnel_list_item.xml +++ b/app/src/main/res/layout/tunnel_list_item.xml @@ -26,10 +26,13 @@ -- cgit v1.2.3-59-g8ed1b