- Select the required element in the Palette pane and drag and drop it to the canvas in the Design pane.
- Click the required element in the Palette pane and then click the Design pane.
Every component added in either way is also added to the Component Tree and is declared in the layout definition file.
- Expand the Custom area in the Palette pane.
-
Do one of the following:
- To embed a layout, click the Include icon. In the Resources dialog box that opens, click the Project tab to search among your layout definitions or click the System tab to search in the SDK.
- To add a combination of components, click Fragment and choose the fragment to embed in the Resources dialog box that opens.
-
To add a user-defined view
,
click Custom View: and choose the view to insert in the dialog box that opens.
The canvas is synchronized with the Component Tree, so you can arrange components by moving them in either of these in either pane.
- Select the required component on the canvas or in the Component Tree and drag it to the right position or copy and paste it using the context menu.
You can set the values for the mandatory properties of a component right in the canvas or switch to the Properties pane for a more detailed configuration of the component properties, possibly customizing the contents of the pane.
- To assign the values for the essential properties right in the canvas, click the component in question twice and specify the values in the pop-up dialog box that opens.
-
To configure the component properties with more details, select the component in the canvas or in the Component Tree, switch to the Properties pane,
and specify the values for the properties of your choice.
-
By default, the pane shows only a standard set of properties, and the most frequently used ones are displayed bold.
To have the pane display all the properties that are defined for the selected component according to the specification,
toggle the Show expert properties button
on the toolbar.
-
To view a brief documentation for the selected property from the Android reference
,
click the Show documentation button
on the toolbar or press Ctrl+QControl J.
-
Properties with updated values are highlighted blue. To remove the value you specified for a property and return to the default value, select the property
and click the Restore default value button
on the toolbar.
-
By default, the pane shows only a standard set of properties, and the most frequently used ones are displayed bold.
To have the pane display all the properties that are defined for the selected component according to the specification,
toggle the Show expert properties button
In some cases you may need to transform an already fully configured component into a component of another type. With IntelliJ IDEA, you can do it without losing the specified properties: all the properties that are common for both types will be preserved in the new component. This operation is referred to as morphing.
- Select the component to transform in the canvas or in the in the Component Tree and choose Morphing on the context menu of the selection.
- IntelliJ IDEA shows a list of compatible component types, that is, the types into which the selected component can be converted. Choose the target type and configure the properties that were not configured in the original component.

is added on the pane toolbar. Open the list to view the warnings.
the number of warnings is shown on top.