Skip to content

Commit

Permalink
Merge pull request #88 from Trendyol/selection_dialog_addTextColor_an…
Browse files Browse the repository at this point in the history
…imatedCornerRadiusWhenExpand

SelectionDialogAttributeUpdate
  • Loading branch information
dogukankeskinoglu authored Dec 16, 2021
2 parents 7050eb2 + 4acc964 commit e5a570b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libraries/dialogs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<img src="https://raw.githubusercontent.com/Trendyol/android-ui-components/master/images/dialogs-1.png" width="280"/> <img src="https://raw.githubusercontent.com/Trendyol/android-ui-components/master/images/dialogs-2.png" width="280"/> <img src="https://raw.githubusercontent.com/Trendyol/android-ui-components/master/images/dialogs-3.png" width="280"/> <img src="https://raw.githubusercontent.com/Trendyol/android-ui-components/master/images/dialogs-4.png" width="280"/> <img src="https://raw.githubusercontent.com/Trendyol/android-ui-components/master/images/dialogs-5.png" width="280"/>

$dialogsVersion = dialogs-1.2.4 [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
$dialogsVersion = dialogs-1.2.8 [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Dialogs
Dialogs is a bunch of BottomSheetDialogs to use in app to show user an information, agreement or list.
Expand Down Expand Up @@ -101,6 +101,8 @@ All **Info Dialog** arguments plus these arguments will be applicable to show se
| `selectedItemDrawable` | Int | Drawable resource for selected item icon. | null |
| `selectedTextColor` | Int | Color resource for selected item text color. | null |
| `showRadioButton` | Boolean | Radio button visibility | false |
| `titleTextColor` | Int | Color resource for title text color. | null |
| `animateCornerRadiusWhenExpand` | Boolean | Corner radius will be removed with an animation when set true. | false |

Sample usage:
```kotlin
Expand All @@ -109,6 +111,8 @@ selectionDialog {
content = getContent()
items = getItemsAsHtml()
showItemsAsHtml = true
titleTextColor = R.color.colorPrimary
animateCornerRadiusWhenExpand = true
selectedItemDrawable = R.drawable.ic_check
selectedTextColor = R.color.colorPrimary
showRadioButton = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ class SelectionDialogBuilder internal constructor() : InfoDialogBuilder() {
showContentAsHtml = it.showContentAsHtml,
contentImage = it.contentImage,
cornerRadius = it.cornerRadius,
animateCornerRadiusWhenExpand = it.animateCornerRadiusWhenExpand,
titleTextColor = it.titleTextColor,
items = it.items,
showItemsAsHtml = it.showItemsAsHtml,
enableSearch = it.enableSearch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class DialogsActivity : AppCompatActivity() {
showContentAsHtml = true
showCloseButton = false
contentImage = android.R.drawable.ic_dialog_email
animateCornerRadiusWhenExpand = true
items = getListItems()
onItemSelectedListener = this@DialogsActivity.onItemSelectedListener
onItemReselectedListener = this@DialogsActivity.onItemReselectedListener
Expand Down

0 comments on commit e5a570b

Please sign in to comment.