Skip to content

Instantly share code, notes, and snippets.

@lsurvila
Last active June 12, 2018 13:56
Show Gist options
  • Save lsurvila/53d5e8ad803044e474313417ab51dedb to your computer and use it in GitHub Desktop.
Save lsurvila/53d5e8ad803044e474313417ab51dedb to your computer and use it in GitHub Desktop.
Button with round borders
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight"
>
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="#327DDF"/>
<corners android:radius="4dp"/>
</shape>
</item>
<item android:drawable="@drawable/rounded_border"/>
</ripple>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:radius="4dp"/>
<solid android:color="#327DDF"/>
<stroke
android:width="1dp"
android:color="@color/white"
/>
</shape>
</item>
<item android:drawable="@drawable/rounded_border"/>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="4dp"/>
<stroke
android:width="1dp"
android:color="@color/white"
/>
</shape>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment