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

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

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



<LinearLayout xmlns:andro

    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:
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="删除" />


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


</LinearLayout>

相关文章:

  • 2021-05-28
  • 2022-01-31
  • 2022-01-26
  • 2021-05-29
  • 2022-02-07
  • 2022-01-23
  • 2021-05-24
  • 2021-08-14
猜你喜欢
  • 2021-05-08
  • 2021-06-25
  • 2021-06-15
  • 2021-10-21
  • 2021-04-06
相关资源
相似解决方案