I am trying to change the cursor color of my SearchView which I instantiate and add in my action bar like this:
MenuItem findItem = menu.findItem(R.id.menu_action_search);
searchView = (SearchView) findItem.getActionView();
Xml code:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
>
<item android:id="@+id/menu_action_search"
android:title="Search"
android:icon="@drawable/ic_search_white"
app:showAsAction="collapseActionView|always"
app:actionViewClass="android.support.v7.widget.SearchView" />
</menu>
And my activity has a Toolbar like this:
<android.support.design.widget.AppBarLayout
android:id="@+id/appbarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
style="@style/EActionBar"
/>
</android.support.design.widget.AppBarLayout>
Is there a way to override an existing style and change the cursor color of the autocomplete text view?