litho
litho copied to clipboard
SNAP_TO_CENTER not working when sticky property is true
- [x] I have searched existing issues and this is not a duplicate
Version
ext.litho_version = '0.33.0'
Issues and Steps to Reproduce
I'm using tutorial code and at the end there is summary:
Some more fun things you can try:
- SingleComponentSection has a few interesting props. See if you can make the horizontal scrolling row stick to the top
I'm just added sticky(true) to SingleComponentSection
@GroupSectionSpec
object ListSectionSpec {
@OnCreateChildren
fun onCreateChildren(c: SectionContext): Children {
return Children.create()
.child(
SingleComponentSection.create(c)
**.sticky(true)**
...
.recyclerConfiguration(ListRecyclerConfiguration.create()
.orientation(LinearLayout.HORIZONTAL)
.reverseLayout(false)
**.snapMode(SNAP_TO_CENTER)**
.build())
...
it sticks but don't snaps any more to the center of a list item.
Expected Behavior
I guess it should snap properly regardless of sticky prop state
Hey @massanchik, Thanks for reporting, we'll check it out.