更改操作栏搜索视图提示文本颜色 [英] Changing action bar searchview hint text color
问题描述
如何更改操作栏搜索视图提示文本颜色?
How can I change the action bar search view hint text colour?
这个问题解释了使用ABS时如何获取EditText:Android ActionBar 自定义搜索视图
This question explains how to get the EditText when using ABS: Android ActionBar Customize Search View
是否有一个 android.R.id 我可以用来获取对 EditText 的引用,以便我可以更改提示颜色?或者有什么其他方法可以改变颜色?
Is there a android.R.id I could use to get a reference to the EditText so I could change the hint colour? Or is there some other way to change the colour?
推荐答案
android:actionBarWidgetTheme 你的主主题应该指向一个在它.那将允许更改搜索视图的提示文本颜色.
android:actionBarWidgetTheme of your main theme should point to a style that has a android:textColorHint in it. That one will allow changing the hint text color of the search view.
这篇关于更改操作栏搜索视图提示文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!