From 1aa07e583dd2fd7af108d26bc2deb5f902ee7204 Mon Sep 17 00:00:00 2001 From: kavikhalique Date: Wed, 20 Nov 2024 17:13:43 +0530 Subject: [PATCH 1/2] increases touch area Signed-off-by: kavikhalique Signed-off-by: Kavi Khalique --- .../app/organicmaps/bookmarks/Holders.java | 6 ++ .../res/layout/item_bookmark_category.xml | 66 ++++++++++++------- 2 files changed, 49 insertions(+), 23 deletions(-) diff --git a/android/app/src/main/java/app/organicmaps/bookmarks/Holders.java b/android/app/src/main/java/app/organicmaps/bookmarks/Holders.java index a5c0495189..912abe904e 100644 --- a/android/app/src/main/java/app/organicmaps/bookmarks/Holders.java +++ b/android/app/src/main/java/app/organicmaps/bookmarks/Holders.java @@ -273,6 +273,8 @@ public class Holders CheckBox mVisibilityMarker; @NonNull ImageView mMoreButton; + private final View mVisibilityContainer; + private final View mMoreContainer; CategoryViewHolder(@NonNull View root) { @@ -280,6 +282,8 @@ public class Holders mName = root.findViewById(R.id.name); mVisibilityMarker = root.findViewById(R.id.checkbox); mMoreButton = root.findViewById(R.id.more); + mVisibilityContainer = root.findViewById(R.id.visibility_container); + mMoreContainer = root.findViewById(R.id.more_container); } void setVisibilityState(boolean visible) @@ -290,11 +294,13 @@ public class Holders void setVisibilityListener(@Nullable View.OnClickListener listener) { mVisibilityMarker.setOnClickListener(listener); + mVisibilityContainer.setOnClickListener(listener); } void setMoreButtonClickListener(@Nullable View.OnClickListener listener) { mMoreButton.setOnClickListener(listener); + mMoreContainer.setOnClickListener(listener); } void setName(@NonNull String name) diff --git a/android/app/src/main/res/layout/item_bookmark_category.xml b/android/app/src/main/res/layout/item_bookmark_category.xml index ee8d743e65..546246bd78 100644 --- a/android/app/src/main/res/layout/item_bookmark_category.xml +++ b/android/app/src/main/res/layout/item_bookmark_category.xml @@ -6,22 +6,33 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_clickable_card"> - + + + + + - + + + + + -- 2.45.3 From dafa698cd4bce40c56c64ec7428aebc6b08292b5 Mon Sep 17 00:00:00 2001 From: kavikhalique Date: Wed, 20 Nov 2024 22:57:14 +0530 Subject: [PATCH 2/2] expansion of buttons Signed-off-by: kavikhalique --- .../app/organicmaps/bookmarks/Holders.java | 6 -- .../res/layout/item_bookmark_category.xml | 70 +++++++------------ 2 files changed, 27 insertions(+), 49 deletions(-) diff --git a/android/app/src/main/java/app/organicmaps/bookmarks/Holders.java b/android/app/src/main/java/app/organicmaps/bookmarks/Holders.java index 912abe904e..a5c0495189 100644 --- a/android/app/src/main/java/app/organicmaps/bookmarks/Holders.java +++ b/android/app/src/main/java/app/organicmaps/bookmarks/Holders.java @@ -273,8 +273,6 @@ public class Holders CheckBox mVisibilityMarker; @NonNull ImageView mMoreButton; - private final View mVisibilityContainer; - private final View mMoreContainer; CategoryViewHolder(@NonNull View root) { @@ -282,8 +280,6 @@ public class Holders mName = root.findViewById(R.id.name); mVisibilityMarker = root.findViewById(R.id.checkbox); mMoreButton = root.findViewById(R.id.more); - mVisibilityContainer = root.findViewById(R.id.visibility_container); - mMoreContainer = root.findViewById(R.id.more_container); } void setVisibilityState(boolean visible) @@ -294,13 +290,11 @@ public class Holders void setVisibilityListener(@Nullable View.OnClickListener listener) { mVisibilityMarker.setOnClickListener(listener); - mVisibilityContainer.setOnClickListener(listener); } void setMoreButtonClickListener(@Nullable View.OnClickListener listener) { mMoreButton.setOnClickListener(listener); - mMoreContainer.setOnClickListener(listener); } void setName(@NonNull String name) diff --git a/android/app/src/main/res/layout/item_bookmark_category.xml b/android/app/src/main/res/layout/item_bookmark_category.xml index 546246bd78..24bffb5f1d 100644 --- a/android/app/src/main/res/layout/item_bookmark_category.xml +++ b/android/app/src/main/res/layout/item_bookmark_category.xml @@ -6,33 +6,24 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_clickable_card"> - - - - - + - - - - - + -- 2.45.3