Questions tagged [litho]

A declarative, high-performance Android UI library by Facebook inspired by the React component model. Litho uses the Yoga layout library (an implementation of Flexbox) and is optimized for creating fast RecyclerView based interfaces.

Litho is a declarative, high-performance Android UI library by Facebook inspired by the React component model. Litho uses the Yoga layout library (an implementation of Flexbox) and is optimized for creating fast RecyclerView-based interfaces.

Links

  • Get Started: Integrate Litho into your Android app
  • Tutorial: Your first Litho components
  • Sections: An advanced API for heterogenous Recycler collections
  • API: JavaDoc

Community Resources

38 questions
0
votes
1 answer

How can I replace existing text with Litho?

I'm trying to change the text. On Example in onActivityResult (), but I can not find a solution @LayoutSpec public class LaytourSpec { @OnCreateLayout static Component onCreateLayout( final ComponentContext c, @Prop(optional =…
0
votes
1 answer

2D scrollable list/panning functionality using litho?

I was wondering if we can create a 2D scrollable list using litho? I tried nested RecyclerCollectionComponents but it makes the columns scroll individually, not the panning functionality I want. I also tried GridRecyclerConfiguration but it scrolls…
Raza Yunus
  • 11
  • 2
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
0
votes
1 answer

How to add MountSpec component in LayoutSpec or XML in android

I am able to set MountSpec directly in Activity setContentView(), but its not working when I am trying to add it with my existing XML view (using LayoutSpec or even directly).
0
votes
3 answers

Litho image from remote URL

I am trying to load an image from remote URL into Litho Image widget but Litho widget has "drawable" as the only prop to set image. Have any one tried to set image from remote URL inside Litho Image widget?
0
votes
1 answer

How to add keyboard support on facebook litho

I am trying to use facebook litho to build the android app for TV. We need to support keyboard events(up/down/left/right) to control the navigation. I can intercept keyboard events by onKeyDown in the activity, but I don't know how to update the…
zhoumj
  • 9
  • 3
0
votes
1 answer

Litho Crash on Start

I'm developing android application that require some complex RecyclerView UI that why i give a try on Facebook's Litho but even samples crash seem to crash on my old phone HTC Desire x run android 4.1 but on new phone running 6.0 it's work does…
Mucyo Fred
  • 26
  • 6
1 2
3