更改操作栏搜索查看提示文本颜色 [英] Changing action bar searchview hint text color
问题描述
我如何更改操作栏搜索视图提示文本的颜色?
How can I change the action bar search view hint text colour?
此问题,说明如何使用ABS时,得到的EditText: Android的动作条自定义搜索查看
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?
推荐答案
安卓actionBarWidgetTheme 的你的主旋律应该指向具有的 Android的一个风格:textColorHint 的中它。其中一个将允许改变搜索视图的提示文本的颜色。
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屋!