Skip to content

Instantly share code, notes, and snippets.

@CiTuX
Last active September 19, 2024 01:50
Show Gist options
  • Save CiTuX/5031751 to your computer and use it in GitHub Desktop.
Save CiTuX/5031751 to your computer and use it in GitHub Desktop.
Android xml drawable with a bottom stroke
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="-6dp"
android:left="-6dp"
android:right="-6dp"
android:bottom="0dp">
<shape android:shape="rectangle">
<solid android:color="#88FFFF00"/>
<stroke
android:width="5dp"
android:color="#FF000000"/>
</shape>
</item>
</layer-list>
@vadiole
Copy link

vadiole commented Apr 17, 2022

shorter version

<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:insetLeft="-6dp"
    android:insetTop="-6dp"
    android:insetRight="-6dp"
    android:insetBottom="0dp">
    <shape android:shape="rectangle">
        <solid android:color="#88FFFF00" />
        <stroke
            android:width="5dp"
            android:color="#FF000000" />
    </shape>
</inset>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment