Android中如何利用FrameLayout實(shí)現(xiàn)幀布局-創(chuàng)新互聯(lián)

本篇內(nèi)容介紹了“Android中如何利用FrameLayout實(shí)現(xiàn)幀布局”的有關(guān)知識(shí),在實(shí)際案例的操作過程中,不少人都會(huì)遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

創(chuàng)新互聯(lián)建站服務(wù)項(xiàng)目包括自流井網(wǎng)站建設(shè)、自流井網(wǎng)站制作、自流井網(wǎng)頁(yè)制作以及自流井網(wǎng)絡(luò)營(yíng)銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,自流井網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到自流井省份的部分城市,未來相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!

FrameLayout


在這個(gè)布局中,所有的子元素都不能被指定放置的位置,他們統(tǒng)統(tǒng)防御這塊區(qū)域的左上角,
并且后面的子元素直接覆蓋在前面的子元素之上,將前面的子元素部分和全部遮擋。

用途


常用于進(jìn)度條的表示

<?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">
 <TextView
  android:layout_gravity="center"
  android:background="#687564"
  android:id="@+id/textView"
  android:layout_width="300dp"
  android:layout_height="300dp"
  android:text="第一個(gè)" />

 <TextView
  android:layout_gravity="center"
  android:background="#422322"
  android:id="@+id/textView2"
  android:layout_width="200dp"
  android:layout_height="200dp"
  android:text="第二個(gè)" />

 <TextView
  android:layout_gravity="center"
  android:background="#f1f1f1"
  android:id="@+id/textView3"
  android:layout_width="100dp"
  android:layout_height="100dp"
  android:text="第三個(gè)" />

 <TextView
  android:layout_gravity="center"
  android:background="#f22"
  android:id="@+id/textView4"
  android:layout_width="80dp"
  android:layout_height="80dp"
  android:text="第四個(gè)" />
</FrameLayout>

Android中如何利用FrameLayout實(shí)現(xiàn)幀布局

<?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">


 <ProgressBar
  android:layout_gravity="center"
  android:id="@+id/progressBar"
  
  android:layout_width="wrap_content"
  android:layout_height="wrap_content" />

 <TextView
  android:layout_gravity="center"
  android:id="@+id/textView5"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:text="%20" />
</FrameLayout>

“Android中如何利用FrameLayout實(shí)現(xiàn)幀布局”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!

本文標(biāo)題:Android中如何利用FrameLayout實(shí)現(xiàn)幀布局-創(chuàng)新互聯(lián)
文章源于:http://www.bm7419.com/article6/cesjig.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管品牌網(wǎng)站設(shè)計(jì)、定制網(wǎng)站、域名注冊(cè)、網(wǎng)站導(dǎo)航、靜態(tài)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

營(yíng)銷型網(wǎng)站建設(shè)