Java 类com.facebook.litho.widget.Recycler 实例源码

项目:redux-observable    文件:ProductSlideComponentSpec.java   
@OnCreateLayout
static ComponentLayout onCreateLayout(ComponentContext c, @Prop String title,
                                      @Prop RecyclerBinder recyclerBinder) {

    return Column.create(c)
            .child(
                    Text.create(c)
                            .text(title)
                            .glyphWarming(true)
                            .textSizeSp(16)
                            .withLayout()
                            .paddingDip(TOP, 8)
                            .paddingDip(BOTTOM, 4)
                            .heightDip(44)
            )
            .paddingDip(LEFT, 8)
            .paddingDip(RIGHT, 8)
            .child(
                    Recycler.create(c)
                            .hasFixedSize(true)
                            .binder(recyclerBinder)
            )
            .build();
}
项目:redux-observable    文件:HomeListComponentSpec.java   
@OnCreateLayout
static ComponentLayout onCreateLayout(ComponentContext c, @Prop RecyclerBinder binder) {
    return Recycler.create(c)
            .binder(binder)
            .withLayout().flexShrink(0)
            .testKey(MAIN_SCREEN)
            .build();
}
项目:litho-glide    文件:LithographyRootComponentSpec.java   
@OnCreateLayout static ComponentLayout onCreateLayout(ComponentContext c,
    @Prop final RecyclerBinder recyclerBinder) {

  return Recycler.create(c)
      .binder(recyclerBinder)
      .flexShrink(0)
      .paddingDip(YogaEdge.TOP, 8)
      .testKey(MAIN_SCREEN)
      .buildWithLayout();
}
项目:litho-glide    文件:DemoListComponentSpec.java   
@OnCreateLayout static ComponentLayout onCreateLayout(ComponentContext c) {
  final RecyclerBinder recyclerBinder = new RecyclerBinder.Builder().layoutInfo(
      new LinearLayoutInfo(c, OrientationHelper.VERTICAL, false)).build(c);

  Demos.addAllToBinder(recyclerBinder, c);

  return Recycler.create(c)
      .binder(recyclerBinder)
      .flexShrink(0)
      .testKey(MAIN_SCREEN)
      .buildWithLayout();
}
项目:litho-picasso    文件:LithographyRootComponentSpec.java   
@OnCreateLayout
static ComponentLayout onCreateLayout(
    ComponentContext c,
    @Prop final RecyclerBinder recyclerBinder) {

  return Recycler.create(c)
      .binder(recyclerBinder)
      .withLayout().flexShrink(0)
      .paddingDip(YogaEdge.TOP, 8)
      .testKey(MAIN_SCREEN)
      .build();
}
项目:litho-picasso    文件:DemoListComponentSpec.java   
@OnCreateLayout
static ComponentLayout onCreateLayout(ComponentContext c) {
  final RecyclerBinder recyclerBinder = new RecyclerBinder(
      c,
      4.0f,
      new LinearLayoutInfo(c, OrientationHelper.VERTICAL, false));

  Demos.addAllToBinder(recyclerBinder, c);

  return Recycler.create(c)
      .binder(recyclerBinder)
      .withLayout().flexShrink(0)
      .testKey(MAIN_SCREEN)
      .build();
}
项目:litho-glide    文件:FeedItemComponentSpec.java   
private static ComponentLayout.Builder getRecyclerComponent(ComponentContext c,
    RecyclerBinder binder) {
  return Recycler.create(c).binder(binder).withLayout().flexShrink(0).aspectRatio(2);
}
项目:litho-picasso    文件:FeedItemComponentSpec.java   
private static ComponentLayout.Builder getRecyclerComponent(ComponentContext c,
    RecyclerBinder binder) {
  return Recycler.create(c).binder(binder).withLayout().flexShrink(0).aspectRatio(2);
}