@OnMount static void onMount(ComponentContext c, LithoView lithoView) { throw new RuntimeException("onMount crash"); }
@OnMount static void onMount( ComponentContext c, MatrixDrawable matrixDrawable, @Prop(resType = ResType.DRAWABLE) Drawable drawable, @FromBoundsDefined DrawableMatrix drawableMatrix) { matrixDrawable.mount(drawable, drawableMatrix); }
@OnMount static void onMount( ComponentContext c, ProgressBar progressBar, @Prop(optional = true, resType = ResType.COLOR) int color, @FromPrepare Drawable resolvedIndeterminateDrawable) { if (resolvedIndeterminateDrawable != null) { progressBar.setIndeterminateDrawable(resolvedIndeterminateDrawable); } if (color != Color.TRANSPARENT && progressBar.getIndeterminateDrawable() != null) { progressBar.getIndeterminateDrawable().mutate().setColorFilter( color, PorterDuff.Mode.MULTIPLY); } }
@OnMount static void onMount( ComponentContext c, TransparencyEnabledCardClipDrawable cardClipDrawable, @Prop(optional = true, resType = ResType.COLOR) int cardBackgroundColor, @Prop(optional = true, resType = ResType.DIMEN_OFFSET) float cornerRadius) { cardClipDrawable.setBackgroundColor(cardBackgroundColor); cardClipDrawable.setCornerRadius(cornerRadius); }
@OnMount static void onMount( ComponentContext c, Drawable drawable, @Prop String prop1, @Prop int prop2) {}
@OnMount static <S extends Object> void onMount( @Prop(optional = true) boolean prop5, @State(canUpdateLazily = true) long state1, @State S state2, @TreeProp TestTreeProp treeProp) {}
@OnMount static void onMount( ComponentContext c, CardClipDrawable cardClipDrawable, @Prop(optional = true, resType = ResType.COLOR) int clippingColor, @Prop(optional = true, resType = ResType.DIMEN_OFFSET) float cornerRadius, @Prop(optional = true) boolean disableClipTopLeft, @Prop(optional = true) boolean disableClipTopRight, @Prop(optional = true) boolean disableClipBottomLeft, @Prop(optional = true) boolean disableClipBottomRight) { cardClipDrawable.setClippingColor(clippingColor); cardClipDrawable.setCornerRadius(cornerRadius); int clipEdge = (disableClipTopLeft ? TOP_LEFT : NONE) | (disableClipTopRight ? TOP_RIGHT : NONE) | (disableClipBottomLeft ? BOTTOM_LEFT : NONE) | (disableClipBottomRight ? BOTTOM_RIGHT : NONE); cardClipDrawable.setDisableClip(clipEdge); }
@OnMount static void onMount( ComponentContext context, CardShadowDrawable cardShadowDrawable, @Prop(optional = true, resType = ResType.COLOR) int shadowStartColor, @Prop(optional = true, resType = ResType.COLOR) int shadowEndColor, @Prop(optional = true, resType = ResType.DIMEN_OFFSET) float cornerRadius, @Prop(optional = true, resType = ResType.DIMEN_SIZE) float shadowSize, @Prop(optional = true) boolean hideTopShadow, @Prop(optional = true) boolean hideBottomShadow) { cardShadowDrawable.setShadowStartColor(shadowStartColor); cardShadowDrawable.setShadowEndColor(shadowEndColor); cardShadowDrawable.setCornerRadius(cornerRadius); cardShadowDrawable.setShadowSize(shadowSize); cardShadowDrawable.setHideTopShadow(hideTopShadow); cardShadowDrawable.setHideBottomShadow(hideBottomShadow); } }
@OnMount static void onMount( final ComponentContext context,
@OnMount static void onMount( ComponentContext c,
@OnMount static void onMount( ComponentContext context, final LithoScrollView lithoScrollView, @Prop(optional = true) boolean scrollbarEnabled, @Prop(optional = true) boolean scrollbarFadingEnabled, @Prop(optional = true) boolean nestedScrollingEnabled, @Prop(optional = true) boolean incrementalMountEnabled, @Prop(optional = true) boolean verticalFadingEdgeEnabled, @Prop(optional = true, resType = ResType.DIMEN_SIZE) int fadingEdgeLength, @Prop(optional = true) NestedScrollView.OnScrollChangeListener onScrollChangeListener, @State ComponentTree childComponentTree, @State final ScrollPosition scrollPosition) { lithoScrollView.mount(childComponentTree, scrollPosition, incrementalMountEnabled); lithoScrollView.setScrollbarFadingEnabled(scrollbarFadingEnabled); lithoScrollView.setNestedScrollingEnabled(nestedScrollingEnabled); lithoScrollView.setVerticalFadingEdgeEnabled(verticalFadingEdgeEnabled); lithoScrollView.setFadingEdgeLength(fadingEdgeLength); // On older versions we need to disable the vertical scroll bar as otherwise we run into an NPE // that was only fixed in Lollipop - see // https://github.com/aosp-mirror/platform_frameworks_base/commit/6c8fef7fb866d244486a962dd82f4a6f26505f16#diff-7c8b4c8147fbbbf69293775bca384f31. if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { lithoScrollView.setVerticalScrollBarEnabled(false); } else { lithoScrollView.setVerticalScrollBarEnabled(scrollbarEnabled); } lithoScrollView.setOnScrollChangeListener(onScrollChangeListener); }
@OnMount static void onMount( final ComponentContext c,
@OnMount protected static void onMount( ComponentContext c,
@OnMount static void onMount( ComponentContext c,
@OnMount static void onMount( final ComponentContext c,