默认情况下,每个活动中只有主页图标会突出显示。
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<div id="box-select">
<select @change="onChange($event.target.value)">
<option
is="my-row"
v-for="item in items"
v-bind:title="item.title"
v-bind:value="item.id"
>
</option>
</select>
<!-- <view-option v-for="item in items" :item="item" :key="item.id"></view-option> -->
{{newTodoText}}
</div>
或activity_main.xml
或菜单xml文件?按下登录图标,但主页变亮: selector.xml
nav_items.xml-menu item I pressed the second icon,activity is changed but still home is getting highlighted in emulator
答案 0 :(得分:1)
尝试一下
在类似
的可绘制文件夹中添加selector.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/beyaz" android:state_enabled="true" />
<item android:color="@color/colorPrimaryDark" android:state_enabled="false" />
</selector>
在activity_main.xml中添加app:itemIconTint="@drawable/selector"
<android.support.design.widget.BottomNavigationView
app:itemIconTint="@drawable/selector"
/>