I have an EditText view which I need to look like below (focused and non-focused versions).


Also I have two following images:


Can I somehow just set these images as a background to make EditText look like above, not depending on its width? Or do I need to create some additional image files? Or some other solution? I’m a complete newbie in designing UI, so I’d appreciate any help and any comments on subject.
You first need to create a 9-patch graphic for each of your images. These specify how the image is stretched, and how the content is padded.
Then, you need to create a
selectorxml drawable to use one image or the other, based on theEditTextstate.