From a8dfebb0862a4ebccf2f1b72724fd8219c2d2777 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 22 Sep 2020 23:59:40 +0200 Subject: tv: select first item after toggling deletion mode Signed-off-by: Jason A. Donenfeld --- ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt') diff --git a/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt b/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt index 1528ac95..ad86f12d 100644 --- a/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt +++ b/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt @@ -120,6 +120,9 @@ class TvMainActivity : AppCompatActivity() { } binding.deleteButton.setOnClickListener { isDeleting.set(!isDeleting.get()) + runOnUiThread { + binding.tunnelList.requestFocus() + } } binding.executePendingBindings() setContentView(binding.root) -- cgit v1.2.3