From d7574a8d84e3e116e0bc883c0860208159514f4f Mon Sep 17 00:00:00 2001 From: Javier Manrique Pellejero Date: Wed, 4 Dec 2024 11:32:48 +0100 Subject: [PATCH] ANDROID-15374 divider implemented in informative sheet (#397) * ANDROID-15374 divider implemented in informative sheet * ANDROID-15374 unused imports removed --- library/src/main/java/com/telefonica/mistica/sheet/Sheet.kt | 1 + .../sheet/children/list/adapter/InformativeListAdapter.kt | 6 +----- library/src/main/res/layout/sheet_list_row_informative.xml | 2 +- 3 files changed, 3 insertions(+), 6 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 305e1aa52..13fa7e748 100644 --- a/library/src/main/java/com/telefonica/mistica/sheet/Sheet.kt +++ b/library/src/main/java/com/telefonica/mistica/sheet/Sheet.kt @@ -250,6 +250,7 @@ private fun ListInformative.toView(context: Context): View = RecyclerView(context).also { it.layoutManager = LinearLayoutManager(context) it.adapter = InformativeListAdapter(this.elements.mapToInformativeViewData()) + it.configureWithFullWidthLayout() } private fun BottomActions.toView(onSheetTapped: InternalOnSheetTapped, container: ViewGroup): View { diff --git a/library/src/main/java/com/telefonica/mistica/sheet/children/list/adapter/InformativeListAdapter.kt b/library/src/main/java/com/telefonica/mistica/sheet/children/list/adapter/InformativeListAdapter.kt index 6e9b231c4..42bc61cb6 100644 --- a/library/src/main/java/com/telefonica/mistica/sheet/children/list/adapter/InformativeListAdapter.kt +++ b/library/src/main/java/com/telefonica/mistica/sheet/children/list/adapter/InformativeListAdapter.kt @@ -54,11 +54,7 @@ internal class InformativeListAdapter(val items: List) : } } - if (position == items.size - 1) { - holder.bottomExtraSpace.visibility = View.VISIBLE - } else { - holder.bottomExtraSpace.visibility = View.GONE - } + holder.bottomExtraSpace.visibility = View.VISIBLE } override fun getItemCount(): Int = items.size diff --git a/library/src/main/res/layout/sheet_list_row_informative.xml b/library/src/main/res/layout/sheet_list_row_informative.xml index 2421205c5..ab5f4ef75 100644 --- a/library/src/main/res/layout/sheet_list_row_informative.xml +++ b/library/src/main/res/layout/sheet_list_row_informative.xml @@ -93,7 +93,7 @@