collapse profile list when drawer is closed
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 28 Feb 2019 07:09:21 +0000 (07:09 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 28 Feb 2019 07:09:21 +0000 (07:09 +0000)
app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java

index b132814..6d52dfc 100644 (file)
@@ -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();