G'day. I'm trying to customise the searchview as I have a white toolbar with blue-ish text. When I go in "search mode" the text is visible, but the back arrow and the "X" are the same color as the background.
My code for the search item is:
<item
android:id="@+id/search"
android:icon="@drawable/ic_search_black_24dp"
app:showAsAction="collapseActionView|ifRoom"
android:title="@string/search"
app:actionViewClass="android.support.v7.widget.SearchView" />
Then I change the searchView text and hint color using:
EditText searchEditText = (EditText) searchView.findViewById(android.support.v7.appcompat.R.id.search_src_text);
searchEditText.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary));
searchEditText.setHintTextColor(ContextCompat.getColor(getApplicationContext(), R.color.transparentBar));
How can I change the back and X icons?