如何创建旧版本的ICS全息风格编辑文本? [英] How to create ICS holo style edit text for older versions?
问题描述
我已经搜索很多网站创建ICS的HOLO在的Android
老版本的风格的EditText
。但结果并没有帮助我。请给我提供了一些示例链接/ code。
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.
推荐答案
基本上你要下载这个XML选择绘制并把它作为各个背景的EditText
:
<一href=\"https://github.com/android/platform_frameworks_base/blob/master/core/res/res/drawable/edit_text_holo_light.xml\" rel=\"nofollow\">https://github.com/android/platform_frameworks_base/blob/master/core/res/res/drawable/edit_text_holo_light.xml
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.)
然后,你需要找到每个在选择中引用的可绘制,并将它们下载到您的res文件夹中适当的大小类别。您可以使用GitHub的项目寻找它们 - 例如,textfield_multiline_default_holo_light的xhdpi版本可以在<一个找到href=\"https://github.com/android/platform_frameworks_base/blob/master/core/res/res/drawable-xhdpi/textfield_multiline_default_holo_light.9.png\" rel=\"nofollow\">https://github.com/android/platform_frameworks_base/blob/master/core/res/res/drawable-xhdpi/textfield_multiline_default_holo_light.9.png
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
这篇关于如何创建旧版本的ICS全息风格编辑文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!