]> git.ktnx.net Git - mobile-ledger.git/commitdiff
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 b13281489d460dfb1ba322e23425c731b1bfaa83..6d52dfc00f56144264875091b4c89c6e7af055f7 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();