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.
问题:
回答1:
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
回答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
回答3:
You should probably use the HoloEveryWhere Library. It allows you to use the Holo themes on older API levels.