高亮选中菜单项

0515
panqihua 5 years ago
parent 174661a375
commit 390b97b994
  1. 3
      app/src/main/res/layout/main/layout/activity_main_menu.xml
  2. 1
      app/src/main/res/values/colors.xml
  3. 11
      app/src/main/res/values/styles.xml

@ -36,7 +36,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?android:attr/windowBackground" android:background="?android:attr/windowBackground"
android:textAlignment="gravity" android:textAlignment="gravity"
app:itemTextColor="@color/colorAccent" app:itemTextAppearanceActive="@style/selected_menu"
app:itemTextAppearanceInactive="@style/unselected_menu"
app:labelVisibilityMode="labeled" app:labelVisibilityMode="labeled"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"

@ -5,4 +5,5 @@
<color name="colorAccent">#03DAC5</color> <color name="colorAccent">#03DAC5</color>
<color name="colorBlack">#000000</color> <color name="colorBlack">#000000</color>
<color name="button_unchecked">#00BCD4</color> <color name="button_unchecked">#00BCD4</color>
<color name="colorYellow">#FFEB3B</color>
</resources> </resources>

@ -8,6 +8,17 @@
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<style name="selected_menu">
<item name="android:textColor">@color/colorPrimary</item>
<item name="android:textSize">20sp</item>
</style>
<style name="unselected_menu">
<item name="android:textColor">@color/colorBlack</item>
<item name="android:textSize">16sp</item>
</style>
<style name="AppTheme.NoActionBar"> <style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>

Loading…
Cancel
Save