]> git.ktnx.net Git - mobile-ledger.git/commitdiff
hook profile list expansion/collapsing on tap at runtime
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 12 Apr 2019 14:05:21 +0000 (17:05 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 12 Apr 2019 14:05:21 +0000 (17:05 +0300)
seems to fail on older devices otherwise

app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java
app/src/main/res/layout/main_navigation.xml
app/src/main/res/layout/nav_profile_list_head.xml

index 79f39ff73da793187fccb018ff16c4f2e770a0e4..d3a14454b4f5a5b621a284ed2988834577da937c 100644 (file)
@@ -313,6 +313,8 @@ public class MainActivity extends ProfileThemedActivity {
             drawer.addDrawerListener(drawerListener);
         }
 
+        findViewById(R.id.nav_profile_list_head_layout).setOnClickListener(this::navProfilesHeadClicked);
+        findViewById(R.id.nav_profiles_label).setOnClickListener(this::navProfilesHeadClicked);
         setupProfile();
         onProfileChanged(null);
 
index 225dedd44ab6bee4d6dcf59fcb269969cd287f7a..9a1acc8b58d919379dacb62546bd99814c1285d3 100644 (file)
                         android:text="@string/nav_reports_title"
                         android:visibility="gone" />
 
-                    <include layout="@layout/nav_profile_list_head" />
+                    <include
+                        android:id="@+id/nav_profile_list_head_layout"
+                        layout="@layout/nav_profile_list_head" />
 
                     <LinearLayout
                         android:id="@+id/nav_profile_list_container"
index 49d0a3a7c7dbe86a7511b8d934f4c67618408fba..5bd0f4a0d32197e00451c4fb054a968d2d7bb7ec 100644 (file)
@@ -20,8 +20,7 @@
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
-    android:layout_height="@dimen/thumb_row_height"
-    android:onClick="navProfilesHeadClicked">
+    android:layout_height="@dimen/thumb_row_height">
 
     <ImageView
         android:id="@+id/nav_profiles_arrow"
@@ -76,7 +75,6 @@
         android:layout_height="0dp"
         android:drawableStart="@drawable/ic_view_list_black_24dp"
         android:gravity="start|center_vertical"
-        android:onClick="navProfilesHeadClicked"
         android:text="@string/profiles"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toStartOf="parent"