Android: outer EditText border stroke

33 views Asked by At

I'm using the following XML shape to add a coloured border to any EditText of my app to indicate it is focused:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <corners android:radius="10dp" />
            <solid android:color="#ffffff"/>
            <stroke android:width="3dp" android:color="#FFC300"/>
        </shape>
    </item>
</layer-list>

And, as you can see in the attached picture below, it's working fine:

Bordered EditText

The fact is that the stroke -relative to the EditText- is inner and I'd like it to be outer (or, maybe, 50% inner 50% outer), so to highlight the focused EditText from the others even more, but I don't know how to do it.

What can I try next?

0

There are 0 answers