- Open the required layout definition file in the editor.
- Choose the editing mode:
-
Use the controls of the Preview tool window or the Design tab to emulate the target configuration to run the application in.
Specify the alternative resources
to configure the target environment using the controls:
-
Target device which presents a combination of Screen size
and screen density
.
If no device is chosen, IntelliJ IDEA displays an error message and provides a link to the dialog box
where you can configure it.
- Screen orientation
. - Target Android platform
to adjust the application to. - Locale
. - Dock mode
. - Night mode
. - Theme
.
-
Target device which presents a combination of Screen size
-
Normally, the preview changes on-the-fly as you update the definition file. If it does not, click the Refresh button
button
to have IntelliJ IDEA update the preview.
-
In the Design tab of the Designer tool window, choose Edit Profiles from the Profile drop-down list
in the top-left corner of the Design tab toolbar.
By default, the Full item is selected unless no profiles are configured at all.

-
In the Edit Profiles dialog box that opens, configure a list of target environment profiles.
-
To define a new profile, click the Add button
and specify the profile name and the alternative resources.
- To have the control for configuring an environment setting hidden when the profile is selected, clear the Visible check box next to the setting. By default, the controls for all settings are configured as visible.
-
To discard a profile, select it in the list and click the Remove button
.
-
To define a new profile, click the Add button
When you preview the layout output in the Preview tool window and design the layout manually in the editor, you may need to move the bounds of the tool window so more space is available in the editor. In this case it may be helpful to compress the preview so it fits the tool window size but still reflects the layout output in the emulated environment.
-
Adjust the preview appearance using the toolbar buttons:
-
To have IntelliJ IDEA compress or expand the preview so it fits the specified screen size,
toggle the Zoom to Fit button
.
-
To have IntelliJ IDEA compress or expand the preview so it fits the Preview tool window size,
click the Zoom to Actual Size button
.
-
To expand or compress the preview, use the Zoom In
and Zoom Out
buttons respectively.
-
To have IntelliJ IDEA compress or expand the preview so it fits the specified screen size,
toggle the Zoom to Fit button

