Skip to content

Commit

Permalink
showDivider renamed uniquely to showSelectRowDivider (#142)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
aliahmedbd authored Aug 16, 2023
1 parent 535a8fc commit 4c2abe6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
3 changes: 2 additions & 1 deletion components/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@
<declare-styleable name="SelectRowGroup">
<!-- Initial selected row resource id -->
<attr name="selectedRow" format="reference" />
<attr name="showDivider" format="boolean" />
<!--Show Divider in SelectRowGroup-->
<attr name="showSelectRowDivider" format="boolean" />
</declare-styleable>

<declare-styleable name="InformationMessageCardView">
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/layout/fragment_select_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<uk.gov.hmrc.components.molecule.selectrow.SelectRowView
android:id="@+id/select_row_1_with_divider"
Expand Down

0 comments on commit 4c2abe6

Please sign in to comment.