Questions tagged [pagersnaphelper]

25 questions
6
votes
1 answer

SnapHelper issue with first and Last item

I am using Recyclerview with PageSnapHelper to create an Image carousel. First item - Not Centered The first Item is not centered and Subsequent Items should be centered, I have achieved this using item decorator. RecyclerView is inside nested…
GTID
  • 538
  • 2
  • 6
  • 19
5
votes
0 answers

Flutter: How to left align View Port in PageView

How it works When we set viewportFraction, the view gets center aligned. If viewportFraction sets PageView( viewportFraction: 0.8 ) Center-Aligned view port How I expect But what I need is the view to start with left-aligned like how playstore…
Vivek
  • 113
  • 1
  • 12
4
votes
1 answer

From-To Page Changed Listener in PagerSnapHelper

I'm using PagerSnapHelper in a horizontal RecyclerView to achieve a view pager like behaviour. final PagerSnapHelper pagerSnapHelper = new PagerSnapHelper(); pagerSnapHelper.attachToRecyclerView(recyclerView); It works great, but I want to be able…
3
votes
0 answers

Media Player Should stop playing when user scroll in PagerSnapHelper Recyclerview

I am using PagerSnapHelper for the recycler view. Now in recycler view items, I have an audio media player in which the audio URL is coming from the API response for a particular item. I want that if the user scroll to another item then the media…
3
votes
2 answers

Add space in RecyclerView with PagerSnapHelper

I'm searching for a way to add a space between my items using a RecyclerView and the PagerSnapHelper. To demonstrate what I mean here is a gif: As you can see above between the two images there is a little black space. But these space is only…
StefMa
  • 3,344
  • 4
  • 27
  • 48
3
votes
4 answers

How to snap to particular position of LinearSnapHelper in horizontal RecyclerView?

How can I snap to particular position for LinearSnapHelper() in horizontal RecyclerView? There is a function scrolltoposition for RecyclerView which scroll to that position but did not keep it in center for this snaphelper. I am looking for…
Kishan Solanki
  • 13,761
  • 4
  • 85
  • 82
2
votes
1 answer

How to snap to the left side of the item in RecyclerView

I have recyclerview with horizontal scroll and it snaps by default with LinearSnapHelper or PagerSnapHelper to the center of item. I want to snap to the left side of the each item. Is it possible?
user1730694
  • 442
  • 4
  • 14
2
votes
1 answer

Recyclerview with vertical orientation scrolls up and down on horizontally scrolls of the Screen

I need to create a list with full screen videos.I used PagerSnapHelper for full screen child item. I have a single instance of Exoplayer and change video on scroll. Video also change on horizontally scroll. RecyclerView.OnScrollListener() methods…
mukesh
  • 4,140
  • 5
  • 29
  • 40
2
votes
0 answers

Pagination with multiple pages

I’m trying to get pagination with a fixed number of views per swipe (1 row with a fixed number of columns). For example: 0 1 2 3, next horizontal swipe items: 4 5 6 7 , next horizontal swipe 8 9 10 11 etc. Already tried: PagerSnapHelper - gives me…
2
votes
1 answer

Exoplayer - How to make the exoplayer play only the currently visible video

I have a RecyclerView. Each item is a video. This item will fill the entire screen. So only one item will be visible at a time. When I scroll, the next item will be visible. Scrolling will stop at the next item. I am achieving this using…
1
vote
0 answers

Shaky/Bounce effect while using SnapHelper on Scroll in Android

I have tried both SnapHelper Linear and Pager But in both cases the below effect shown in the gif happens on scrolling up https://media4.giphy.com/media/CN0FsbuoNG9d9DhFqd/giphy.gif I have attached a linear layout…
Rihit
  • 11
  • 1
1
vote
1 answer

RecyclerView PagerSnapHelper Snap on Start/Top instead of center Android

I am using a vertical recycler view and have attached a pagerSnapHelper.it works fine and snaps the items to the center position but I want it to snap to the start (top side). I don't want to use linearSnapHelper as it does not work the way I want.…
Rohan Arora
  • 303
  • 2
  • 12
1
vote
0 answers

Scroll RecyclerView with current Complete visible item height

I have RecyclerView that contains user post , post height is not fixed , I have attached PagerSnapHelper to this RecyclerView . How can I make scrolling distance of this RecyclerView with current complete visible item in RecyclerView…
1
vote
0 answers

Recycleview PagerSnapHelper scrolling distance

How can I customize scroll distance for PagerSnapHelper so that Recycleview scrolling will be with current visible item height . binding.videoTrendsRecycle.setLayoutManager(mLayoutManager); …
1
vote
2 answers

How to move the snap position from center to left of RecycleView using SnapHelper?

I have an RecycleView that contains ImageViews and my question is how can i move the snap to be on the left side of the RecycleView instead of the center? When i move the ImageViews they get snapped in the center and I can move them to the left or…
1
2