I have an app with light theme but dark actionbar. So my colorControlActivated is my primary color (green) and with the light background, the edittext cursors are green. The problem is that my actionbar is green so when using the search text in the actionbar I don't see the cursor because it's the same color. How can I change the cursors color to white just in the actionbar?
Asked
Active
Viewed 508 times
1 Answers
1
SearchView
is a complex view, which consists from multiple views, including EditText
. So you can get AutoCompleteTextView
from it, using findViewById()
or reflection. If you use support lib, you can use next code.
searchView.findViewById(android.support.v7.appcompat.R.id.search_src_text);
Then just set cursor to AutoCompleteTextView
.

Ufkoku
- 2,384
- 20
- 44
-
and how do i set cursor? – Yamila Dec 11 '17 at 21:56
-
@Yamila `AutoCompleteTextView` is `EditText` so you can use any method, that is described for EditText, for example here https://stackoverflow.com/a/26543290/3858030 – Ufkoku Dec 11 '17 at 22:07