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
Views.find() not working properly #1
Comments
So if you have NullPointerException there it means you passing |
Actually I changed your UnFoldableDetailsActivity ->UnFoldableDetailsFragment so "this" keyword is not valid on Activity so I changed it to getActivity() when I'm defining mDetailsLayout = Views.find(getActivity(), R.id.details_layout); but I'm also getting NPE error in here. I think View.find() method should be override on Fragment |
Fragment.getActivity() will return null if fragment is not attached to activity. Please refere to official Android docs or ask your questions on SO. |
no fragment attached to activity. |
Hi Alex,
your findViewById implemantation is different so when I try to initialize an object I'm always getting Null Pointer Exception.I always changed from View.fınd(...) to findViewById(....)
I also added your compile 'com.alexvasilkov:android-commons:1.2.3' library as an dependency into build.gradle
The text was updated successfully, but these errors were encountered: