@PropDefault public final String getTitle() { return title; } }
@PropDefault public static void title$annotations() {} }
private static final int DEFAULT_SHADOW_SIZE_DP = 2; @PropDefault static final int cardBackgroundColor = Color.WHITE; @PropDefault static final int clippingColor = Color.TRANSPARENT; @PropDefault static final int shadowStartColor = 0x37000000; @PropDefault static final int shadowEndColor = 0x03000000; @PropDefault static final float cornerRadius = -1; @PropDefault static final float elevation = -1; @PropDefault static final int shadowBottomOverride = -1;
@PropDefault protected static final float imageAspectRatio = FrescoImageDefaults.DEFAULT_IMAGE_ASPECT_RATION; @PropDefault protected static final ScalingUtils.ScaleType actualImageScaleType = FrescoImageDefaults.DEFAULT_ACTUAL_IMAGE_SCALE_TYPE; @PropDefault protected static final int fadeDuration = FrescoImageDefaults.DEFAULT_FADE_DURATION; @PropDefault protected static final ScalingUtils.ScaleType failureImageScaleType = FrescoImageDefaults.DEFAULT_SCALE_TYPE; @PropDefault protected static final PointF placeholderImageFocusPoint = FrescoImageDefaults.DEFAULT_PLACEHOLDER_IMAGE_FOCUS_POINT; @PropDefault protected static final ScalingUtils.ScaleType placeholderImageScaleType = FrescoImageDefaults.DEFAULT_SCALE_TYPE; @PropDefault protected static final ScalingUtils.ScaleType progressBarImageScaleType = FrescoImageDefaults.DEFAULT_SCALE_TYPE; @PropDefault protected static final ScalingUtils.ScaleType retryImageScaleType = FrescoImageDefaults.DEFAULT_SCALE_TYPE;
private static final int DEFAULT_SHADOW_SIZE_DP = 2; @PropDefault static final int cardBackgroundColor = Color.WHITE; @PropDefault static final int clippingColor = Color.WHITE; @PropDefault static final int shadowStartColor = 0x37000000; @PropDefault static final int shadowEndColor = 0x03000000; @PropDefault static final float cornerRadius = -1; @PropDefault static final float elevation = -1; @PropDefault static final int shadowBottomOverride = -1;
@GroupSectionSpec public class TestGroupSectionSpec { @PropDefault public static final Boolean trimHeadAndTail = false; @PropDefault public static final Boolean trimSameInstancesOnly = false;
/** * A component that renders a solid color. * * @uidocs https://fburl.com/SolidColor:b0df * @prop color Color to be shown. * @prop alpha The alpha of the color, in the range [0.0, 1.0] */ @LayoutSpec class SolidColorSpec { @PropDefault static final float alpha = -1.0f; @OnCreateLayout static Component onCreateLayout( ComponentContext c, @Prop(resType = COLOR) int color, @Prop(optional = true, isCommonProp = true, overrideCommonPropBehavior = true) float alpha) { if (alpha >= 0f) { alpha = Math.min(1f, alpha); color = ColorUtils.setAlphaComponent(color, (int) (alpha * 255f)); } return Image.create(c) .scaleType(FIT_XY) .drawable(new ColorDrawable(color)) .build(); } }
class TransparencyEnabledCardClipSpec { @PropDefault static final int cardBackgroundColor = Color.WHITE;
@LayoutSpec public class LearningStateComponentSpec { @PropDefault static final boolean canClick = true;
private static final int SPINNER_HEIGHT = 48; @PropDefault static final int itemLayout = android.R.layout.simple_dropdown_item_1line; @PropDefault static final float selectedTextSize = -1; @PropDefault static final int selectedTextColor = 0xDE000000; // 87% Black
class CardClipSpec { @PropDefault static final int clippingColor = Color.WHITE;
@LayoutSpec static class TestSpec { @PropDefault protected static boolean arg0 = true; @PropDefault(resType = ResType.DIMEN_SIZE, resId = 12345) protected static float arg5; @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) {} @OnEvent(Object.class) public void testEventMethod(@Prop boolean arg0) {} @OnUpdateState public void testUpdateStateMethod() {} }
@PropDefault static final int color = Color.TRANSPARENT;
@LayoutSpec static class TestSpec<T extends CharSequence> { @PropDefault protected static final boolean arg0 = true; @OnEnteredRange(name = "enter") public void testEnteredRangeMethod(ComponentContext c, @Prop boolean arg0, @State int arg1) {} @OnExitedRange(name = "exit") public void testExitedRangeMethod(ComponentContext c, @Prop T arg2, @TreeProp int arg3) {} @OnEnteredRange(name = "prefetch") public void testEnteredPrefetchMethod( ComponentContext c, @Prop boolean arg0, @State int arg1) {} @OnExitedRange(name = "prefetch") public void testExitedPrefetchMethod(ComponentContext c, @Prop T arg2, @TreeProp int arg3) {} }
@LayoutSpec static class TestSpec<T extends CharSequence> { @PropDefault protected static boolean arg0 = true; @OnEvent(Object.class) public void testEventMethod1( @Prop boolean arg0, @State int arg1, @Param Object arg2, @Param T arg3, @FromEvent long arg4) {} @OnEvent(Object.class) public void testEventMethod2(@Prop boolean arg0, @State int arg1) {} }
@PropDefault static final boolean scrollbarEnabled = true;
@LayoutSpec static class TestSpec<T extends CharSequence> { @PropDefault protected static final boolean arg0 = true; @OnTrigger(TestEvent.class) public Object testTriggerMethod1( @Prop boolean arg0, @State int arg1, @Param Object arg2, @Param T arg3, @FromTrigger long arg4) { return null; } @OnTrigger(Object.class) public void testTriggerMethod2(@Prop boolean arg0, @State int arg1) {} }
@LayoutSpec static class TestWithTransitionSpec { @PropDefault protected static boolean arg0 = true; @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) {} @OnUpdateState public void testUpdateStateMethod() {} @OnUpdateStateWithTransition public void testUpdateStateWithTransitionMethod() {} }
@LayoutSpec static class TestSpec { @PropDefault protected static boolean arg0 = true; @OnCreateLayout public void testDelegateMethod( @Prop boolean arg0, @State int arg1, @Param Object arg2, @TreeProp long arg3, @Prop @Nullable Component arg4, @Prop List<Component> arg5, @Prop List<String> arg6, @TreeProp Set<List<Row>> arg7, @TreeProp Set<Integer> arg8) {} @OnEvent(Object.class) public void testEventMethod( @Prop boolean arg0, @State int arg1, @Param Object arg2, @TreeProp long arg3, @Prop @Nullable Component arg4) {} @OnUpdateState public void testUpdateStateMethod() {} }
@MountSpec static class MountTestSpec { @PropDefault protected static boolean arg0 = true; @OnBind public void testDelegateMethod( @Prop boolean arg0, @Prop @Nullable Component arg4, @Prop List<Component> arg5, @Prop List<String> arg6, @State int arg1, @Param Object arg2, @TreeProp long arg3, @TreeProp Set<List<Row>> arg7, @TreeProp Set<Integer> arg8) {} @OnEvent(Object.class) public void testEventMethod( @Prop boolean arg0, @Prop @Nullable Component arg4, @State int arg1, @Param Object arg2, @TreeProp long arg3) {} @OnUpdateState public void testUpdateStateMethod() {} }