IntelliJ IDEA 11.1 Web Help

11.0+

IntelliJ IDEA features a dedicated Preview tool window which shows the output of the currently opened layout definition file without launching a physical or virtual device. Using the layout preview, you can adjust your application to various Android platforms, devices with various screen sizes, orientations, doc modes, night/notnight modes, locales, etc. You can emulate the required configuration by choosing the relevant settings from the Preview tool window controls.

The contents of the tool window change dynamically, as you update the layout definition file.

The tool window appears when you open a layout definition file for the first time and remains on the screen until you close it manually by clicking the Preview tool window button. After that it remains hidden until you open it manually by clicking the Preview tool window button again.

To preview a layout, perform these general steps:
  • Open the required layout definition field in the editor. The Preview tool window opens.
  • Specify the alternative resources to configure the target environment using the tool window controls:
  • 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 collapseAll.
    • To have IntelliJ IDEA compress or expand the preview so it fits the Preview tool window size, click the Zoom to Actual Size button erDiagramIconActualSize.
    • To expand or compress the preview, use the Zoom In erDiagramIconZoomIn  and Zoom Out erDiagramIconZoomOut buttons respectively.
    • Normally, the preview changes on-the-fly as you update the definition file. If it does not, click the Refresh button refresh button to have IntelliJ IDEA update the preview.
  • To have IntelliJ IDEA automatically close the Preview tool window when the focus in the editor switches to a non-layout definition file, click the Options toolbar button projectToolWindowSettingsIcon and select Hide for non-layout files.
  • To close the Preview tool window, click the Preview tool window button.
  • To re-open the Preview tool window, click the Preview tool window button again.

See Also

Reference:

Android:

Web Resources: