From 4bd21d1274260bf0a97d599a659dc1c0350e70d3 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 28 Feb 2019 07:09:21 +0000 Subject: [PATCH] collapse profile list when drawer is closed --- .../net/ktnx/mobileledger/ui/activity/MainActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index b1328148..6d52dfc0 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -268,6 +268,14 @@ public class MainActivity extends CrashReportingActivity { profileListHeadMore.setOnClickListener((v) -> mProfileListAdapter.startEditingProfiles()); profileListHeadCancel.setOnClickListener((v) -> mProfileListAdapter.stopEditingProfiles()); + + drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() { + @Override + public void onDrawerClosed(View drawerView) { + super.onDrawerClosed(drawerView); + collapseProfileList(); + } + }); } private void profileThemeChanged() { setupProfileColors(); -- 2.39.5