SNAP_TO_CENTER not working when sticky property is true
- Lingua principale
- Kotlin
- Stelle
- 7.8k
- Fork
- 768
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
- [x] I have searched [existing issues](https://github.com/facebook/litho/issues?utf8=%E2%9C%93&q=sticky) and this is not a duplicate
## Version
ext.litho_version = '0.33.0'
## Issues and Steps to Reproduce
I'm using [tutorial code](https://fblitho.com/docs/sections-tutorial) 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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.