Open Duna opened 6 years ago
Any update to solve this java.lang.NullPointerException ???????
I know I am last at the party, but If anyone is still facing this error you need to set imageView.setOnTouchListener(new ImageMatrixTouchHandler(getApplicationContext()));
when resource is ready,
GlideApp
.with(this)
.load(image)
.thumbnail(0.5f)
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
.listener(new RequestListener<Drawable>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
return false;
}
@Override
public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
imageView.setOnTouchListener(new ImageMatrixTouchHandler(getApplicationContext()));
return false;
}
})
.fitCenter()
.error(R.drawable.no_image)
.into(imageView);