-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
PhotoViewAttacher.getScaleType()' on a null object reference #768
Comments
And the touch event for ViewPager2 still works during scaling. |
Issues:The touch event for ViewPager2 still works during scaling. You can call |
@kelinZhou where exactly do you make this check? |
<---?xml version="1.0" encoding="utf-8"?--> <---LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<--/LinearLayout--> try this... |
I'm using this approach with waiting for an image view display by the GlobalLayout listener to solve this issue. Thanks!! |
my app use ViewPager2 + PhotoView + Glide, to see a few picture, the app crash.
version 1.3.1
java.lang.NullPointerException: Attempt to invoke virtual method 'android.widget.ImageView$ScaleType uk.co.senab.photoview.PhotoViewAttacher.getScaleType()' on a null object reference
at uk.co.senab.photoview.PhotoView.getScaleType(PhotoView.java:115)
at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:680)
The text was updated successfully, but these errors were encountered: