Button's circular corner radius returns to square after calling revert animation.
basusingh opened this issue · 1 comments
I'm currently using this code to make the corners rounded for the button.
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="false" android:state_selected="false"> <shape android:shape="rectangle"> <corners android:radius="50dp" /> <solid android:color="@color/home_gradient_3_3" /> </shape> </item> </selector>
applying it as this in the button:
android:background="@drawable/round_button_dark"
The button is now rounded around the corners. When I call startAnimation(), the animation starts but if I call revertAnimation(), the button goes back to its original shape with sharp (rectangle) corners.
Should I use any other login to make it the corners rounded?
Solved. The issue was in:
app:initialCornerAngle="0dp"
changed it to:
app:initialCornerAngle="50dp"