Rounded Corner buttons android Snippet

Required Tags

  • Shape: Choose rectangle shape android:shape="rectangle"
  • Solid: give it a solid background
  • Corner Radius

XML

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle">
  <solid android:color="@color/MY_BUTTON_COLOR" />
  <corners android:radius="5dp" />
</shape>

Preview