为了账号安全,请及时绑定邮箱和手机立即绑定

老师我想问问这种导航怎么做呀

就您这章显示的这种导航怎么做 

正在回答

3 回答

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:drawable="@color/material_blue_grey_800"
        android:state_checkable="true"/>
    <item android:drawable="@color/material_blue_grey_800"
        android:state_pressed="true"/>
    <item android:drawable="@color/background_floating_material_light"/>
</selector>


0 回复 有任何疑惑可以回复我~
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/frame"
        android:orientation="vertical"
        ></LinearLayout>

    <RadioGroup
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/radiogroup"
        android:layout_alignParentBottom="true"
        android:gravity="center_horizontal"
        android:orientation="horizontal"
        >
        <RadioButton
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:id="@+id/first"
            android:layout_weight="1"
            android:button="@null"
            android:gravity="center_horizontal"
            android:text="静态加载"
            android:drawableTop="@mipmap/ic_launcher"
            android:background="@drawable/radio_press"
            />
        <RadioButton
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:id="@+id/second"
            android:layout_weight="1"
            android:button="@null"
            android:gravity="center_horizontal"
            android:text="动态加载"
            android:drawableTop="@mipmap/ic_launcher"
            android:background="@drawable/radio_press"
            />

        <RadioButton
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:id="@+id/third"
            android:layout_weight="1"
            android:button="@null"
            android:gravity="center_horizontal"
            android:text="生命周期"
            android:drawableTop="@mipmap/ic_launcher"
            android:background="@drawable/radio_press"
            />

        <RadioButton
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:id="@+id/fourth"
            android:layout_weight="1"
            android:button="@null"
            android:gravity="center_horizontal"
            android:text="传值通信"
            android:drawableTop="@mipmap/ic_launcher"
            android:background="@drawable/radio_press"
            />




    </RadioGroup>



</RelativeLayout>


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Android攻城狮的第二门课(第1季)
  • 参与学习       111172    人
  • 解答问题       1457    个

本课程由浅入深地带您学会Android的常用控件的开发和使用

进入课程

老师我想问问这种导航怎么做呀

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信