Round corner, change background when focuses, overlay text in EditText

Hi Guys, To create rounded corners background shape with selector you need some simple steps to create xml files in drawable resource directory of android application. I will guide you in details to create EditText background as you can see in top image. 1. First you need to create edit_text_normal_bg.xml in res/drawable folder

  1. Then create another file

edit_text_focuses_bg.xml which acts when your EditText is in focused state

3.Now its time to create a selector xml file with name

edit_text_bg_selector.xml

4.Now you create or edit your activity_main xml layout file with following content

activity_main.xml

Note : I have used some colors in drawables, These are followings.

Categories: Android,UI

Tags:

Leave A Reply

Your email address will not be published.