How to create ICS holo style edit text for older v

2019-07-16 13:04发布

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.

3条回答
聊天终结者
2楼-- · 2019-07-16 13:32

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

查看更多
三岁会撩人
3楼-- · 2019-07-16 13:34

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

查看更多
走好不送
4楼-- · 2019-07-16 13:53

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

查看更多
登录 后发表回答