@@ -5,8 +5,9 @@ An Android library to create fully material designed bottom dialogs similar to t
55
66## Releases:
77
8- #### Current release: 2.0.7 .
8+ #### Current release: 2.0.8 .
99
10+ - Now with buttons coloring support (again) via code.
1011 - Now with AndroidX support.
1112
1213You can see all the library releases [ here] ( https://github.com/marcoscgdev/DialogSheet/releases ) .
@@ -40,7 +41,7 @@ allprojects {
4041Now add the dependency to your app build.gradle file:
4142
4243```
43- implementation 'com.github.marcoscgdev:DialogSheet:2.0.7 '
44+ implementation 'com.github.marcoscgdev:DialogSheet:2.0.8 '
4445```
4546
4647### Creating the dialog with Java
@@ -67,7 +68,7 @@ new DialogSheet(this)
6768 })
6869 .setNeutralButton(" Neutral" , null )
6970 .setBackgroundColor(Color . BLACK ) // Your custom background color
70- .setButtonsColorRes(R . color. colorPrimary) // Default color is accent
71+ .setButtonsColorRes(R . color. colorAccent) // You can use dialogSheetAccent style attribute instead
7172 .show();
7273```
7374
@@ -92,13 +93,19 @@ val dialogSheet:DialogSheet = DialogSheet(this@MainActivity)
9293 }
9394 .setRoundedCorners(false ) // Default value is true
9495 .setBackgroundColor(Color . BLACK ) // Your custom background color
95- .setButtonsColorRes(R . color. colorPrimary) // Default color is accent
96+ .setButtonsColorRes(R . color. colorAccent) // You can use dialogSheetAccent style attribute instead
9697 .show()
9798```
9899
99- ### Colorize buttons (necessary)
100+ ### Colorize buttons
100101
101- Add this atribute to your main app theme
102+ You can do it programmatically
103+
104+ ``` java
105+ .setButtonsColorRes(R . color. colorPrimary)
106+ ```
107+
108+ Or by adding this atribute to your main app theme
102109
103110``` xml
104111<item name =" dialogSheetAccent" >@color/colorAccent</item >
0 commit comments