王立平--include在Android应用
16lz
2021-01-25
它包括一个布局和布局
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>
更多相关文章
- 没有一行代码,「2020 新冠肺炎记忆」这个项目却登上了 GitHub 中
- Android(安卓)keep screen on 方法
- 安卓EditText控件底部红线如何解决?
- SetContentView 到底Set去哪里呢?
- android imageview设置图片的小问题
- android 使用icon进行字符编码转换
- android的软盘影响背景问题
- android studio apk打包命名规范
- Android(安卓)3 开始 Activity MainThread中不能执行http通信了