Change background color of edittext in android

前端 未结 10 1661
一个人的身影
一个人的身影 2020-12-25 12:00

If I change the background color of my EditText using the below code, it looks like the box is shrunken and it doesn\'t maintain the ICS theme of a blue bottom

10条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-25 12:36

    What you should do is to create a 9 patch image for edittext and set that image as edit text background. You can create 9 patches using this website

    I am attaching a sample 9 patch image for your reference.Use it as edittext background and you will get an idea.Right click the image and select "save image as". When you save the image dont forget to give its extension as "9.png"

    enter image description here

提交回复
热议问题