From 4c2abe6fce953876de250cad6f34e2f1edba6a45 Mon Sep 17 00:00:00 2001 From: Ali Ahmed <11981999+aliahmedbd@users.noreply.github.com> Date: Wed, 16 Aug 2023 11:13:22 +0100 Subject: [PATCH] showDivider renamed uniquely to showSelectRowDivider (#142) * divider added into the select row view * optimize the divider view * screenshot diff added * used resource properties * Screenshot diff added * attr name changed to showSelectRowDivider * release note added in the CHANGELOG.md --- CHANGELOG.md | 4 ++++ .../gov/hmrc/components/molecule/selectrow/SelectRowGroup.kt | 2 +- components/src/main/res/values/attrs.xml | 3 ++- sample/src/main/res/layout/fragment_select_row.xml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d0a969..c07e6d9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ Allowed headings: ## [Unreleased] +### Fixed + +* The attribute `showDivider` in `SelectRowView` has been renamed to `showSelectRowDivider`. + ### Changed * Changed `SelectRowView` to include a Divider with an added parameter `showDivider`, which is set to `false` by default. diff --git a/components/src/main/java/uk/gov/hmrc/components/molecule/selectrow/SelectRowGroup.kt b/components/src/main/java/uk/gov/hmrc/components/molecule/selectrow/SelectRowGroup.kt index 1d40152f..f2c0cc9c 100644 --- a/components/src/main/java/uk/gov/hmrc/components/molecule/selectrow/SelectRowGroup.kt +++ b/components/src/main/java/uk/gov/hmrc/components/molecule/selectrow/SelectRowGroup.kt @@ -77,7 +77,7 @@ class SelectRowGroup @JvmOverloads constructor( attrs?.let { val typedArray = context.theme.obtainStyledAttributes(it, R.styleable.SelectRowGroup, 0, 0) initialSelectedRow = typedArray.getResourceId(R.styleable.SelectRowGroup_selectedRow, -1) - showDivider = typedArray.getBoolean(R.styleable.SelectRowGroup_showDivider, false) + showDivider = typedArray.getBoolean(R.styleable.SelectRowGroup_showSelectRowDivider, false) typedArray.recycle() } diff --git a/components/src/main/res/values/attrs.xml b/components/src/main/res/values/attrs.xml index 96829f9e..73209436 100644 --- a/components/src/main/res/values/attrs.xml +++ b/components/src/main/res/values/attrs.xml @@ -255,7 +255,8 @@ - + + diff --git a/sample/src/main/res/layout/fragment_select_row.xml b/sample/src/main/res/layout/fragment_select_row.xml index cd1daf2e..f1ec464f 100644 --- a/sample/src/main/res/layout/fragment_select_row.xml +++ b/sample/src/main/res/layout/fragment_select_row.xml @@ -133,7 +133,7 @@ android:id="@+id/select_row_group_with_divider" android:layout_width="match_parent" android:layout_height="wrap_content" - app:showDivider="true"> + app:showSelectRowDivider="true">