Android - include属性使用方法

来源:互联网 发布:华锋e路航v700端口数据 编辑:程序博客网 时间:2024/06/06 09:56

include属性使用方法


本文地址: http://blog.csdn.net/caroline_wendy


Android的layout中, 可以使用include属性样式, 这样可以把不同的layout拼接在一起.
可以进行layout的复用, 但是需要注意的是layout属性是"layout", 前面不能添加"android:layout".

代码:
<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"              android:orientation="vertical"              android:layout_width="match_parent"              android:layout_height="match_parent">    <include layout="@layout/activity_start_ask"/>    <include layout="@layout/layout_promptcover_voice"/></FrameLayout>







2 2
原创粉丝点击