IntelliJ IDEA 13.1.0 Web Help

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

In this dialog box, specify the class that implements the new Android component, the component type, and the title to be displayed to the user.

Item Description
Name In this text box, type the name of the class that implements the component.
Kind In this drop-down list, specify the component type. The available options are:
Label In this text box, type the title that will be displayed to the user.

Note

  • If no title is specified, the label assigned to the entire application will be displayed.
  • No label is specified for a remote interface.
Mark as startup Activity Select this check box to have the new component of the type Activity displayed by default when the application starts.

Note

The check box is available only when the Activity component type is specified in the Kind drop-down list.

Create layout file
  • Select this check box to have IntelliJ IDEA generate a stub of the related layout definition file, that is, the content view of the new activity or fragment. In the Create Layout dialog box that opens, specify the layout name, its root element, and 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 subfolder layout.
    • To provide alternative resources, specify the resource qualifiers that determine the 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.
  • If the check box is cleared, you will have to create a content view of the new activity or fragment manually.

Note

The check box is available only for the components of the types activity or fragment.

See Also

Reference:

Android:

Web Resources: