Skip to content
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

Keeps crashing on Android7.0 #14

Closed
AndroidDeveloperMCT opened this issue Nov 15, 2019 · 19 comments
Closed

Keeps crashing on Android7.0 #14

AndroidDeveloperMCT opened this issue Nov 15, 2019 · 19 comments
Assignees

Comments

@AndroidDeveloperMCT
Copy link

AndroidDeveloperMCT commented Nov 15, 2019

On Nougat, it was keep crashing with .setAnimation("delete_anim.json") method and there is not a single Log, can you please test

@AndroidDeveloperMCT AndroidDeveloperMCT changed the title Keeps crashong on Android7.0 Keeps crashing on Android7.0 Nov 15, 2019
@PatilShreyas
Copy link
Owner

Hi @mf-mindcrewtech, can you provide your implemention?

@AndroidDeveloperMCT
Copy link
Author

private BottomSheetMaterialDialog mAnimatedBottomSheetDialog;

private void showDelete(){

    try {
        mAnimatedBottomSheetDialog = new BottomSheetMaterialDialog.Builder(this)
                .setTitle("Delete?")
                .setMessage("Are you sure want to delete this profile?")
                .setCancelable(false)
                .setPositiveButton("Delete", R.drawable.ic_delete, new BottomSheetMaterialDialog.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        Constant.showErrorToast("Deleted!",getApplicationContext());
                        dialogInterface.dismiss();
                    }
                })
                .setNegativeButton("Cancel", R.drawable.ic_close, new BottomSheetMaterialDialog.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int which) {
                        Constant.showErrorToast("Cancelled!",getApplicationContext());
                        dialogInterface.dismiss();
                    }
                })
                .setAnimation("delete_anim.json")
                .build();
        mAnimatedBottomSheetDialog.show();
    }catch (Exception e){
        e.printStackTrace();
    }

}

@AndroidDeveloperMCT
Copy link
Author

@PatilShreyas please check and let me know if there is any error

@AndroidDeveloperMCT
Copy link
Author

If I comment .setAnimation("delete_anim.json") method, it works fine on Andorid7, is there a min sdk thing?

@PatilShreyas
Copy link
Owner

@mf-mindcrewtech There's no minSdk like thing here. For testing purpose try moving your file from assets to raw folder in res and load file from raw folder using R.raw.delete_anim.

See if it runs or gives problem and let me know. Then we'll do further actions.

@PatilShreyas
Copy link
Owner

Any updates @mf-mindcrewtech ?

@AndroidDeveloperMCT
Copy link
Author

Hi @PatilShreyas still crashing R.raw.delete_anim in Android7.0, can you please check BTW No logs have been generated (My code is also in try/catch but no exception there)

@PatilShreyas
Copy link
Owner

Okay @mf-mindcrewtech. I'll look into it.

@PatilShreyas PatilShreyas self-assigned this Nov 18, 2019
@PatilShreyas PatilShreyas added the bug Something isn't working label Nov 18, 2019
@PatilShreyas PatilShreyas added this to the v1.1.0 milestone Nov 18, 2019
@PatilShreyas
Copy link
Owner

@mf-mindcrewtech For testing purpose, I'll need your implemention to reproduce error. Can you please provide your implemention on GitHub or simply send me your project zip on mail: shreyaspatil125@gmail.com

@AndroidDeveloperMCT
Copy link
Author

@PatilShreyas I used your library in my running project, so can't share the complete code, But i'll send you the method which i am using

private void showDelete(){
BottomSheetMaterialDialog mAnimatedBottomSheetDialog;
try {
mAnimatedBottomSheetDialog = new BottomSheetMaterialDialog.Builder(this)
.setTitle("Delete?")
.setMessage("Are you sure want to delete this profile?")
.setCancelable(false)
.setPositiveButton("Delete", R.drawable.ic_delete, new BottomSheetMaterialDialog.OnClickListener() {
@OverRide
public void onClick(DialogInterface dialogInterface, int i) {
Constant.showErrorToast("Deleted!",getApplicationContext());
dialogInterface.dismiss();
}
})
.setNegativeButton("Cancel", R.drawable.ic_close, new BottomSheetMaterialDialog.OnClickListener() {
@OverRide
public void onClick(DialogInterface dialogInterface, int which) {
Constant.showErrorToast("Cancelled!",getApplicationContext());
dialogInterface.dismiss();
}
})
.setAnimation("delete_anim.json")
.build();
mAnimatedBottomSheetDialog.show();
}catch (Exception e){
e.printStackTrace();
}
}

@PatilShreyas
Copy link
Owner

Okay. Thanks!

@PatilShreyas
Copy link
Owner

@mf-mindcrewtech I tried it on my device (Android 7.0 API 24) with Animation. I found that it's running fine without any errors.

@PatilShreyas PatilShreyas removed this from the v1.1.0 milestone Nov 18, 2019
@PatilShreyas PatilShreyas added needs-info and removed bug Something isn't working labels Nov 18, 2019
@AndroidDeveloperMCT
Copy link
Author

@PatilShreyas okay but still crashing for me :(

@PatilShreyas
Copy link
Owner

PatilShreyas commented Nov 18, 2019

@mf-mindcrewtech Have you included Lottie library as dependency in project?

I'll suggest you to clone this repo and import sample app of this project in your Android studio and run app in your device and test if same error occurs or not. If you try this, maybe actual problem will be solved.

@AndroidDeveloperMCT
Copy link
Author

@PatilShreyas I got the issue, which is with the delete_anim.json (I downloaded another one from lottie). I replaced with your one and it works. Thanks for kind help

@PatilShreyas
Copy link
Owner

Okay @mf-mindcrewtech and thanks for the clarification!

@PatilShreyas
Copy link
Owner

As problem is solved now, can we close this issue?

@AndroidDeveloperMCT
Copy link
Author

Yupp please close it

@PatilShreyas
Copy link
Owner

Thanks for using this library.😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants