5

I am using Holo dark as the theme of my app. However, there is part of it where I wish to use the EditText from holo light as the background is light in this part. I have tried doing it in themes. It worked when I did something similar for a button (we wanted to use the gingerbread style button):

<style 
       name="Theme.Banks" parent="Theme.Sherlock.ForceOverflow">
       <item name="android:buttonStyle">@android:style/Widget.Button</item>
</style>

I tried doing the same with android:editTextStyle, but it does not affect the drawable. That is handled by the attribute android:editTextBackground. Looking into the code, I cannot just override this and point it at the light theme because it references a private drawable:

This is from themes.xml in the SDK:

<item name="editTextBackground">@android:drawable/edit_text_holo_dark</item>

So my question is how to do this?

Another use case might be wishing to use the EditText from gingerbread.

Any ideas?

NagarjunaReddy
  • 8,621
  • 10
  • 63
  • 98
steprobe
  • 1,659
  • 3
  • 17
  • 32

1 Answers1

0

You could grab the drawables that you need out of the the sdk res folder and include them with your own project then reference your own copy of the holo light drawables for that one EditText.

Seems inefficient, but I am not sure of any other way to get around your style issue.

FoamyGuy
  • 46,603
  • 18
  • 125
  • 156