How to change the color of a focused EditText when using “android:Theme.Holo.Light”?

前端 未结 2 1158
野的像风
野的像风 2021-01-05 14:39

I Am using \"android:Theme.Holo.Light\" in my application, it gives blue as the Default color. I want to have a EditText when focused like below.

2条回答
  •  情书的邮戳
    2021-01-05 14:55

    May this help you:

    You will have to create/modify your own NinePatch image to replace the default one, and use that as the background of your EditText. If you look in your SDK folder, under your platform, then res/drawable, you should find the NinePatch image for the EditText focus state. If that's all you want to change, you can just pull it into Photoshop, or whatever image editing software you have, and change the orange color to a color of your choosing. Then save that into your drawable folder.

    For example:

    edittext_modified_states.xml

    
    
             
             
         
    
    

提交回复
热议问题