javiersantos / MaterialStyledDialogs

A library that shows a beautiful and customizable Material-based dialog with header. API 14+ required.
Apache License 2.0
1.17k stars 155 forks source link

I have 3 layout with different 3 color in dialog. #9

Closed ghost closed 8 years ago

ghost commented 8 years ago

I would like to use 2 colors (HeaderColor = primary color & [Text , Button] = white color).

new MaterialStyledDialog(CargoPlaceActivity.this) // .setTitle("Logout!") .setDescription("Are you sure, you want to logout ?") .setIcon(R.drawable.splash) .withDialogAnimation(true, Duration.SLOW) .setCancelable(false) .setPositive(getResources().getString(R.string.positive_button), new MaterialDialog.SingleButtonCallback() { @Override public void onClick(MaterialDialog dialog, DialogAction which) { // } }) .setNegative(getResources().getString(R.string.negative_button), new MaterialDialog.SingleButtonCallback() { @Override public void onClick(MaterialDialog dialog, DialogAction which) { // } }) .show();

2016-02-23_15 16 37 2

ghost commented 8 years ago

What can be the problem? Help Me.

NicolasChassagneux commented 8 years ago

Hi, I have the same issue. The "button layout" background is dark. Any idea to fix it ? I tried to change the app Theme from light to dark => no effect. So frustrating ='(

NicolasChassagneux commented 8 years ago

I found the problem. It seems to be the : @android:color/white line, into the style.xml file which cause the black layout color. If i remove the line or set the color to black, the layout is white. Hoping this will help someone.

javiersantos commented 8 years ago

It should be fixed using the latest update. Thanks!

dependencies {
    compile 'com.github.javiersantos:MaterialStyledDialogs:1.3.1'
}