android底部中间凸出导航 BottomProtruding
16lz
2021-12-04
实现效果:
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> |
具体就不详细说了 直接看代码 点击打开链接
如果有更好 欢迎给推荐!!!
更多相关文章
- android-使App全屏 - 随心
- android百度地图 覆盖物弹出层效果
- AndroidStudio用gradle编译中文乱码
- android 底部菜单写法之FragmentTabHost
- android 自定义progressbar 样式
- android常用
- android用于打开各种文件的intent
- Android(安卓)Studio Exception: Could not find method android
- Android实现振动效果