diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/com/wireguard/android/activity/MainActivity.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/activity/MainActivity.java b/app/src/main/java/com/wireguard/android/activity/MainActivity.java index 2ed1da61..e60fa8cf 100644 --- a/app/src/main/java/com/wireguard/android/activity/MainActivity.java +++ b/app/src/main/java/com/wireguard/android/activity/MainActivity.java @@ -95,6 +95,15 @@ public class MainActivity extends BaseActivity { moveToState(initialState); } updateActionBar(); + final int actionBarId = getResources().getIdentifier("action_bar", "id", getPackageName()); + if (actionBarId != 0 && findViewById(actionBarId) != null) { + findViewById(actionBarId).setOnTouchListener((v, e) -> { + try { + ((TunnelListFragment) getSupportFragmentManager().getFragments().get(0)).collapseActionMenu(); + } catch (final ClassCastException ignored) { } + return false; + }); + } } @Override |