From 8f55113a112873aa98652eae5c7f56a357e24957 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 3 Mar 2019 16:38:29 +0200 Subject: [PATCH] wide touch area for the profile list head gear icon --- .../net/ktnx/mobileledger/ui/activity/MainActivity.java | 7 +++++-- app/src/main/res/layout/nav_profile_list_head.xml | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) 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 0e5f469d..08bdf927 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 @@ -72,6 +72,7 @@ public class MainActivity extends ProfileThemedActivity { DrawerLayout drawer; private LinearLayout profileListContainer; private View profileListHeadArrow, profileListHeadMore, profileListHeadCancel; + private LinearLayout profileListHeadMoreAndCancel; 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); + 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); @@ -265,8 +267,9 @@ public class MainActivity extends ProfileThemedActivity { 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 diff --git a/app/src/main/res/layout/nav_profile_list_head.xml b/app/src/main/res/layout/nav_profile_list_head.xml index 327fce07..76892beb 100644 --- a/app/src/main/res/layout/nav_profile_list_head.xml +++ b/app/src/main/res/layout/nav_profile_list_head.xml @@ -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" - android:paddingEnd="@dimen/activity_horizontal_margin"> + android:onClick="navProfilesHeadClicked"> @@ -37,9 +36,11 @@ -- 2.39.5