0

So I have been through the wild wild west. But as if all the magic paths weren't enough, I am having the opposite problem as they: my SearchView's text color is white. And no matter what I do I cannot change it to black. Of course I first went with the style approach, since it keeps out the voodoo. But nothing works no matter what theme I use. So I tried the magical approaches mentioned in the referenced wild wild west, but nothing there works for me either. To begin with I am afraid of their approach as it is inherently susceptible to failure from device to device, etc. All the same, I tried them. Does anyone else have some different information/approach on how to make this work?

My api level is 11 and up.

Community
  • 1
  • 1
learner
  • 11,490
  • 26
  • 97
  • 169
  • I think `SearchView` inside is an `EditText` not `TextView` , so can cast it to EditText? And yeah `EditText` parent is `TextView`. so can u try it? . I havent tried it though. – Spurdow Oct 02 '14 at 17:59
  • and use the answer of [wild wild west](http://stackoverflow.com/questions/11321129/is-it-possible-to-change-the-textcolor-on-an-android-searchview)? – Spurdow Oct 02 '14 at 18:06
  • Changing Color.WHITE to Color.BLACK in wild wild west answer didn't work? – Clint Deygoo Oct 02 '14 at 18:14
  • @ClintDeygoo per your comment I tried them all again. They all failed except FerranMaylinch's answer. My previous rendition had a break statement at the end of the for-loop (after the call to setTextColor). On the **fear** side, I have seen presumptuous code like this break in iOS all the time: i.e. in one version it's a single for-loop; then before you know it Apple changes the architecture to a nested for-loop. So is there a way to get the theme stuff to work; so I don't have to worry about device specifications? – learner Oct 02 '14 at 18:34

0 Answers0