avast / android-styled-dialogs

Backport of Material dialogs with easy-to-use API based on DialogFragment
Apache License 2.0
2.15k stars 450 forks source link

Are you want to support diffrent textcolor between positive button and negative button? #140

Open leafseelight opened 7 years ago

leafseelight commented 7 years ago

Sometimes, positive button need to be brought to the forefront with light color as red color( mean "waring“ ).

http://7xqjy9.com1.z0.glb.clouddn.com/QQ%E5%9B%BE%E7%89%8720170425140553.jpg

greatflag commented 6 years ago

sdl_styles.xml: add

<style name="SDL.Button.Negative" parent="@style/SDL.Button">
        <item name="android:textColor">#706f6f</item>
</style>

sdl_dialog.xml change

<Button
        android:id="@+id/sdl_button_negative"
        style="@style/SDL.Button"
        tools:text="Negative" />

to

<Button
        android:id="@+id/sdl_button_negative"
        style="@style/SDL.Button.Negative"
        tools:text="Negative" />