Skip to content
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

Not working with RecyclerView? #13

Open
MiralDesai opened this issue Apr 18, 2016 · 7 comments
Open

Not working with RecyclerView? #13

MiralDesai opened this issue Apr 18, 2016 · 7 comments

Comments

@MiralDesai
Copy link

MiralDesai commented Apr 18, 2016

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?

@MiralDesai
Copy link
Author

Any update to this...?

@badlog
Copy link

badlog commented Jun 3, 2016

I'm using recyclerview with picasso and its work good.

@vijay3
Copy link

vijay3 commented Aug 25, 2016

Any updates on this?

@ghost
Copy link

ghost commented Sep 29, 2016

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.

@alexfin90
Copy link

With recyclerView not work for me ! maybe because i use holder.imageView.setImageResource(srcs.get(position)); on onBindViewHolder method???

@alexfin90
Copy link

Only PEWTextView work

@badlog
Copy link

badlog commented Apr 20, 2017

I use
Picasso.with(mContext).load(resourceId).into(holder.background);
on onBindViewHolder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants