java - 我的导航栏上的第一个图标是蓝色的,并且比其他图标大,我该如何更改?
问题描述
Android Studio 的全新用户在这里,我正在尝试将电影评论应用程序作为学校项目。
所以这里的问题是我主页的导航栏上会有几个图标,但由于某种原因,第一个图标总是蓝色并且比其他图标大,我不知道如何解决这个问题,正如你在图片。图片
这是我的 homepage.xml 和 nav_items.xml 的 XML
主页
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:background="#FFFFFF"
tools:context=".Homepage">
<android.support.design.widget.BottomNavigationView
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
app:menu="@menu/nav_items"></android.support.design.widget.BottomNavigationView>
</RelativeLayout>
导航项.XML
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:icon="@drawable/ic_input_black_24dp"
android:title="@string/nav_list" />
<item
android:icon="@drawable/outline_home_black_24"
android:title="@string/nav_home" />
</menu>
解决方案
如果默认为蓝色,则表示已选中。
推荐阅读
- java - 将未知反射类的类型更改为泛型类型
- java - Java为什么“readAllBytes”和“readNBytes”方法不同步?
- python - 由于 OSError,推送到 Heroku 失败,命令“python setup.py egg_info”失败,错误代码为 1
- php - 选择记录仅限于具有第二个表的特定值的记录
- css - 扩展引导导航栏,仅向右,双色
- yaml - 映射中的yaml锚?
- python - 在 IDLE 未显示且 IDLE 子进程未建立连接的情况下进行编辑
- python - 使用 matplotlib 保存 2D 动画
- azure - 我们如何使用事件网格和服务总线改进我们的架构?
- java - 比较器如何工作?