Open ghost opened 8 years ago
@hishamBakr Have you solved your issue yet, it so bad decision to replace glide with any other image loader
Hey guys,
Override the PEWImageView like this:
`public class ParalaxImageView extends PEWImageView{
public ParalaxImageView(Context context) {
super(context);
}
public ParalaxImageView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public ParalaxImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public void setImageResource(int resId) {
super.setImageResource(resId);
invalidate();
}
@Override
public void setImageDrawable(Drawable drawable) {
super.setImageDrawable(drawable);
invalidate();
}
@Override
public void setImageBitmap(Bitmap bm) {
super.setImageBitmap(bm);
invalidate();
}
}`
And it will work fine.
I'll submit a pull request soon.
@ronaldo-getreveel Tried this but it still did not load. I'm loading the image in a recycler view using this calls:
Glide.with(context)
.load(atual.getImage())
.diskCacheStrategy(DiskCacheStrategy.ALL)
.centerCrop()
.dontAnimate()
.into(holder.image);
am I missing anything?
Got it working,
just had to use .override(1080,675)
,
as Glide loads a cut version of the image to fit perfectly in the ImageView, not leaving room for the parallax effect.
@FelipeRRM thanks for the tip. It worked.
Dear, Thank you for great component. I have an issue. I am using Glide to download images. parallax is not working when using Glide. Please advise