diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2018-06-28 20:05:33 +0530 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-30 21:07:24 +0200 |
commit | 0e3e3ae37b093c8de04be2a141e7b49d708f5336 (patch) | |
tree | 802e241068af8b81b3ca7ad230590312ebe3566f /app/src/main/java/com | |
parent | b41d473f645ffa9b4f349c7deec7e45693056a29 (diff) |
android: Add select all button to action mode
Thanks to Jason for suggesting the not-clinically-insane
method to go about this.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r-- | app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java index e244f756..72e2fbdb 100644 --- a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java +++ b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java @@ -305,6 +305,10 @@ public class TunnelListFragment extends BaseFragment { .whenComplete(TunnelListFragment.this::onTunnelDeletionFinished); mode.finish(); return true; + case R.id.menu_action_select_all: + for (int i = 0; i < tunnelList.getAdapter().getCount(); ++i) + tunnelList.setItemChecked(i, true); + return true; default: return false; } |