文章目录
1 Android中的帧布局
首先看下效果:
下面看下xml:
<?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"
android:background="#cccccc"
android:foreground="@mipmap/ic_launcher"
android:foregroundGravity="right|bottom">
<TextView
android:layout_width="400dp"
android:layout_height="400dp"
android:background="#ff0000"
android:layout_gravity="center"/>
<TextView
android:layout_width="350dp"
android:layout_height="350dp"
android:background="#00ff00"
android:layout_gravity="center"/>
<TextView
android:layout_width="300dp"
android:layout_height="300dp"
android:background="#0000ff"
android:layout_gravity="center"/>
<TextView
android:layout_width="250dp"
android:layout_height="250dp"
android:background="#00ffff"
android:layout_gravity="center"/>
<TextView
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#ff00ff"
android:layout_gravity="center"/>
<TextView
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_gravity="center"
android:background="#ffff00" />
</FrameLayout>