framelayout
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon" /> </FrameLayout>
本文介绍了一个使用FrameLayout进行布局的示例,展示了如何在FrameLayout中放置多个ImageView,并设置了它们的宽度、高度及图片资源。FrameLayout是Android中的一种基本布局方式,允许其子视图重叠显示。
1万+

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



