Android Studio Learning---Real-time layouts (live layout)

Source: Internet
Author: User

The live layout feature in Android Studio allows you to directly preview your app's user interface without having to run your application in a device or simulator. Real-time layout is an extremely powerful tool that can help developers save a lot of time. With the help of real-time layouts, the task of viewing the application user interface becomes easy and fast.

To use the live layout, we need to double-click the corresponding XML layout file and select the "Text" tab below the workspace. Next, select the "Preview" tab on the right side of the workspace to preview the current layout. Any changes we make to the XML layout are reflected directly in the Preview window on the right. You can look at the following to get a deeper understanding of this feature.

The real-time layout feature gives us a number of notable advantages. For example, you can choose an option from the first menu in the preview panel to make adjustments to the XML layout you are currently using. For example, you can create different portrait and landscape views separately, and Android Studio will assume the task of creating the necessary folders and files.

The second menu in the preview panel allows you to change the size of the device displayed in the preview panel. The third menu function is to adjust the orientation of the device in the preview panel, so that we can more easily see the effects and themes of the same set of layouts in different display modes (portrait and Landscape).

The fourth menu in the preview panel allows us to easily access the individual fragments used by the activity or layout. The preview panel also allows you to change the language used in the live layout to easily preview the display of different languages in the layout scheme. The function of the rightmost menu is to adjust the API version.

The preview panel also contains a number of controls, such as zooming the layout, re-preview the panel, or intercepting the current screen.

Android Studio Learning---Real-time layouts (live layout)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.