android tab <include use of/>

Source: Internet
Author: User

In the Android page layout design, it is sometimes necessary to use a lot of the same layout design. If the same layout is written in each XML used in the layout, it will result in redundant statements and poor readability.

To solve this problem, we can write the same layout code in a separate module, and then use the <include/> tag to reuse the layout code.

Specific implementation:

Use the <include/> tab to refer directly to the XML when it needs to use an identical layout module.

The ID of the same layout module and the XML name in res/layout/are roughly required:

Altogether two <include/> tabs were used by the knowable. The child is now only the ID and layout name on the line.

When you look at someone else's project, you get this usage, so write it down.

Reference:

http://blog.csdn.net/wangljgood/article/details/6556175

http://blog.csdn.net/race604/article/details/7564088

android tab <include use of/>

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.