ParallaxEverywhere
ParallaxEverywhere copied to clipboard
Not working with RecyclerView?
Do you have a sample on how this library works? Specifically with a RecyclerView if possible? I'm adding the PEWImageVIew to my row layout and it's not working.
Anything I need to add to the view, or is it simply not compatible with a RecyclerView? i'm getting my image from a HTTP call, loading it in, maybe it's that?
Edit: It seems the PEWTextView works, just not the PEWImageView?
Any update to this...?
I'm using recyclerview with picasso and its work good.
Any updates on this?
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.
With recyclerView not work for me ! maybe because i use holder.imageView.setImageResource(srcs.get(position)); on onBindViewHolder method???
Only PEWTextView work
I use Picasso.with(mContext).load(resourceId).into(holder.background); on onBindViewHolder