-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full of Bug #78
Comments
You have to hide spinkit right after your data has loaded call this to show it again: |
@Bobby-Anggunawan not working i have already tried your code this library is causing memory leak and the same issue is happening again, this time null Pointer exception is thrown public void dialogShow (Context context, String msg) {
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
</androidx.cardview.widget.CardView> Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.ybq.android.spinkit.SpinKitView.setVisibility(int)' on a null object reference what the hell is wrong with this library.? |
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/white"
android:layout_margin="@dimen/dp_10"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="@dimen/dp_5"
app:cardUseCompatPadding="true"
app:contentPadding="@dimen/dp_5"
android:layout_height="wrap_content">
</androidx.cardview.widget.CardView>
public void dialogShow (Context context, String msg) {
progressDialog = new Dialog(context);
progressDialog.setCancelable(false);
progressDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
progressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
Display display = ((Activity) context).getWindowManager().getDefaultDisplay();
int screenWidth = display.getWidth();
progressDialog.setContentView(R.layout.dialog_custom_progress);
SpinkKitView progressBar = (SpinKitView) findViewById(R.id.spin_kit);
progressDialog.show();
progressDialog.getWindow().setLayout((int) (screenWidth / 1.1), LinearLayout.LayoutParams.WRAP_CONTENT);
}
// if (progressDialog!=null){
// progressDialog.dismiss();
// }
}
The spin kit never stops spinning it rotates infinitely. Is there any way to stop this
The text was updated successfully, but these errors were encountered: