MaterialStyledDialogs icon indicating copy to clipboard operation
MaterialStyledDialogs copied to clipboard

How to set Button Color

Open waqasakram117 opened this issue 8 years ago • 8 comments

I am stuck to set Button color e.g i want to make black positive and red negative button.

waqasakram117 avatar Dec 26 '16 07:12 waqasakram117

I really want to know how to do that too.

guuilp avatar Jul 17 '17 17:07 guuilp

@javiersantos may you help us?

guuilp avatar Jul 17 '17 17:07 guuilp

Need this too

idragon81 avatar Jul 26 '17 09:07 idragon81

Same question for me

manufunk avatar Aug 06 '17 14:08 manufunk

As the library is based on material-dialogs by @afollestad, you can define the button colours in your styles.xml: https://github.com/afollestad/material-dialogs#global-theming

I will work on a better solution, but this workaround could help meanwhile.

javiersantos avatar Aug 14 '17 10:08 javiersantos

Thanks @javiersantos!

DanielVd avatar Aug 14 '17 13:08 DanielVd

@waqas117 @guuilp @idragon81 @Manu206 read this: https://github.com/afollestad/material-dialogs#global-theming.

You have to put this in your app style:

<!--
        By default, the positive action text color is derived
        from the colorAccent attribute of AppCompat or android:colorAccent
        attribute of the Material theme.
-->
<item name="md_positive_color">#673AB7</item>

DanielVd avatar Aug 16 '17 21:08 DanielVd

@DanielVd Thank you very much, dude.. You saved my day.

sudeshkumara avatar Dec 03 '19 22:12 sudeshkumara