How to change the color of the line in ICS styled EditText

纵然是瞬间 提交于 2019-11-30 18:26:53

问题


I and using ABS together with theme holo in my application and i get EditText styled as if in ICS.

But the line color of the EditText is blue by default and for my design, i need white colored line for the EditText.

I tried changing the background, but it is not working.

Is there any way so that I can change the color from blue line to white programmatically?


回答1:


I found the answer in this link where they are using LayerList

I used a layer-list for creating an ICS styled edittext as it was needed only in one place.

It works great and no issues found with varying screen resolutions. It wont accept a transparent background but works as needed for me!

For Full Customization :

In addition, these are other links where we can customize the ICS styles.

1. ActionBar Sherlock Style Generator

2. Holo Style Generator

3. Holo Theme Custom UI Libraries

Happy Coding..!! :)




回答2:


Try android:background="#00000000" This only for White(or Simply hide the Bottom Line)



来源:https://stackoverflow.com/questions/12470487/how-to-change-the-color-of-the-line-in-ics-styled-edittext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!