How to set rounded buttons with background color and change color on pressed
In my android app there is a rounded rectangle button with green colored background. i did this using .xml file <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:padding="10dp" android:shape="rectangle" > <solid android:color="#B5D397" /> <corners android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" android:topLeftRadius="10dp" android:topRightRadius="10dp" /> </shape> and android:background="@drawable/rounded_btn" in layout file but when i press button is wasn't showing any effect(no change is color) so i used