michaelye / EasyDialog

A lightweight, flexible tip dialog in Android
Other
705 stars 191 forks source link

Crashes when not using on ui thread #23

Open danvinokour opened 8 years ago

danvinokour commented 8 years ago

android.util.AndroidRuntimeException: Animators may only be run on Looper threads at android.animation.ValueAnimator.start(ValueAnimator.java:1002) at android.animation.ValueAnimator.start(ValueAnimator.java:1050) at android.animation.ObjectAnimator.start(ObjectAnimator.java:829) at android.animation.AnimatorSet.start(AnimatorSet.java:585) at com.michael.easydialog.EasyDialog.onDialogDismiss(EasyDialog.java:526) at com.michael.easydialog.EasyDialog.dismiss(EasyDialog.java:591)

It happens because i used TimerTask to dismiss EasyDialog with animation. i can run it on ui thread but i think that EasyDialog should allow usage from any thread.

michaelye commented 8 years ago

@danvinokour Ok,I know what you mean, I will fix this issue in next version.Thanks!