Border on the left side of the button only

android, border, button, styles

Solution

Try this

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item>
        <shape android:shape="rectangle" >
            <solid android:color="@android:color/transparent" />
        </shape>
    </item>
    <item
        android:bottom="-2dp"
        android:right="-2dp"
        android:top="-2dp">
        <shape>
            <solid android:color="@android:color/transparent" />

            <stroke
                android:width="2dp"
                android:color="#FFF" />
        </shape>
    </item>

</layer-list>

Problem

Here is my button_style.xml which i am including with my button. However, I still can't seem to get the border on the left. Can anyone help me here please? ps - My background should be transparent ``` <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <layer-list> <item android:left="2dp"> <shape android:shape="rectangle"> <stroke android:width="1dp" android:color="#999999"/> </shape> </item> </layer-list> </selector> ```

Original source

Related problems