android底部中间凸出导航 BottomProtruding
16lz
2021-01-23
实现效果:
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百度地图 覆盖物弹出层效果
- Anko:Android 代码动态布局的新方案
- android给view比如layout等添加阴影效果
- Android 获取系统权限的代码
- 编译代码报出Android library projects cannot be launched错误
- 解决Eclipse3.6中Android 代码自动补全卡死的问题
- imageView动画效果
- android 下测试网络的丢包率和延迟 的代码
- android中实现指针滑动的动态效果