]> git.ktnx.net Git - mobile-ledger.git/commitdiff
wide touch area for the profile list head gear icon
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 3 Mar 2019 14:38:29 +0000 (16:38 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 3 Mar 2019 14:38:29 +0000 (16:38 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java
app/src/main/res/layout/nav_profile_list_head.xml

index 0e5f469d6628a8a989a81aa4c80ca52c2c51dd40..08bdf927d4e921e9b9a55caa0980d61dc99aed9f 100644 (file)
@@ -72,6 +72,7 @@ public class MainActivity extends ProfileThemedActivity {
     DrawerLayout drawer;
     private LinearLayout profileListContainer;
     private View profileListHeadArrow, profileListHeadMore, profileListHeadCancel;
     DrawerLayout drawer;
     private LinearLayout profileListContainer;
     private View profileListHeadArrow, profileListHeadMore, profileListHeadCancel;
+    private LinearLayout profileListHeadMoreAndCancel;
     private FragmentManager fragmentManager;
     private TextView tvLastUpdate;
     private RetrieveTransactionsTask retrieveTransactionsTask;
     private FragmentManager fragmentManager;
     private TextView tvLastUpdate;
     private RetrieveTransactionsTask retrieveTransactionsTask;
@@ -119,6 +120,7 @@ public class MainActivity extends ProfileThemedActivity {
         profileListHeadArrow = findViewById(R.id.nav_profiles_arrow);
         profileListHeadMore = findViewById(R.id.nav_profiles_start_edit);
         profileListHeadCancel = findViewById(R.id.nav_profiles_cancel_edit);
         profileListHeadArrow = findViewById(R.id.nav_profiles_arrow);
         profileListHeadMore = findViewById(R.id.nav_profiles_start_edit);
         profileListHeadCancel = findViewById(R.id.nav_profiles_cancel_edit);
+        profileListHeadMoreAndCancel = findViewById(R.id.nav_profile_list_head_buttons);
         drawer = findViewById(R.id.drawer_layout);
         tvLastUpdate = findViewById(R.id.transactions_last_update);
         bTransactionListCancelDownload = findViewById(R.id.transaction_list_cancel_download);
         drawer = findViewById(R.id.drawer_layout);
         tvLastUpdate = findViewById(R.id.transactions_last_update);
         bTransactionListCancelDownload = findViewById(R.id.transaction_list_cancel_download);
@@ -265,8 +267,9 @@ public class MainActivity extends ProfileThemedActivity {
         llm.setOrientation(RecyclerView.VERTICAL);
         root.setLayoutManager(llm);
 
         llm.setOrientation(RecyclerView.VERTICAL);
         root.setLayoutManager(llm);
 
-        profileListHeadMore.setOnClickListener((v) -> mProfileListAdapter.startEditingProfiles());
-        profileListHeadCancel.setOnClickListener((v) -> mProfileListAdapter.stopEditingProfiles());
+        profileListHeadMore.setOnClickListener((v) -> mProfileListAdapter.flipEditingProfiles());
+        profileListHeadCancel.setOnClickListener((v) -> mProfileListAdapter.flipEditingProfiles());
+        profileListHeadMoreAndCancel.setOnClickListener((v) -> mProfileListAdapter.flipEditingProfiles());
 
         drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
             @Override
 
         drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
             @Override
index 327fce0762ed7752ea69d7d9a7072983035a4562..76892beb04d75e59c94d111c67bbf5721b898d52 100644 (file)
@@ -21,7 +21,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="@dimen/thumb_row_height"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="@dimen/thumb_row_height"
-    android:paddingEnd="@dimen/activity_horizontal_margin">
+    android:onClick="navProfilesHeadClicked">
 
     <ImageView
         android:id="@+id/nav_profiles_arrow"
 
     <ImageView
         android:id="@+id/nav_profiles_arrow"
@@ -29,7 +29,6 @@
         android:layout_height="wrap_content"
         android:background="@drawable/ic_expand_more_black_24dp"
         android:gravity="start|center_vertical"
         android:layout_height="wrap_content"
         android:background="@drawable/ic_expand_more_black_24dp"
         android:gravity="start|center_vertical"
-        android:onClick="navProfilesHeadClicked"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toEndOf="@id/nav_profiles_label"
         app:layout_constraintTop_toTopOf="parent" />
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toEndOf="@id/nav_profiles_label"
         app:layout_constraintTop_toTopOf="parent" />
     <LinearLayout
         android:id="@+id/nav_profile_list_head_buttons"
         android:layout_width="wrap_content"
     <LinearLayout
         android:id="@+id/nav_profile_list_head_buttons"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_height="0dp"
         android:gravity="center_vertical"
         android:orientation="horizontal"
         android:gravity="center_vertical"
         android:orientation="horizontal"
+        android:paddingStart="16dp"
+        android:paddingEnd="16dp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintTop_toTopOf="parent">
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintTop_toTopOf="parent">