From 654a2332e29b52cc118943f46d7a002495e4f3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gonz=C3=A1lez?= Date: Wed, 4 Feb 2026 16:08:29 +0100 Subject: [PATCH 1/9] ANDROID-17173 Not relevant. Add a number input type to ease number change. --- catalog/src/main/res/layout/screen_fragment_sheet_catalog.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/catalog/src/main/res/layout/screen_fragment_sheet_catalog.xml b/catalog/src/main/res/layout/screen_fragment_sheet_catalog.xml index c43b3c5e6..1719057be 100644 --- a/catalog/src/main/res/layout/screen_fragment_sheet_catalog.xml +++ b/catalog/src/main/res/layout/screen_fragment_sheet_catalog.xml @@ -65,6 +65,7 @@ android:visibility="gone" app:inputHint="Number of elements" app:inputText="4" + app:inputType="number" tools:visibility="visible" /> Date: Wed, 4 Feb 2026 16:09:21 +0100 Subject: [PATCH 2/9] ANDROID-17173 Handler must be invisible for A11Y --- library/src/main/res/layout/sheet_layout.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/src/main/res/layout/sheet_layout.xml b/library/src/main/res/layout/sheet_layout.xml index eb07ee2fc..429c458d2 100644 --- a/library/src/main/res/layout/sheet_layout.xml +++ b/library/src/main/res/layout/sheet_layout.xml @@ -10,13 +10,10 @@ > From 21c8e9f86d3c4b9d61f64302612bcdfa3dade175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gonz=C3=A1lez?= Date: Wed, 4 Feb 2026 16:15:48 +0100 Subject: [PATCH 3/9] ANDROID-17173 Remove redundant NestedScrollView --- library/src/main/res/layout/sheet_layout.xml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/library/src/main/res/layout/sheet_layout.xml b/library/src/main/res/layout/sheet_layout.xml index 429c458d2..a19ee21f9 100644 --- a/library/src/main/res/layout/sheet_layout.xml +++ b/library/src/main/res/layout/sheet_layout.xml @@ -76,20 +76,15 @@ android:textAppearance="@style/AppTheme.TextAppearance.Preset2" android:textColor="?colorTextSecondary" /> - - - - + /> From 8ddf47ab89ee00ec16c4eca8a4d76ff17fee1ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gonz=C3=A1lez?= Date: Wed, 4 Feb 2026 16:16:10 +0100 Subject: [PATCH 4/9] ANDROID-17173 Format and remove unused id --- library/src/main/res/layout/sheet_layout.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/src/main/res/layout/sheet_layout.xml b/library/src/main/res/layout/sheet_layout.xml index a19ee21f9..c08932d2a 100644 --- a/library/src/main/res/layout/sheet_layout.xml +++ b/library/src/main/res/layout/sheet_layout.xml @@ -39,9 +39,10 @@ + android:layout_height="match_parent" + > + + app:layout_constraintTop_toBottomOf="@+id/title" + > Date: Wed, 4 Feb 2026 16:18:20 +0100 Subject: [PATCH 5/9] ANDROID-17173 Remove Space. Wrap TextView and new close action button. --- .../com/telefonica/mistica/sheet/Sheet.kt | 15 +------ library/src/main/res/layout/sheet_layout.xml | 45 ++++++++++++------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/library/src/main/java/com/telefonica/mistica/sheet/Sheet.kt b/library/src/main/java/com/telefonica/mistica/sheet/Sheet.kt index 13fa7e748..d0bada26c 100644 --- a/library/src/main/java/com/telefonica/mistica/sheet/Sheet.kt +++ b/library/src/main/java/com/telefonica/mistica/sheet/Sheet.kt @@ -7,7 +7,6 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.LinearLayout -import android.widget.Space import android.widget.TextView import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.core.view.ViewCompat @@ -89,20 +88,18 @@ open class SheetView( root: View, sheetModel: SheetModel, ) { - val handler = root.findViewById(R.id.handler) + val closeButton = root.findViewById(R.id.close_button) val title = root.findViewById(R.id.title) val subtitle = root.findViewById(R.id.subtitle) val description = root.findViewById(R.id.description) - val titleSpace = root.findViewById(R.id.title_space) val titleText = sheetModel.header.title val subtitleText = sheetModel.header.subtitle val descriptionText = sheetModel.header.description - handler.setOnClickListener { cancel() } + closeButton.setOnClickListener { cancel() } title.setTextOrHide(titleText) ViewCompat.setAccessibilityHeading(title, true) - titleSpace.setSpaceOrGone(titleText) subtitle.setTextOrHide(subtitleText) description.setTextOrHide(descriptionText) } @@ -295,11 +292,3 @@ private fun TextView.setTextOrHide(text: String?) { this.text = text } } - -private fun Space.setSpaceOrGone(text: String?) { - if (text.isNullOrEmpty()) { - this.visibility = View.VISIBLE - } else { - this.visibility = View.GONE - } -} \ No newline at end of file diff --git a/library/src/main/res/layout/sheet_layout.xml b/library/src/main/res/layout/sheet_layout.xml index c08932d2a..07bfb2e32 100644 --- a/library/src/main/res/layout/sheet_layout.xml +++ b/library/src/main/res/layout/sheet_layout.xml @@ -18,24 +18,39 @@ app:srcCompat="@drawable/sheet_handler" /> - + > - + + + + + Date: Wed, 4 Feb 2026 16:40:15 +0100 Subject: [PATCH 6/9] ANDROID-17173 Minor. Revert id deletion, avoiding breaking change warning --- library/src/main/res/layout/sheet_layout.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/src/main/res/layout/sheet_layout.xml b/library/src/main/res/layout/sheet_layout.xml index 07bfb2e32..dde5104cd 100644 --- a/library/src/main/res/layout/sheet_layout.xml +++ b/library/src/main/res/layout/sheet_layout.xml @@ -10,6 +10,7 @@ > Date: Mon, 9 Feb 2026 11:45:14 +0100 Subject: [PATCH 7/9] ANDROID-17173 Ripple effect --- library/src/main/res/layout/sheet_layout.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/res/layout/sheet_layout.xml b/library/src/main/res/layout/sheet_layout.xml index dde5104cd..b083ce44f 100644 --- a/library/src/main/res/layout/sheet_layout.xml +++ b/library/src/main/res/layout/sheet_layout.xml @@ -44,7 +44,7 @@ android:layout_width="48dp" android:layout_height="48dp" android:layout_marginEnd="8dp" - android:background="@android:color/transparent" + android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/close_button_content_description" android:src="@drawable/icn_cross" app:layout_constraintEnd_toEndOf="parent" From 5e97d56cd922e50dac5c5acd7044116691efd1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gonz=C3=A1lez?= Date: Mon, 9 Feb 2026 13:47:12 +0100 Subject: [PATCH 8/9] ANDROID-17173 Set close button, first view to be focused --- library/src/main/res/layout/sheet_layout.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/library/src/main/res/layout/sheet_layout.xml b/library/src/main/res/layout/sheet_layout.xml index b083ce44f..b46027d2e 100644 --- a/library/src/main/res/layout/sheet_layout.xml +++ b/library/src/main/res/layout/sheet_layout.xml @@ -34,6 +34,7 @@ tools:ignore="RtlSymmetry" tools:text="Title" android:textAppearance="@style/AppTheme.TextAppearance.Preset5" + android:accessibilityTraversalAfter="@id/close_button" app:layout_constraintEnd_toStartOf="@+id/close_button" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" From 534973d129e7c2f7f87382db1f713e5053a991a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gonz=C3=A1lez?= Date: Mon, 9 Feb 2026 15:28:36 +0100 Subject: [PATCH 9/9] ANDROID-17173 Custom ripple for close button --- .../main/res/drawable/ripple_close_button.xml | 18 ++++++++++++++++++ library/src/main/res/layout/sheet_layout.xml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 library/src/main/res/drawable/ripple_close_button.xml diff --git a/library/src/main/res/drawable/ripple_close_button.xml b/library/src/main/res/drawable/ripple_close_button.xml new file mode 100644 index 000000000..2b7b34e1e --- /dev/null +++ b/library/src/main/res/drawable/ripple_close_button.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/library/src/main/res/layout/sheet_layout.xml b/library/src/main/res/layout/sheet_layout.xml index b46027d2e..d116482be 100644 --- a/library/src/main/res/layout/sheet_layout.xml +++ b/library/src/main/res/layout/sheet_layout.xml @@ -45,7 +45,7 @@ android:layout_width="48dp" android:layout_height="48dp" android:layout_marginEnd="8dp" - android:background="?attr/selectableItemBackgroundBorderless" + android:background="@drawable/ripple_close_button" android:contentDescription="@string/close_button_content_description" android:src="@drawable/icn_cross" app:layout_constraintEnd_toEndOf="parent"