I'm defining a selector background for an edit text and I would like to have a bottom line when the edit text is focused.
This is what I would like to achieve:
So far I have this:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<stroke
android:width="1dp"
android:color="@android:color/black" />
<corners android:radius="3dp" />
</shape>
</item>
<item>
<shape android:shape="line">
<stroke android:color="@android:color/black" android:width="1dp"/>
</shape>
</item>
</layer-list>
which shows the line exactly in the middle, and I would like to have it at the bottom, with also a left and right padding.
Is there a way to achieve that using layer-list, or maybe is there a better approach?