I tried adding on Scroll listener for recycler view and made some logic but i am not able to swipe one item at a time. I did some search on internet but i got some third party library which has custom recycler view. Can we implement one item swipe at a time in recycler view? If yes Please tell how? One item swipe at a time like this image.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I know it's late but others might find this helpful. At that time I had no other choice so i used https://github.com/lsjwzh/RecyclerViewPager library. Recently I found we can use
PagerSnapHelper
which is in v7 support Library. Like :This is late, i know.
There is a very simple way to get exactly the requested scrolling behaviour with the use of a custom SnapHelper.
Create your own SnapHelper by overwriting the standard one (android.support.v7.widget.LinearSnapHelper).
This is basicly the stadard method, but without adding a jump counter which gets calculated by scroll speed.
If you swipe fast and long, the next(or previous) view will be centered (shown).
If you swipe slow and short, the current centered view stays centered after release.
I hope this answer can still help anybody.
https://github.com/googlesamples/android-HorizontalPaging/
This has the link to something similar to what you have shown in the images. Let me know if there is something additional you are looking for, and I will link the relevant libraries.
Basically the difference between ViewPager and recyclerView is that, in recyclerView you are switching between many item, while in ViewPager you are switching between many fragments or independent pages itself.
I see you are using this https://github.com/lsjwzh/RecyclerViewPager, is there any particular use case you have in mind?