2

I have searched lot of sites for creating ICS holo style EditText in Android older versions. But the results did not helped me. Please provide me some sample links/code.

Cyril Gandon
  • 16,830
  • 14
  • 78
  • 122
Dinesh
  • 965
  • 2
  • 11
  • 23
  • 1
    check this link , it might help you--http://www.basic4ppc.com/forum/basic4android-updates-questions/19014-ics-style-edittext.html – riti Oct 30 '12 at 09:26
  • Have you checked this link - http://stackoverflow.com/a/8212093/614807 – Chirag Oct 30 '12 at 09:27
  • 1
    I think the ActionBarSherlock project integrates themes that mimic ICS's Holo. It also allows you to integrate several features from ICS+ in older versions of Android, such as (unsurprisingly) the ActionBar. – mbrenon Oct 30 '12 at 09:28

3 Answers3

2

Copy the images from the android-sdk folder, and use them.

Search here for textfield_bg_*

/android-sdks/platforms/android-16/data/res/drawable-mdpi

Kumar Bibek
  • 9,016
  • 2
  • 39
  • 68
2

Basically you want to download this xml selector drawable and put it as the background of each EditText: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/drawable/edit_text_holo_light.xml

(If you want holo dark then just replace each instance of "light" with "dark", obviously.)

Then you need to find each of the drawables referenced in that selector and download them into your res folder in the appropriate size category. You can use that github project to search for them - for example, the xhdpi version of textfield_multiline_default_holo_light can be found at https://github.com/android/platform_frameworks_base/blob/master/core/res/res/drawable-xhdpi/textfield_multiline_default_holo_light.9.png

Adam
  • 713
  • 1
  • 8
  • 16
1

You should probably use the HoloEveryWhere Library. It allows you to use the Holo themes on older API levels.

TrtG
  • 2,778
  • 6
  • 26
  • 39