<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:appcompat="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainActivity">
<item
android:id="@+id/action_search"
android:icon="@drawable/search"
appcompat:actionViewClass="android.support.v7.widget.SearchView"
appcompat:showAsAction="ifRoom"
android:title="Search"/>
</menu>
我想改变search image在右上角,目前它是黑色的,我想将它变为橙色如何自定义android中工具栏上的搜索图标?
参考http://stackoverflow.com/questions/10445760/how-to-change-the-default-icon-on-the-searchview-to-be-use-in-the-action-bar-on – sasikumar
目前它是黑色的。这是一个图像有黑色。您必须创建一个颜色为橙色的图像。并取代它! –
已经尝试过,但不能正常工作 –