How to change the border color(un-focused) of an EditText?

后端 未结 6 1962
[愿得一人]
[愿得一人] 2020-12-02 20:05

I changed the background color of the EditText to transperant. Now the EditText looks invisible when not focused. So how can I change the un-focused border color of EditText

6条回答
  •  無奈伤痛
    2020-12-02 20:30

    You can create a linearlayout with background color the color which you want the border should be. Then place the Edit text inside this Linearlayout and give some background color. Eg : if border is grey then background for Linearview is grey. and edit text background black.

    for width of border you can give padding = "1dp" for border_width = "1dp".

提交回复
热议问题