小编Seb*_*ruk的帖子

工具栏上的溢出按钮更改颜色

我想在工具栏上更改我的溢出按钮(3个点)的颜色,但我有一个问题...我检查几个主题,我找到了一个解决方案......但它只适用于Android 5.0及更高版本...当然我可以使用colorPrimary来改变它,但它不是我的解决方案..我想只改变溢出按钮的颜色.如果需要额外信息,请评论.

这是我的工具栏的声明:

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/blue_background"
android:elevation="4dp">
Run Code Online (Sandbox Code Playgroud)

这是我的风格:

 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item>
    <!--   your app branding color for the app bar -->
    <item name="colorPrimary">@color/blue_background</item>
    <!--   darker variant for the status bar and contextual app bars -->
    <!--<item name="android:colorPrimaryDark">@color/primary_dark</item>-->

    <!--   theme UI controls like checkboxes and text fields -->
    <item name="colorAccent">@color/search_button</item>

    <item name="android:textColorPrimary">@color/search_button</item>
    <item name="android:textColorSecondary">@color/search_button</item>
    <item name="android:logo">@drawable/dbc_logo_white</item>
    <item name="android:actionOverflowButtonStyle">@style/menuOverflow</item>

</style>

<style name="menuOverflow" parent="Widget.AppCompat.ActionButton.Overflow">
    <item name="android:src">@drawable/ic_action_overflow</item>
</style>
Run Code Online (Sandbox Code Playgroud)

android android-layout

1
推荐指数
1
解决办法
2888
查看次数

标签 统计

android ×1

android-layout ×1