Open arncore opened 8 years ago
Hey i have added PEW image view in StickyHeaderExpandable List view but i noticed that the effect doesn't work have you figured out the issue?
Nope. I just removed the lib from the project. It was a bummer. I like this lib.
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.
Hello,
I am inflating a view with a PEWImageView in it. Like this:
@Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) this.currentContext .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:pew="http://schemas.android.com/tools">
After the list is scrolled to the bottom or close to the bottom when you scroll back up I noticed that parallax effect stops and the image gets stuck in the position that the interpolator animation moved it after it did the parallax effect as I was scrolling down. It will not act the same way as I scroll up. It does it once and thats it. The only solution is to re-inflate the view when the list is scrolled to the bottom, but that is costly. Can you suggest a solution to this or is it something that I am doing wrong ?
Thank you.