Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio 3.0 error with sweet-alert-dialog library

Tags:

android

On click to show the dialog this error occurs

java.lang.RuntimeException: Unknown animation-name: cn.pedant.SweetAlert.Rotate3dAnimation error:null

Anybody have solution step by step?

like image 525
Trịnh Minh Avatar asked Nov 09 '17 06:11

Trịnh Minh


1 Answers

Add this library to app/build.gradle:

dependencies {
    ...
    implementation 'com.github.f0ris.sweetalert:library:1.5.1'
}

Usage:

SweetAlertDialog pDialog = new SweetAlertDialog(this, SweetAlertDialog.PROGRESS_TYPE);
pDialog.getProgressHelper().setBarColor(Color.parseColor("#A5DC86"));
pDialog.setTitleText("Loading");
pDialog.setCancelable(false);
pDialog.show();

for more usages about progress read THIS.

like image 182
Alireza Noorali Avatar answered Oct 20 '22 16:10

Alireza Noorali