Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find default AlertDialog layout xml file?

I want to make an default Alert Dialog with a small modification. Where can I find an xml layout file of default AlertDialog?

like image 227
latata Avatar asked Dec 01 '13 17:12

latata


People also ask

What an XML layout file contains?

Specifically, Android considers XML-based layouts to be resources, and as such, layout files are stored in the reslayout directory inside your Android project. Each XML file contains a tree of elements specifying a layout of widgets and containers that make up one View.

How can I customize AlertDialog in Android?

Step 1: Create a XML file: custom_layout. Add the below code in custom_layout. xml. This code defines the alertdialog box dimensions and add a edittext in it.

What is AlertDialog builder in Android?

Android AlertDialog can be used to display the dialog message with OK and Cancel buttons. It can be used to interrupt and ask the user about his/her choice to continue or discontinue. Android AlertDialog is composed of three regions: title, content area and action buttons.


1 Answers

All default layouts are included in the Android SDK. In your SDK installation, see the following:

<SDK_INTALL_DIRECTORY>/sdk/platforms/android-18/data/res/layout/alert_dialog.xml 

(or replace "android-18" with the API level you want).

Note that you will only see API levels that you have downloaded via the Android SDK Manager.

like image 166
EJK Avatar answered Oct 04 '22 05:10

EJK