Android-Rate icon indicating copy to clipboard operation
Android-Rate copied to clipboard

Dialog button text color

Open gregacucnik opened this issue 8 years ago • 2 comments

For some reason dialog button text color is red and not primary color. If i remember correctly it used to work and text was colored by primary color.

Could you add an option to set buttons text color?

alertDialog.getButton(DialogInterface.BUTTON_POSITIVE).setTextColor();
alertDialog.getButton(DialogInterface.BUTTON_NEUTRAL).setTextColor();
alertDialog.getButton(DialogInterface.BUTTON_NEGATIVE).setTextColor();

gregacucnik avatar Jun 30 '16 23:06 gregacucnik

Hello hotchemi, Do you have any update for this issue? I also need to change the button text color.

jmhabuild avatar Mar 21 '17 09:03 jmhabuild

@gregacucnik, @jmhabuild try use ContextThemeWrapper to make dialog look other dialogs in your app. For example I`ve used method like this:

public static ContextThemeWrapper getAlertDialogContext(Context context) {
        return new ContextThemeWrapper(context, R.style.AlertDialog);
}

Style AlertDialog is defined in styles as:

<style name="AlertDialog" parent="Theme.AppCompat.Light.Dialog">
        <item name="android:textColorPrimary">@color/black</item>
        <item name="android:textColor">@color/primaryColor</item>
</style>

After that, just call AppRate.with(getAlertDialogContext(this)).// other parameters It should help.

vbuberen avatar Apr 27 '17 08:04 vbuberen