From: Damyan Ivanov Date: Sun, 3 Mar 2019 14:38:29 +0000 (+0200) Subject: wide touch area for the profile list head gear icon X-Git-Tag: v0.7~15 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=8f55113a112873aa98652eae5c7f56a357e24957 wide touch area for the profile list head gear icon --- 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 @@