帧布局--FrameLayout
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="200dp" android:layout_height="200dp" android:gravity="bottom" android:background="#ff0000" android:text="红色"/> <TextView android:layout_width="150dp" android:layout_height="150dp" android:gravity="bottom" android:background="#00ff00" android:text="绿色"/> <TextView android:layout_width="100dp" android:layout_height="100dp" android:gravity="bottom" android:background="#0000ff" android:text="蓝色"/> </FrameLayout>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步