生活随笔
收集整理的這篇文章主要介紹了
Android中的帧布局
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
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"><TextViewandroid:layout_width="400dp"android:layout_height="400dp"android:background="#ff0000"android:layout_gravity="center"/><TextViewandroid:layout_width="350dp"android:layout_height="350dp"android:background="#00ff00"android:layout_gravity="center"/><TextViewandroid:layout_width="300dp"android:layout_height="300dp"android:background="#0000ff"android:layout_gravity="center"/><TextViewandroid:layout_width="250dp"android:layout_height="250dp"android:background="#00ffff"android:layout_gravity="center"/><TextViewandroid:layout_width="200dp"android:layout_height="200dp"android:background="#ff00ff"android:layout_gravity="center"/><TextViewandroid:layout_width="150dp"android:layout_height="150dp"android:layout_gravity="center"android:background="#ffff00" /></FrameLayout>
總結
以上是生活随笔為你收集整理的Android中的帧布局的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。