最近项目底部导航栏需要做成中间的条目选中凸起,未选中不凸起的效果,自己写了个,先贴出来代码先。。
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clipChildren="false"
>
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ll_bottom"
android:background="@color/white"/>
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:clipChildren="false"
android:orientation="horizontal">
android:id="@+id/rl1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="1">
android:id="@+id/iv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/tv1"
android:layout_centerInParent="true"