Próbuję zmienić kolor przycisku AlertDialog.Builder, ale nie znalazłem sposobu, aby to zrobić.Zmiana koloru przycisku AlertDialog.Builder
Chcę zmienić kolor przycisków i tytułu na biały jak w motywie HOLO.
zobaczyć te 2 screeny na przykładach:
Ive spojrzał tutaj:
How to change theme for AlertDialog
Change the style of AlertDialog
How to change the background of the custom alert dialog
Wszystkie z nich nie pracuje dla mnie.
Oto mój kod:
public void logInDialog()
{
ContextThemeWrapper ctw = new ContextThemeWrapper(this, R.style.dialogStyle);
AlertDialog.Builder builder = new AlertDialog.Builder(ctw);
builder.setTitle("Log in");
View prefView = View.inflate(this, R.layout.log_in, null);
//The rest of the code.........
}
To jest mój kod styl:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="dialogStyle" parent="android:Theme.Dialog">
<item name="android:background">@color/white</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:button">@color/white</item>
</style>
</resources>
wielki, dzięki mnóstwo! – Malfunction