Skip to content

Instantly share code, notes, and snippets.

@addeeandra
Created April 26, 2019 20:39
Show Gist options
  • Save addeeandra/a96f38eeec45d17a408715681f0ef09b to your computer and use it in GitHub Desktop.
Save addeeandra/a96f38eeec45d17a408715681f0ef09b to your computer and use it in GitHub Desktop.
Button Rounded Primary - with selector
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/btn_rounded_primary_disabled"/>
<item android:state_pressed="true" android:drawable="@drawable/btn_rounded_primary_pressed"/>
<item android:drawable="@drawable/btn_rounded_primary_normal"/>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="@dimen/btn_radius_md"/>
<solid android:color="@color/colorPrimaryDisabled"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="@dimen/btn_radius_md"/>
<solid android:color="@color/colorPrimary"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="@dimen/btn_radius_md"/>
<solid android:color="@color/colorPrimaryDark"/>
</shape>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment