Open VomPom opened 5 years ago
View must be defined in xml file or add into layout by code.
Yeah,I have solved it. I think it's better to encapsulate this view into dialog,so that every time we just need use in java rather in xml.
public void showLoadingDialog() { if (loadingDialog == null) { loadingDialog = new LoadingDialog(this); } loadingDialog.showLoading(); } public void stopLoadingDialog() { if (loadingDialog != null) { loadingDialog.stopLoading(); } }
I want to use it like this?
could it happen?
systemt throws an erro: Attempt to invoke virtual method 'void com.victor.loading.newton.CradleBall.startAnimation(android.view.animation.Animation)' on a null object reference