@OnUnmount static void onUnmount( ComponentContext c, EditTextWithEventHandlers editText, @State AtomicReference<EditTextWithEventHandlers> mountedView) { mountedView.set(null); }
@OnUnmount static void onUnmount(ComponentContext context, LithoScrollView lithoScrollView) { lithoScrollView.setOnScrollChangeListener((NestedScrollView.OnScrollChangeListener) null); lithoScrollView.unmount(); }
@OnUnmount protected static void onUnmount( ComponentContext c, DraweeDrawable<GenericDraweeHierarchy> mountedDrawable) { mountedDrawable.unmount(); } }
@OnUnmount static void onUnmount(ComponentContext c, LithoView mountedView) { mountedView.setComponentTree(null); } }
@OnUnmount static void onUnmount() {}
@OnUnmount static void onUnmount( ComponentContext c, EditTextWithEventHandlers editText, @State AtomicReference<EditTextWithEventHandlers> mountedView) { editText.setTextState(null); mountedView.set(null); }
@OnUnmount static void onUnmount(ComponentContext c, TransparencyEnabledCardClipDrawable cardClipDrawable) { cardClipDrawable.setCornerRadius(0); cardClipDrawable.setBackgroundColor(Color.WHITE); } }
@OnUnmount static void onUnmount( ComponentContext c, MatrixDrawable convertDrawable, @Prop(resType = ResType.DRAWABLE) Drawable drawable) { convertDrawable.unmount(); }
@OnUnmount static void onUnmount( ComponentContext context, HorizontalScrollLithoView mountedView, @Prop(optional = true) HorizontalScrollEventsController eventsController) { mountedView.unmount(); if (eventsController != null) { eventsController.setScrollableView(null); } }
@OnUnmount static void onUnmount( ComponentContext c, TextDrawable textDrawable, @Prop(resType = ResType.STRING) CharSequence text) { textDrawable.unmount(); if (text instanceof MountableCharSequence) { ((MountableCharSequence) text).onUnmount(textDrawable); } }
@OnUnmount static void onUnmount(ComponentContext c, CardClipDrawable cardClipDrawable) { cardClipDrawable.setCornerRadius(0); cardClipDrawable.setClippingColor(Color.WHITE); cardClipDrawable.setDisableClip(NONE); } }
@OnUnmount static void onUnmount( ComponentContext c, ProgressBar progressBar, @Prop(optional = true, resType = ResType.COLOR) int color, @FromPrepare Drawable resolvedIndeterminateDrawable) { // restore the color first, since it acts on the indeterminateDrawable if (color != Color.TRANSPARENT && progressBar.getIndeterminateDrawable() != null) { progressBar.getIndeterminateDrawable().mutate().clearColorFilter(); } progressBar.setIndeterminateDrawable(null); }
@OnUnmount static void onUnmount( ComponentContext context, SectionsRecyclerView sectionsRecycler, @Prop Binder<RecyclerView> binder, @Prop(optional = true) RecyclerView.ItemDecoration itemDecoration, @Prop(optional = true, resType = ResType.COLOR) @Nullable Integer refreshProgressBarBackgroundColor, @Prop(optional = true) SnapHelper snapHelper) { final RecyclerView recyclerView = sectionsRecycler.getRecyclerView(); if (recyclerView == null) { throw new IllegalStateException( "RecyclerView not found, it should not be removed from SwipeRefreshLayout " + "before unmounting"); } recyclerView.setId(RecyclerSpec.recyclerViewId); if (refreshProgressBarBackgroundColor != null) { sectionsRecycler.setProgressBackgroundColorSchemeColor( DEFAULT_REFRESH_SPINNER_BACKGROUND_COLOR); } if (itemDecoration != null) { recyclerView.removeItemDecoration(itemDecoration); } binder.unmount(recyclerView); if (snapHelper != null) { snapHelper.attachToRecyclerView(null); } }