如何在android studio中使用BottomNavigationViewEx更改或添加图标后面的形状
我使用BottomNavigationViewEx,我想在我的底部导航中做类似的事情,我想更改或添加图标后面的形状,只更改中心项目的位置 我尝试将此函数定位到bottomNavigationViewEx.setItemHeight(130),但所有项目都一起移动如何在android studio中使用BottomNavigationViewEx更改或添加图标后面的形状,android,bottomnavigationview,android-bottom-nav-view,Android,Bottomnavigationview,Android Bottom Nav View,我使用BottomNavigationViewEx,我想在我的底部导航中做类似的事情,我想更改或添加图标后面的形状,只更改中心项目的位置 我尝试将此函数定位到bottomNavigationViewEx.setItemHeight(130),但所有项目都一起移动 对于中心图标后面的红色回路,我没有找到解决方案。从底部导航视图隐藏中心项目。并将Fab按钮置于底部导航视图上方。这是底部导航布局的代码 <?xml version="1.0" encoding="utf-8"?> <
对于中心图标后面的红色回路,我没有找到解决方案。从底部导航视图隐藏中心项目。并将Fab按钮置于底部导航视图上方。这是底部导航布局的代码
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_marginTop="60dp"
android:background="@color/white"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/lightGray"
android:layout_marginTop="19dp"></View>
<com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
app:itemIconTint="@color/bottom_nav_color"
android:background="@color/white"
app:menu="@menu/main_menu" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/bootomFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:visibility="visible"
app:fabSize="normal"
android:src="@drawable/ic_add"
app:borderWidth="0dp"
app:elevation="9dp" />
</RelativeLayout>
这是menu.xml的代码
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_favorites"
android:enabled="true"
android:icon="@drawable/ic_list"
android:title=""
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_share"
android:enabled="true"
android:icon="@drawable/ic_share"
android:title="fds"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_nothing"
android:enabled="false"
android:icon="@null"
android:title="fxn"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_sync"
android:enabled="true"
android:icon="@drawable/ic_sync"
android:title=""
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_profile"
android:enabled="true"
android:icon="@drawable/ic_profile"
android:title=""
app:showAsAction="ifRoom" />
</menu>
Android是一种技术,Android Studio只是一个IDE。你对IDE有问题吗?没有,我对IDE没有问题,我忘了写Studio。我只是想知道如何实现如图所示的底部导航难道你不想尝试获取底部导航栏吗?是的,我尝试过,我就是这么做的。。。。。我只是想知道如何改变或添加中心图标后面的形状和改变中心图标的位置,谢谢。但是我如何在底部导航栏中设置浮动按钮,因为我不希望圆圈超出底部导航栏(请参见图片),然后创建背景作为图像中间按钮,并为ImageView和底部视图指定固定高度不要使用浮动操作按钮,而使用ImageView