@OnCreateLayout static @Nullable Component onCreateLayout(ComponentContext c) { return null; } }
@OnCreateLayout public Component onCreateLayout(ComponentContext c, @Prop String s) { return null; } }
@OnCreateLayout public final Component onCreateLayout( ComponentContext c, @Prop(varArg = "number") java.util.List<? extends java.lang.Number> numbers) { return null; } }
@OnCreateLayout static Component onCreateLayout(ComponentContext c) { return Text.create(c).text("Hello, World!").textSizeDip(50).build(); } }
@OnCreateLayout static Component onCreateLayout(ComponentContext c) { return RecyclerCollectionComponent.create(c) .section(StoryCardsWithHeaderSection.create(new SectionContext(c)).build()) .build(); } }
@OnCreateLayout static Component onCreateLayout( ComponentContext c, @Prop String text, @Prop EventHandler<ClickEvent> clickEventHandler) { return Text.create(c) .text(text) .textSizeSp(25) .clickHandler(clickEventHandler) .build(); } }
@OnCreateLayout static Component onCreateLayout(ComponentContext c) { return Row.create(c) .backgroundColor(0xDDFFFFFF) .positionType(YogaPositionType.ABSOLUTE) .positionDip(YogaEdge.RIGHT, 4) .positionDip(YogaEdge.TOP, 4) .paddingDip(YogaEdge.ALL, 2) .child(FavouriteButton.create(c)) .build(); } }
@OnCreateLayout static Component onCreateLayout(ComponentContext c, @State boolean state) { final int color = state ? Color.RED : Color.LTGRAY; final String key = state ? "red" : "gray"; return Column.create(c) .child(buildRow(c, color, key + 0)) .child(buildRow(c, color, key + 1)) .paddingDip(YogaEdge.ALL, 8) .clickHandler(RTAnimationComponent.onClick(c)) .build(); }
@OnCreateLayout static Component onCreateLayout(ComponentContext c) { return Column.create(c) .child(Text.create(c).text("Hello, World!").textSizeDip(50)) .child( Text.create(c) .text("Hello, world 2!") .textColorRes(android.R.color.holo_green_dark) .textSizeSp(30)) .build(); } }
@OnCreateLayout static Component onCreateLayout(ComponentContext c, @Prop List<ListRow> dataModels) { return RecyclerCollectionComponent.create(c) .disablePTR(true) .section( DataDiffSection.<ListRow>create(new SectionContext(c)) .data(dataModels) .renderEventHandler(ErrorRootComponent.onRender(c)) .build()) .paddingDip(YogaEdge.TOP, 8) .build(); }
@OnCreateLayout public static Component onCreateLayout( ComponentContext c, @Prop String s, @Prop Component child, @Prop(resType = ResType.DIMEN_SIZE) float size, @Prop(optional = true) int i) { return Row.create(c).build(); } }
@OnCreateLayout static Component onCreateLayout(ComponentContext c) { return RecyclerCollectionComponent.create(c) .disablePTR(true) .section( DataDiffSection.create(new SectionContext(c)) .data(generateData(20)) .renderEventHandler(ComposedAnimationsComponent.onRender(c)) .onCheckIsSameItemEventHandler(ComposedAnimationsComponent.isSameItem(c)) .build()) .build(); }
@OnCreateLayout public void testDelegateMethod( @Prop boolean arg0, @Prop Section section, @State int arg1, @Param Object arg2, @Prop(optional = true) boolean arg3, @Prop(varArg = "name") List<String> names, @Prop(optional = true) float arg5) {}
@OnCreateLayout static Component onCreateLayout(ComponentContext c, @State int state) { final boolean expanded1 = state == 1 || state == 2; final boolean expanded2 = state == 2 || state == 3; return Column.create(c) .paddingDip(YogaEdge.ALL, 8) .child(Row.create(c).marginDip(YogaEdge.TOP, 8).child(buildComment1(c, expanded1))) .child(Row.create(c).marginDip(YogaEdge.TOP, 16).child(buildComment2(c, expanded2))) .clickHandler(AnimatedBadge.onClick(c)) .build(); }
@OnCreateLayout public void testDelegateMethod( @Prop boolean arg0, @State int arg1, @Param Object arg2, @TreeProp long arg3, @Prop Component arg4, @Prop List<Component> arg5, @Prop List<String> arg6, @TreeProp Set<List<Row>> arg7, @TreeProp Set<Integer> arg8) {}
@Override @OnCreateLayout protected Component onCreateLayout(ComponentContext c) { return Column.create(c) .child(Text.create(c).text("").key("sameKey")) .child(Text.create(c).text("").key("sameKey")) .build(); } };
@Override @OnCreateLayout protected Component onCreateLayout(ComponentContext c) { return Column.create(c) .child(Text.create(c).text("").key("sameKey")) .child(Text.create(c).text("").key("sameKey")) .build(); } };
@Override @OnCreateLayout protected Component onCreateLayout(ComponentContext c) { return Column.create(c) .child(Text.create(mContext).widthDip(10).heightDip(10).text("")) .child(Text.create(mContext).widthDip(10).heightDip(10).text("")) .build(); } };
@Override @OnCreateLayout protected Component onCreateLayout(ComponentContext c) { return Column.create(c) .child(Text.create(mContext).widthDip(10).heightDip(10).text("")) .child(Text.create(mContext).widthDip(10).heightDip(10).text("")) .build(); } };
@Override @OnCreateLayout protected Component onCreateLayout(ComponentContext c) { return Column.create(c) .child(component) .child(Text.create(mContext).widthDip(10).heightDip(10).text("test")) .child(Text.create(mContext).widthDip(10).heightDip(10).text("test")) .build(); } };