zoukankan      html  css  js  c++  java
  • 王立平--include在Android中的应用

    一个布局中包括还有一个布局

    1.在layout下定义activity_other.xml布局

    2.代码中的包括例如以下:



    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:context="${relativePackage}.${activityClass}" > 
        <Button
            android:id="@+id/btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="删除" />


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


    </LinearLayout>
  • 相关阅读:
    传纸条
    金明的预算方案
    矩阵取数
    能量项链
    选择客栈
    过河
    乌龟棋
    逢低吸纳
    三角形牧场
    多米诺骨牌
  • 原文地址:https://www.cnblogs.com/yfceshi/p/7352778.html
Copyright © 2011-2022 走看看