日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

帧布局(FrameLayout)及属性

發(fā)布時(shí)間:2025/3/20 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 帧布局(FrameLayout)及属性 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

? ? ? 幀布局FrameLayout直接繼承ViewGroup組件,幀布局容器每加入一個(gè)組件創(chuàng)建一個(gè)空白區(qū)域,每個(gè)組件占據(jù)一幀,添加的組件是一個(gè)一個(gè)疊在一起的。

<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="fill_parent"><!-- 依次定義6個(gè)TextView,先定義的位于底層,后定義的位于上層 --> <!-- android:layout_gravity相對(duì)于父容器的對(duì)齊方式 --><TextViewandroid:id="@+id/textView1"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:background="#f00"android:text="1"android:height="320dp"android:width="320dp" /><TextViewandroid:id="@+id/textView2"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:background="#0f0"android:height="280dp" android:width="280dp" android:text="2"/><TextViewandroid:id="@+id/textView3"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:background="#00f"android:height="240dp" android:width="240dp" android:text="3"/><TextViewandroid:id="@+id/textView4"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:background="#ff0"android:height="200dp" android:width="200dp" android:text="4"/><TextViewandroid:id="@+id/textView5"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:background="#f0f"android:height="160dp"android:width="160dp" android:text="5"/><TextViewandroid:id="@+id/textView6"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:background="#0ff"android:height="120dp" android:width="120dp"android:text="6" /> </FrameLayout>




總結(jié)

以上是生活随笔為你收集整理的帧布局(FrameLayout)及属性的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。