-
Notifications
You must be signed in to change notification settings - Fork 13
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
java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to android.app.Activity #4
Comments
The CastException happens in the instruction ((Activity)context).getWindowManager().getDefaultDisplay().getMetrics(metrics);
To fix the error, please change that instruction. Please use this line in constructor of BackdropContainer class:
Add the method below in BackdropContainer class:
The constructor of the BackdropContainer class would look like this: **public BackdropContainer(@nonnull Context context, @nullable AttributeSet attrs) {
Please feel free to contact me if you have any doubts. |
What about if you do a fork and a pull request? It will be faster. |
I received this error in my project:
My configuration project:
The text was updated successfully, but these errors were encountered: