app經(jīng)常用到底部導(dǎo)航欄,早前使用過RadioGroup+FrameLayout實(shí)現(xiàn)或者RadioGroup+ViewPager實(shí)現(xiàn),現(xiàn)在基本使用FragmentTabHost+FrameLayout來實(shí)現(xiàn),因?yàn)槭褂闷饋砗唵我子?。下面寫一個小例子簡要地總結(jié)一下這個組合。
創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),巴州企業(yè)網(wǎng)站建設(shè),巴州品牌網(wǎng)站建設(shè),網(wǎng)站定制,巴州網(wǎng)站建設(shè)報價,網(wǎng)絡(luò)營銷,網(wǎng)絡(luò)優(yōu)化,巴州網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競爭力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時我們時刻保持專業(yè)、時尚、前沿,時刻以成就客戶成長自我,堅持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。首先,看一下例子的最終運(yùn)行效果圖
這5個圖標(biāo)的效果其實(shí)都是一樣的,只要做出來一個,以此類推就可以寫出其他幾個
第一步, FragmentTabHost+FrameLayout布局,先看一下代碼:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <FrameLayout android:id="@+id/realtabcontent" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="@color/bg_color"/> <android.support.v4.app.FragmentTabHost android:id="@android:id/tabhost" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white"> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="0" /> </android.support.v4.app.FragmentTabHost> </LinearLayout>
本文標(biāo)題:FragmentTabHostFrameLayout實(shí)現(xiàn)底部導(dǎo)航欄-創(chuàng)新互聯(lián)
URL地址:http://www.rwnh.cn/article16/cegpdg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營銷、Google、動態(tài)網(wǎng)站、網(wǎng)站改版、微信公眾號、外貿(mào)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容