单帧布局:不需要任何配置,所有控件都被放置到左上角。
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/big" >
</ImageView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/center" >
</ImageView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/small" >
</ImageView>
</FrameLayout>
:D
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/big" >
</ImageView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/center" >
</ImageView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/small" >
</ImageView>
</FrameLayout>
:D
本文深入探讨了单帧布局的特点及应用,重点介绍了如何将所有控件放置于左上角,通过实例展示了FrameLayout的使用方法,并讨论了其在UI设计中的优势与局限。
1307

被折叠的 条评论
为什么被折叠?



