Use of include tags in android

Source: Internet
Author: User

<?xml version= "1.0" encoding= "Utf-8"?>
<relativelayout android:layout_width= "fill_parent" android:layout_height= "fill_parent" style= "@style/ Stylelayoutmain "mce_style=" @style/stylelayoutmain "
Xmlns:android= "Http://schemas.android.com/apk/res/android" >

<!--include tags cannot set relativelayout properties, such as Android:layout_alignparentbottom, because it does not work--
<!--the id attribute in the Include tag (ANDROID:ID), the id attribute in the layout layouts referenced does not work, and it is suspected that the layout outer layer of its reference is wrapped in an include tag
Or a property that overrides its contents id-->
<!--If there is no include tag, all layout code is written in an XML file, and the interface appears redundant and poorly readable. And when the interface is loaded in order, the previous layout cannot
Call the layout ID that follows it. With include, you can refer to the layout id attribute in an include after
<include android:id= "@id/titlelayout" layout= "@layout/app_title"/>

<include layout= "@layout/app_tradelogin"/>

<include layout= "@layout/app_bottom"/>

</RelativeLayout>

App_title App_tradelogin App_bottom Three each represents a layout file

Use of include tags in android

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.