- How to set custom layout in AlertDialog in Android?
- How do I change the button color in alert dialog?
How to set custom layout in AlertDialog in Android?
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main. xml.
How do I change the button color in alert dialog?
You can just create a style and apply that theme on the dialog box. So whenever you want to change the color of AlertDialog box, just change color in styles. xml and all the dialog boxes will be updated in the whole application. This answer is the most clean while still being correct.