facebook / litho

A declarative framework for building efficient UIs on Android.
https://fblitho.com
Apache License 2.0
7.7k stars 764 forks source link

Scroll doesn't work while transition animation is in progress #658

Open TimurKhairnasov opened 4 years ago

TimurKhairnasov commented 4 years ago

Version

0.35.0

Issues and Steps to Reproduce

Reversed RecyclerCollectionComponent blocks scroll during changing size of LithoView with transition animation. If reverseLayout is false everything works fine

Expected Behavior

i expected that scroll of LithoView would be enabled during transition animation (changing size) with reverse layout like with regular layout😊

Code

RecyclerCollectionComponent something like this: RecyclerCollectionComponent.create(sectionContext) .recyclerConfiguration(recyclerConfiguration) .clipToPadding(false) .disablePTR(true) .section(Section.create(sectionContext) .data(data) ) .build()

val recyclerConfiguration = ListRecyclerConfiguration.create() .orientation(androidx.recyclerview.widget.LinearLayoutManager.VERTICAL) .reverseLayout(true) .build()

Changing size by changing constraint connections in layout. Something like that: val set = ConstraintSet() set.apply { clone(main_layout) connect(litho_fragment.id, ConstraintSet.TOP, appbar.id, ConstraintSet.BOTTOM) applyTo(main_layout) }

litho_fragment is the fragment with LithoView in it.

Transition something like this: TransitionManager.go(Scene(main_layout), ChangeBounds())

colriot commented 4 years ago

Hi @TimurKhairnasov! Sorry, for late reply. Can you provide a sample app with repro, please? This plain text is not easy to comprehend, especially without formatting. But having the project to easily import and reproduce the issue is the major help to easily jump into debugging and then fixing it :)