yayaa / parallaxrecyclerview Goto Github PK
View Code? Open in Web Editor NEWParallax effect on every item of your RecyclerView.
Parallax effect on every item of your RecyclerView.
this is my github address:https://github.com/daimaXZ/sicooDemo
The effect is so good,and it would be popular in China if you don't mind。
Thank you for your open source 。
Hey,
I've tried the same parallax effect with GridLayoutManager and StaggeredGridLayoutManager but it's doesnt seems like showing parallax effect while scrolling. but its works fine in LinearLayoutManager. Please help me on this issue.
Can we make it diagonal image ??
My bad, thank you!
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.rezatestapp"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
implementation 'com.android.support:appcompat-v7:28.0.0
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 22.0.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:recyclerview-v7:22.0.0
imageview adds extra space. Also, when scrolling down the image gets reduced very much
I'm using Picasso to load images in to my recycler view but the images are not the size i want. I have a set height of 180dp and match_parent of my ImageView yet the images are half the size, floating inside each row. It's very weird.
It's not on every image, but it's on the majority, the first image in the list always seems to be load fine, as you scroll though, all the images are half their size.
I have 3 different view types in my RecyclerVIew but i also have 3 ParallaxImageViews defined with the same id so it shouldn't be a problem.
The parallax works, but the images are totally messed up. I'm calling viewHolder.getBackgroundImage().reuse() at the top of my onBindVIewHolder.
I'm pretty sure it's to do with Picasso. I tried a local image and it went to the correct size.
This is my Picasso command:
Picasso.with(this).load(imageUrl).tag(this).placeholder(R.color.background).into(viewHolder.image);
Edit: Will add a screenshot
Edit 2: I tried using UniveralImageLoader and the same thing happens.
Hello,
I've been using your amazing recyclerview for a while but there's a rather big problem with it.
I use it in different emulators and devices, sometimes the parallax scrolling happens incorrectly. When I scroll up, images scroll down, and vice versa. The parallax ratio is set to default value and
I can present codes if needed.
Thanks
I have an adapter with multiple view types, and I only want to apply parallax to one type, which is a normal image (the others are header and footer, with no images).
The problem is I get a crash saying that my HeaderViewHolder cannot be cast to ParallaxViewHolder. I tried extending from HeaderViewHolder but it also crashes because I don't have any ParallaxImageView.
How can I handle this situation?
Seem to be getting a bug where the images do no appear until you scroll. The image is loaded, but the row in the RecyclerView will remain empty until I scroll down. When I scroll up, the image does not load, I have to scroll down for the next images to appear. When I do, they appear immediately.
Do you have any idea why this might be the case? One the image is displayed, Parallax and everything else is fine, it just seems to holding onto the image and not displaying until I scroll down which is a bit strange.
Hi I am using this library with Picasso image loader as described in readme section.
Sometimes image is not taking full space to the view.
@yayaa
I use Glide to test the library,then i find a problem . If the finger don't move in the screen , the screenshots is this
the pictures do not display nomally. But if the finger move in the screen ,the screenshots is this
the pictures can display nomally
my code is below
@Override
public void onBindViewHolder(ViewHolder viewHolder, int position) {
MyGlideUtils.loadImgByResId(context, imageIds[position % imageIds.length], viewHolder.getBackgroundImage());
// viewHolder.getBackgroundImage().setImageResource(imageIds[position % imageIds.length]);
viewHolder.getTextView().setText("Row " + position);
// # CAUTION:
// Important to call this method
viewHolder.getBackgroundImage().reuse();
}
MyGlideUtils is below
public static void loadImgByResId(Context context, int resId, ImageView imageView) {
Glide.with(context)
.load(resId)
// .centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(imageView);
}
if use centerCrop the Parallax does't work ,the reason i don't find .
If you have free time , please help me ,thank you !
When I use a placeholder with Picasso then it acts weird. It loads the image in a tiny box at the top left corner over the placeholder and when I try and scroll, then the image immediately replaces the placeholder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.