Closed miomao656 closed 11 months ago
Hi @miomao656. Yes, that should be possible by customising the parent alignment configuration. Check this: https://rubensousa.github.io/DpadRecyclerView/alignment/#aligning-to-an-edge
In your case, you're looking for app:dpadRecyclerViewParentAlignmentEdge=none
Please let me know if this is the behavior you're looking for
When i add app:dpadRecyclerViewParentAlignmentEdge=none
the list with less items on the screen than the height starts at the middle of the screen and as i scroll trought the items down the list shifts up the screen.
This is fine but when i scroll up, the list does not return and the focused item goes up the screen.
Also first item in the list is only half visible when you scroll up.
Is there a way to focused item stay in center and the list just shifts up or down, depending on scroll direction?
@miomao656 can you please provide a screen recording of that behavior? What you're describing might be a bug, as scrolling up should return to the original state
Are you using wrap_content
in the height? If yes, that's not properly supported if you're in a vertical orientation. Please use match_parent
or give it a fixed height
Also, which version are you using at the moment?
i am using 1.2.0 alfa 1, here is a recording with match parent for height and fixed width.
https://github.com/rubensousa/DpadRecyclerView/assets/6882632/0ab1d774-6af9-4077-bd5f-6151cab33953
Ok, this seems indeed a bug. I will look into it. For now, as a workaround, can you try using app:dpadRecyclerViewParentAlignmentEdge=min
to see if it suits your needs?
The best i could come up with is using max.
https://github.com/rubensousa/DpadRecyclerView/assets/6882632/695db878-fa80-496f-bfcd-eb911716d1f6
and for min and min_max i get this behaviour
https://github.com/rubensousa/DpadRecyclerView/assets/6882632/0a422fd7-2683-4fb9-8146-556d564d8013
Thank you for sending the recordings. I will have a look at this issue and reply here with the fix once it's available
Tnx for the quick response.
Library is awesome, so keep up the good work!
@miomao656 fix will be available in the next release: 1.2.0-alpha02
Thank you! When do you plan to release ti?
@miomao656 fix released in 1.2.0-alpha02
Hi,
i get a small list that is a couple of cells and all content aligns to top, and i need it to be in the center vertical. When the list is big to fill the screen there is normal behaviour that scrolls from/to the middle of list. Is there a way to center vertical the content and have it be scrolled the same way as it is when the list is bigger?