Questions tagged [facebook-litho]
17 questions
4
votes
1 answer
How to add exoplayer in facebook litho for android
I have seen news feed example using fb litho. There is no any example for video play using litho. We want a example like news feed with video play or can you please provide any example or suggestion to add exoplayer in litho.

Namdev Londhe
- 111
- 2
- 16
2
votes
1 answer
FB Litho: How to set custom font for Text
My question is how to set a custom font for Text component in Facebook's UI framework Litho?
The following is my Text component:
Text.create(componentContext)
.flexGrow(1f)
.verticalGravity(VerticalGravity.CENTER)
…

Ugurcan Yildirim
- 5,973
- 3
- 42
- 73
1
vote
1 answer
Click Handler in Builder cannot be applied to void
I am working in mobile application (android) and start to learn litho framework, I write a click handler for particular widget inside component. But the error is displayed
"Builder cannot be applied to void" why this issue is came for a…

Muthukumar S
- 53
- 8
1
vote
1 answer
Building UI using Litho and JSON
I was looking for Backend Driven UI libraries for Android and came across Litho for Declarative UI. I was wondering if there is any helper/extension library for Litho that can generate the UI based on JSON.

Ravindra Barthwal
- 380
- 2
- 4
- 16
1
vote
0 answers
How to set a component visible true or false when another component do a action
Now what I'm trying to do is that when my CustomCheckboxSpec component in the onCheckboxClicked event sends a true or false value for the isChecked parameter, it calls the CustomText component and through the setVisible function and by the…

Hermes Hdez
- 21
- 8
1
vote
0 answers
Couldn't generate Android App Bundle version of my App
Is anyone else facing this problem?
I can generate Debug and Release versions of my App in Bundle Package. No gradle erros during the Assemble.
Dependencies:
// Litho
implementation 'com.facebook.litho:litho-core:0.19.0'
implementation…

Sergio Sena
- 31
- 4
1
vote
1 answer
Litho ListRecyclerConfiguration Kotlin with linearLayoutInfoFactory
I'm new to Kotlin, and I want to use Facebook's litho library, I have found the java way to create a recycler configuration but I am unable to do the same in Kotlin.
RecyclerCollectionComponent.create(c)
…

Reedy
- 1,866
- 2
- 20
- 23
1
vote
1 answer
How to implement part of sections with LinearLayoutManager and part with GridLayoutManager?
I have many different types of views in recycler spec.
@LayoutSpec
object AdPageSpec {
@OnCreateLayout
fun onCreateLayout(c: ComponentContext, @Prop model: List): ComponentLayout {
return…

ar-g
- 3,417
- 2
- 28
- 39
0
votes
2 answers
FbLitho repeats views in RecyclerCollectionComponent even when new section is loaded
FbLitho framework repeats views from the old section i.e Groupsection in RecyclerCollectionComponent even when a new section is loaded.

Pravin Desai
- 527
- 5
- 18
0
votes
1 answer
java.lang.LinkageError: com.facebook.litho.sections.widget.RecyclerCollectionComponent
java.lang.LinkageError: com.facebook.litho.sections.widget.RecyclerCollectionComponent
When using litho RecyclerCollectionComponent
RecyclerCollectionComponent component = RecyclerCollectionComponent.create(c).section(
section
…

Pravin Desai
- 527
- 5
- 18
0
votes
1 answer
Recycle a list of litho components using a custom adapter
I am working on a project where I need recyling a list of litho components using a custom recyclerview adapter. The only issue is that I can't use RecyclerComponent which comes as part of the litho library.
Is there a way to do this? Specifically,…

omerjerk
- 4,090
- 5
- 40
- 57
0
votes
1 answer
Litho Column border radius
Currently investigating Litho and I tried to add a border to a Column. It seems to work fine until I add a background to the Column. The Column doesn't appear to be clipped to the borders
See attached image for better description
Code (In…

MRainzo
- 3,800
- 2
- 16
- 25
0
votes
0 answers
Dynamic UI from JSON template using Litho
I am working on Dynamic screens using server-driven UI in Android. Ref to this post on Building UI using Litho and JSON. How to make use of a JSON template in Litho to render UI elements. If anyone has worked on it Please post an example.
My JSON…

nethra gowda
- 290
- 1
- 4
- 23
0
votes
1 answer
No virtual method getBaseContext()Landroid/content/Context #litho
litho
Error
java.lang.NoSuchMethodError: No virtual method
getBaseContext()Landroid/content/Context; in class
Lcom/facebook/litho/ComponentContext; or its super classes
(declaration of 'com.facebook.litho.ComponentContext' appears in
…

Midhilaj
- 4,905
- 9
- 45
- 88
0
votes
1 answer
Facebook Litho: Visible Event hasn't triggered when fragment resumed
Visible Event hasn't triggered when fragment resumed. I also tried to call LithoView.setVisibilityHint(true); on fragment resume but it doesn't work to trigger the visible event of the Component. However, it will be triggered successfully when…

Kit
- 2,370
- 13
- 11