How To Change Color Of Search Bar In Android Studio

[Solved] How To Change Color Of Search Bar In Android Studio | Kotlin - Code Explorer | yomemimo.com
Question : how to change color of search bar in android studio

Answered by : hannan

You can modify your search view with a costume style in `styles.xml' :
<style name="AppSearchView" parent="Widget.AppCompat.SearchView" > <!-- Text Size --> <item name="android:textSize">@dimen/textSizePrimary</item> <!-- Query Text Color --> <item name="android:textColorPrimary">@color/textColorPrimary</item> <!-- Hint Color --> <item name="android:textColorHint">@color/textColorDisabled</item> <!-- Icon Color --> <item name="android:tint">@color/textColorPrimary</item>
</style>
then use this style in your search view :
<android.support.v7.widget.SearchView android:layout_width="match_parent" android:layout_height="wrap_content" ... app:theme="@style/AppSearchView" />

Source : | Last Update : Fri, 13 May 22

Answers related to how to change color of search bar in android studio

Code Explorer Popular Question For Kotlin