Open mbohnearschi opened 4 years ago
did you get the solution?
I want to set a custom Yellow color, but it sets Dark Grey color.
.setConfirmButtonBackgroundColor(R.color.colorAccent)
Me too.I want to change button background color,but it not show.
SweetAlertDialog sDialog = new SweetAlertDialog(UserComplaintRegistration.this,SweetAlertDialog.WARNING_TYPE); sDialog.setTitleText("a")); sDialog.setCancelable(false); sDialog.setConfirmButtonBackgroundColor(Color.parseColor("#fffc3061"));
or
sDialog.setConfirmButtonBackgroundColor(ContextCompat.getColor(context,R.color.colorPrimary));
this worked for me
Caused by: java.lang.ClassCastException: android.graphics.drawable.RippleDrawable cannot be cast to android.graphics.drawable.StateListDrawable
Please resolve this issue. Anyone got solution for this error?
// alert_dialog
<Button ....
to
<androidx.appcompat.widget.AppCompatButton ...
this worked for me