SearchView honeycomb
How do I change the color of a search widget's text
<item android:id="@+id/menu_search"
android:title="Search"
android:icon="@drawable/ic_menu_search"
android:showAsAction="ifRoom"
android:textColor="@color/black" <---- this does not work.
android:actionViewClass="android.widget.Sea开发者_JAVA技巧rchView" />
I created my own view but it looked terrible, is there a way to override text color.
Or do you know where the source/GIT of this widget is. Google did not do it for me :)
Try this :
SearchView searchView = new SearchView(canvas.getContext());
searchView.setBackgroundColor(Color.WHITE);
I don't think you can customize the text inside the searchView. You would have to set the color of the searchView itself.
精彩评论