android idea layout,IntelliJ IDEA 2016.1 Help

Android Layout Preview Tool Window

The tool window appears when you open a layout definition file for editing in the manual mode.

It allows you to adjust the appearance of the layout preview and to emulate different configurations. This helps you adjust your application to different Android platforms, devices,

orientations, dock modes, locales, etc.

In this section:

Toolbar

Use the controls in this area to adjust the appearance of the layout preview.ItemTooltipDescription69542f19a46278e1a6100a7a6877bee3.pngZoom to FitToggle this button to have IntelliJ IDEA compress or expand the preview so it fits the target screen size.

51faf2f0da688f23ec592fa387c1cd74.pngReset Zoom to 100%Click this button to have IntelliJ IDEA reset the zoom to preview the actual size.

11c0eb23926c9da177288a49a5eb7623.pngZoom InClick this button to have IntelliJ IDEA expand the preview.

8bd4df3e83b539109e8278589ade7484.pngZoom OutClick this button to have IntelliJ IDEA compress the preview.

c0552c9cfd750fd53220253cce0063a8.pngJump to SourceClick this button to switch to the Text tab where you can edit the application layout in the source .xml file.

ee37289876232da18bfbc1400bd5854d.pngRefreshClick this button to have IntelliJ IDEA update the preview so that it reflects on-the-fly changes to the current layout definition.

34fc99f106f9a55e823492ebe0b25571.pngSave ScreenshotClick this button to take a screenshot of the application preview.

This button is only available from the Text tab of the layout preview window.

cb471becd1bce11f2966c35c7314e3df.pngOptionsClick this button to configure the appearance and behavior of the tool window.

Hide for non-layout files: select this option to have IntelliJ IDEA temporarily close the tool window when the focus in the editor switches to a non-layout file.

As soon as the same or another layout definition file is in focus, the tool window re-appears automatically.

Include Device Frames (if available): select this option to make the preview look like it is going to appear on the actual device.

Show Lighting Effect: select this option to display lighting effects to make the preview look more natural.

This option is only available if the Include Device Frames option is selected.

Controls

Use the controls in this area to preview your layout in different configurations.ItemTooltipDescription1ff481411906163d42117a3fc484ad77.pngConfiguration to render this layout in the IDEFrom this drop-down list, select a layout configuration that you want to preview and edit, create a new layout configuration, or select different preview options.

The available options are:

Create Landscape Variation: select this option to create a landscape version of your layout.

The corresponding layout definition file will be generated in the res\layout-land folder.

Once this variation is created, this menu option will be replaced with the Switch to layout-land

option that opens the layout-land\.xml file for editing.

Create layout-xlarge Variation: select this option to create a variation of your layout for an extra large screen size (at least 960x720 dp).

The corresponding layout definition file will be generated in the res\layout-xlarge folder.

Once this variation is created, this menu option will be replaced with the Switch to layout-xlarge

option that opens the layout-xlarge\.xml file for editing.

Switch to layout: this option is only available if you have created multiple layout versions.

Select it to return to the original layout definition file.

Create Other: select this option to create another variation of your layout. In the Select Layout Directory dialog

that opens, specify the folder where the layout definition will be stored and select resource qualifiers

that determine a specific device configuration. Select the relevant qualifier and click

adfc64273bdb6c2c5b93f534a2349c88.png. Then specify the value of the qualifier in the dialog box that opens.

The qualifier is added to the Chosen qualifiers list.

Preview Representative Sample select this option to display multiple device configurations and preview the layout on the most important screen sizes.

Preview All Screen Sizes: select this option to display multiple device configurations and preview the layout on all available screen sizes.

Preview All Locales: select this option to preview the layout in all locales where your application is going to be used.

Preview Right-to-Left Layout: select this option to preview the layout in both directions (left-to-right and right-to-left) side by side.

Preview Android Versions: select this option to preview the layout on all installed Android API versions.

Preview Included: select this option to preview your layout nested in another layout.

This option is only available if the current layout is included into another layout.

Preview Layout Versions: select this option to display multiple device configurations and preview the layout in all available variations.

None: select this option to return to the default view.

Toggle Layout Mode: select this option to switch between different preview options.

91b4a56496170954b626b7d7e9b4c134.pngThe virtual device to render the layout withFrom this drop-down list, select a virtual or a physical device to preview what your application will look like on this device.

To add a new virtual device, select Add Device Definition and configure an emulator in the Android Virtual Device (AVD) Manager that opens (for

instructions refer to Managing Virtual Devices).

1a3d273bb1ab7f119de3d43865fefa5e.pngGo to next stateFrom this drop-down list, select the preview orientation (portrait or landscape),

the UI mode (Normal, Car Dock, Desk Dock, Television, Appliance) and switch between the Night (dimmed screen)

and Not Night (standard brightness) modes.

For details on UI modes refer to UiModeManager.

018d4b9ba700ec74bd61632c6c200b11.pngThemeClick this button to select a theme from the Select Theme dialog.

1ef84391ad8315fdeaa252c9ff755370.pngN/AClick this button to associate the layout with an activity. Select Associate with to associate it with the current activity,

or Associate with Other Activity to display a list of available activities to select from.

d3600b46592f51e4b7b6fe9aaa4abf2e.pngLocale to render layout with in the IDEFrom this drop-down list, select an existing locale or add a locale for your application.

A locale is a combination of the target country and language to have the dates and some other data presented in accordance with the local rules and preferences.

You can also preview the layout in all available locales and in both directions (left-to-right and right-to-left).

a8c262ea3bd8655d7f620bacc80a799f.pngAndroid version to use when rendering layouts in the IDEFrom this drop-down list, select an API version or use the Automatically Pick Best option to render the layout using the most suitable Android version.

You can also preview the layout on all installed Android API versions.

Last modified: 13 July 2016

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值