IntelliJ IDEA composes the name for the new resource folder from the resource type and the qualifier you choose and creates a folder with this name under the res folder. The name is built in compliance with the Android naming conventions.
- In the Project tool window, select the res node where all Android resource definitions are stored.
- On the context menu, choose . The New Resource Directory dialog box opens.
-
Specify the type
of the resources to be stored in the new folder.
From the Resource Type drop-down list, select the required type. The selected type is displayed in the Directory name read-only field.
-
Do one of the following:
-
If your application does not need to be compatible with various Android devices and therefore no multiple screens
support is required, just click OK.
-
To provide alternative resources
,
specify the resource qualifiers
that determine
the specific device configuration.
-
From the Available Qualifiers list, select the required qualifier, and click the
button.
The selected item is added to the Chosen qualifiers list.
Depending on the particular qualifier, either specify its value manually or choose the required value from the drop-down list next to the Chosen qualifiers list.
-
To remove a qualifier, select it in the Chosen qualifiers list and click the
button.
IntelliJ IDEA appends all the selected qualifiers to the resource type with a dash character as separator. The result is shown in the Directory name read-only field. Click OK.
-
From the Available Qualifiers list, select the required qualifier, and click the
IntelliJ IDEA creates a new folder with the composed name under the res node.
-
If your application does not need to be compatible with various Android devices and therefore no multiple screens
- In the Project tool window, select the res node where all Android resource definitions are stored.
- On the context menu, choose . The New Resource File dialog box opens.
- Specify the name for the new resource definition file in the File name text box.
-
Specify the resource type and qualifiers using the Resource type and Available qualifiers fields.
Tip
You can scroll through the list of resource types right from the File name text box by using the Up and Down keyboard keys.
- Click OK, when ready. IntelliJ IDEA composes the name of the relevant resource folder to save the new file in. The name is built from the specified resource type and the qualifier. in compliance with the Android naming conventions. If such folder already exists, IntelliJ IDEA saves the new file in it. If no such folder is found, IntelliJ IDEA creates it under the res folder and saves the new resource definition file there.
