Add support for FlexboxLayoutManager
mnayef95 opened this issue · 3 comments
mnayef95 commented
- I have searched existing issues and this is not a duplicate
It's will be nice to support https://github.com/google/flexbox-layout, is there a way to use it now without official support?
nicous commented
Hey @mnayef95 , Litho uses https://yogalayout.com/ to build the UI. Not sure if I understand how would you want to use flexbox here, can you give an example?
mnayef95 commented
@nicous Now I can use something like this
GridRecyclerConfiguration.create()
.numColumns(3)
.gridLayoutInfoFactory { c, _, _, _, _ ->
GridLayoutInfo(GridLayoutManager(c, 3))
}
.build()
But I can't use something like this:
FlexboxRecyclerConfiguration.create()
.flexboxLayoutInfoFactory { c, _, _, _, _ ->
FlexboxLayoutInfo(FlexboxLayoutManager(c))
}
.build()
So I can use them like this:
val component = RecyclerCollectionComponent.create(componentContext)
.section(ExampleSection.create(SectionContext(componentContext)).build())
.recyclerConfiguration(Grid | Flexbox | Linear | etc...)
.build()