android底部中间凸出导航 BottomProtruding - Go语言中文社区

android底部中间凸出导航 BottomProtruding


实现效果:






layout ---->.mxl

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:background="#fff">

        <FrameLayout
            android:id="@+id/fl"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@+id/nihao">

        </FrameLayout>


        <View
            android:id="@+id/nihao"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_above="@+id/rg_oper"
            android:layout_marginBottom="5dp"
            android:background="@color/stroke_line" />




        <RadioGroup
            android:id="@+id/rg_oper"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:background="#00000000"
            android:orientation="horizontal"
            android:paddingBottom="@dimen/paddingBottom_5">

            <RadioButton
                android:id="@+id/rd_analysis"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="#fff"
                android:button="@null"
                android:checked="true"
                android:drawablePadding="3dp"
                android:drawableTop="@drawable/operationmanage_selector"
                android:gravity="center"
                android:layout_marginLeft="5dp"
                android:text="@string/analysis"
                android:textColor="@drawable/index_textcolor_selecter"
                android:textSize="@dimen/text_size_12" />

            <RadioButton
                android:id="@+id/rd_educationadmin"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="#fff"
                android:button="@null"
                android:drawablePadding="3dp"
                android:drawableTop="@drawable/operationmanage_edu_selector"
                android:gravity="center"
                android:text="@string/education_admin"
                android:textColor="@drawable/index_textcolor_selecter"
                android:textSize="@dimen/text_size_12" />


            <RadioButton
                android:id="@+id/rd_daily"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="#fff"
                android:button="@null"
                android:clipChildren="false"
                android:gravity="center|bottom"
                android:text="@string/daily"
                android:textColor="@drawable/index_textcolor_selecter"
                android:textSize="@dimen/text_size_12" />

            <RadioButton
                android:id="@+id/rd_finance"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="#fff"
                android:button="@null"

                android:drawablePadding="3dp"
                android:drawableTop="@drawable/operationmanage_fiance_selector"
                android:gravity="center"
                android:text="@string/finance"
                android:textColor="@drawable/index_textcolor_selecter"
                android:textSize="@dimen/text_size_12" />

            <RadioButton
                android:id="@+id/rd_me"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="#fff"
                android:button="@null"
                android:drawablePadding="3dp"
                android:drawableTop="@drawable/operationmanage_me_selector"
                android:gravity="center"
                android:text="@string/me"
                android:textColor="@drawable/index_textcolor_selecter"
                android:textSize="@dimen/text_size_12"
                android:layout_marginRight="5dp"/>
        </RadioGroup>

        <ImageView
            android:id="@+id/img_protruding"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="23dp"
            android:src="@mipmap/day_protruding_false" />
    </RelativeLayout>

</LinearLayout>


具体就不详细说了 直接看代码 点击打开链接


如果有更好  欢迎给推荐!!!

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/u014133119/article/details/80624584
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-04-18 23:16:42
  • 阅读 ( 916 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢