IntelliJ IDEA 2016.1 Help

Create Layout Dialog

Project Tool Window | context menu of a package with the application classes | New - Android Component

The dialog box opens when you create a component of the activity or fragment type, and select the Create layout file check box.

In this dialog box, specify the layout name, its root element, and the set of qualifiers to be included in this layout.

File name In this text box, specify the name of the layout definition file associated with the new component. Only lowercase letters and numbers are supported.
Root element In this text box, specify the root element of the layout. Press Ctrl+Space to get a list of available values. The value must be of the View or ViewGroup type, learn more at
Directory name In this text box, specify the folder where the layout definition will be stored relative to the res folder.
  • If your application does not need to be compatible with various Android devices and, therefore, no multiple screens support is required, accept the default layout subfolder.
  • To provide alternative resources, specify the resource qualifiers that determine a specific device configuration. Move the relevant qualifiers from the Available qualifiers list to the Chosen qualifiers list and specify their values. IntelliJ IDEA appends all the selected qualifiers to the Directory name field with a dash character as separator.

For details, see Creating Resources.

Available qualifiers From this list, select the resource qualifiers that determine a specific device configuration. Select the relevant qualifier and click icon_InsertReplace. Then specify the value of the qualifier in the dialog box that opens. The qualifier is added to the Chosen qualifiers list.

See Also

Last modified: 13 July 2016