【发布时间】:2018-03-01 09:24:42
【问题描述】:
我用过
setTheme(R.style.Theme_AppCompat);
将我的应用主题设置为更暗。 现在我遇到了导航栏中所选项目相对较暗的问题,因此用户几乎看不到它。
我可以在我的风格中使用什么来让选定的导航项变成另一种颜色吗? 这是它的图片
这是我的 activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible"
tools:context="at.mrminemeet.asciimoji.MainActivity">
.....
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?android:attr/windowBackground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/navigation"/>
</android.support.constraint.ConstraintLayout>
【问题讨论】:
-
请发布活动的 xml 代码。你在使用 BottomNavigationView 吗?
-
@AnuraagBaishya 我现在添加了 XML
标签: java android android-studio-3.0 app-themes android-navigation-bar