加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

导航--XML文件

发布时间:2020-12-16 09:07:00 所属栏目:百科 来源:网络整理
导读:" data-snippet-id="ext.a95010aba05a5bd4f9334b0c8ebd4cd1" data-snippet-saved="false" data-codota-status="done"> ?xml version="1.0" encoding="utf-8"? RelativeLayout xmlns:android = "http://schemas.android.com/apk/res/android" android:layout_
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent">
    <FrameLayout  android:id="@+id/containerMain" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/rgMainBottomNav">

    </FrameLayout>

    <RadioGroup  android:id="@+id/rgMainBottomNav" android:layout_width="match_parent" android:layout_height="@dimen/dp66" android:layout_alignParentBottom="true" android:orientation="horizontal">
        <RadioButton  style="@style/BottomNavBarOfMain" android:text="一" android:paddingTop="10dp" android:background="@drawable/six_main_nav_btn_sel" android:id="@+id/rbRecodeModuleMain" android:drawableTop="@drawable/six_main_record" />
        <RadioButton  android:text="二" style="@style/BottomNavBarOfMain" android:paddingTop="10dp" android:background="@drawable/six_main_nav_btn_sel" android:drawableTop="@drawable/six_main_team" android:id="@+id/rbTeamModuleMain" />
        <RadioButton  android:text="三" style="@style/BottomNavBarOfMain" android:paddingTop="10dp" android:background="@drawable/six_main_nav_btn_sel" android:drawableTop="@drawable/six_main_find" android:id="@+id/rbFindModuleMain" />
        <RadioButton  android:text="四" style="@style/BottomNavBarOfMain" android:paddingTop="10dp" android:background="@drawable/six_main_nav_btn_sel" android:drawableTop="@drawable/six_main_mine" android:id="@+id/rbMineModuleMain"/>
    </RadioGroup>
</RelativeLayout>

效果图

style代码:

<!--nav bar of bottom in main activity -->
    <style name="BottomNavBarOfMain">
        <item name="android:layout_width">0dp</item>
        <item name="android:layout_height">match_parent</item>
        <item name="android:button">@null</item>
        <item name="android:layout_weight">1</item>
        <item name="android:gravity">center</item>

    </style>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读