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" ><ImageViewandroid:layout_width="fill_parent"android:layout_height="fill_parent"android:src="@drawable/video" /><ImageViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@drawable/play"android:layout_gravity="center"/></FrameLayout>
运行效果:
本文介绍了Android中FrameLayout的基本用法,展示了如何通过简单的XML代码实现图片的层叠显示,并利用gravity属性调整子控件的位置。
798

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



