@Override protected Component onCreateLayoutWithSizeSpec( ComponentContext c, int widthSpec, int heightSpec) { final Component.Builder builder1 = TestDrawableComponent.create(c, false, true, true, false, false) .flexShrink(0) .backgroundColor(0xFFFF0000); final Component.Builder builder2 = TestViewComponent.create(c, false, true, true, false) .flexShrink(0) .marginPx(YogaEdge.ALL, 3); if (hasFixedSizes) { builder1 .widthPx(50) .heightPx(50); builder2 .heightPx(20); } if (isDelegate) { return builder1.build(); } return Column.create(c) .paddingPx(YogaEdge.ALL, 5) .child(builder1) .child(builder2) .build(); }
@Override protected Component onCreateLayout(ComponentContext c) { return Column.create(c) .alignItems(FLEX_END) .justifyContent(YogaJustify.FLEX_END) .child( Column.create(c) .widthPx(100) .heightPx(100) .paddingPx(ALL, 20) .wrapInView() .child( Column.create(c) .widthPx(60) .heightPx(60) .wrapInView() .child(create(c).widthPx(20).heightPx(20).marginPx(ALL, 20)))) .build(); } },
@Override protected Component onCreateLayout(ComponentContext c) { return create(c) .paddingPx(ALL, 2) .child(TestDrawableComponent.create(c, false, true, true, false, false)) .child( TestSizeDependentComponent.create(c) .setDelegate(false) .flexShrink(0) .marginPx(ALL, 11)) .build(); } }
@Override protected Component onCreateLayout(final ComponentContext c) { return create(c).paddingPx(HORIZONTAL, horizontalPadding).child(componentSpy).build(); } };
@Override protected Component onCreateLayout(final ComponentContext c) { return create(c) .paddingPx(ALL, 2) .child( TestSizeDependentComponent.create(c) .setFixSizes(true) .setDelegate(true) .marginPx(ALL, 11)) .build(); } };
@Override protected Component onCreateLayout(ComponentContext c) { return Column.create(c) .wrapInView() .paddingPx(ALL, 20) .child(Wrapper.create(c).delegate(child).widthPx(10).heightPx(10)) .child(TestDrawableComponent.create(c)) .build(); } });
@Override protected Component onCreateLayout(ComponentContext c) { return create(c) .paddingPx(ALL, 2) .child( TestSizeDependentComponent.create(c).setDelegate(true).marginPx(ALL, 11)) .build(); } }
@Override protected Component onCreateLayout(ComponentContext c) { return create(c).paddingPx(HORIZONTAL, mHorizontalPadding).child(mComponent).build(); } }
@Override protected Component onCreateLayout(final ComponentContext c) { return create(c) .flexShrink(0) .paddingPx(HORIZONTAL, horizontalPadding) .child(sizeDependentComponentSpy) .build(); } };
@Override protected Component onCreateLayout(ComponentContext c) { return create(c) .paddingPx(ALL, 2) .child(new TestNullLayoutComponent()) .invisibleHandler(c.newEventHandler(2)) .build(); } };
@Override protected Component onCreateLayout(final ComponentContext c) { return create(c).paddingPx(HORIZONTAL, horizontalPadding).child(componentSpy).build(); } };
@Override protected Component onCreateLayout(final ComponentContext c) { return create(c).paddingPx(ALL, 2).child(new TestNullLayoutComponent()).build(); } };
@Override protected Component onCreateLayout(final ComponentContext c) { return create(c) .paddingPx(HORIZONTAL, horizontalPadding) .child(sizeDependentComponentSpy) .build(); } };
@Override protected Component onCreateLayout(final ComponentContext c) { return create(c) .paddingPx(ALL, 2) .child( TestSizeDependentComponent.create(c) .setFixSizes(true) .setDelegate(false) .marginPx(ALL, 11)) .build(); } };