解决方案1:
<style name="Apptheme" parent="@style/theme.Base.AppCompat.light.DarkActionbar"> <item name="actionbarWidgettheme">@style/YourActionbarWidget</item></style><style name="YourActionbarWidget" parent="@style/theme.AppCompat"> <item name="searchVIEwCloseIcon">@drawable/xxx</item></style>
解决方案2:
final Drawable upArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_Alpha);upArrow.setcolorFilter(getResources().getcolor(R.color.WHITE),PorterDuff.Mode.SRC_Atop);getSupportActionbar().setHomeAsUpIndicator(upArrow);
我的项目styles.xml
<style name="Toolbartheme" parent="@style/theme.AppCompat.light"> <item name="colorPrimary">@color/blue</item> <item name="colorPrimaryDark">@color/blue</item> <item name="windowNoTitle">true</item> <item name="windowActionbar">false</item> <item name="drawerArrowStyle">@style/DrawerArrowStyle</item> <item name="androID:itemTextAppearance">@style/myCustomMenuTextApearance</item> <item name="androID:actionMenuTextcolor">@color/white</item> <item name="actionMenuTextcolor">@color/white</item> </style><style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle"> <item name="spinbars">true</item> <item name="color">@color/white</item> <item name="gapBetweenbars">2.5dip</item> <item name="thickness">2dp</item> </style>
我的确切问题的屏幕截图:
请帮我解决我的问题.任何类型的解决方案和建议对我都有帮助.感谢您的支持.
解决方法 如果您在工具栏上搜索白色图标在工具栏标签上添加这些
androID:theme="@style/themeOverlay.AppCompat.Dark.Actionbar"总结
以上是内存溢出为你收集整理的在Android工具栏中更改背面和清除图标的SearchView颜色全部内容,希望文章能够帮你解决在Android工具栏中更改背面和清除图标的SearchView颜色所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)