正在查看: Niza v1.4.3 应用的 ScreenFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Niza v1.4.3 应用的 ScreenFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.swmansion.rnscreens;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.FrameLayout;
import androidx.fragment.app.Fragment;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.uimanager.UIManagerHelper;
import com.facebook.react.uimanager.events.EventDispatcher;
import com.sumsub.sns.internal.ml.docdetector.c;
import com.swmansion.rnscreens.events.HeaderBackButtonClickedEvent;
import com.swmansion.rnscreens.events.ScreenAppearEvent;
import com.swmansion.rnscreens.events.ScreenDisappearEvent;
import com.swmansion.rnscreens.events.ScreenDismissedEvent;
import com.swmansion.rnscreens.events.ScreenTransitionProgressEvent;
import com.swmansion.rnscreens.events.ScreenWillAppearEvent;
import com.swmansion.rnscreens.events.ScreenWillDisappearEvent;
import io.sentry.protocol.Request;
import io.sentry.protocol.ViewHierarchyNode;
import io.sentry.rrweb.RRWebVideoEvent;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000p\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010!\n\u0000\n\u0002\u0010\u0007\n\u0002\b\u0007\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u000f\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0016\u0018\u0000 C2\u00020\u00012\u00020\u0002:\u0003CDEB\u0007\b\u0016¢\u0006\u0002\u0010\u0003B\u000f\b\u0017\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J\u0010\u0010\u001d\u001a\u00020\u001e2\u0006\u0010\u001f\u001a\u00020\fH\u0016J\u0010\u0010 \u001a\u00020\b2\u0006\u0010!\u001a\u00020\"H\u0016J\b\u0010#\u001a\u00020\u001eH\u0016J\u0018\u0010$\u001a\u00020\u001e2\u0006\u0010!\u001a\u00020\"2\u0006\u0010%\u001a\u00020\u0002H\u0016J\u0010\u0010&\u001a\u00020\u001e2\u0006\u0010!\u001a\u00020\"H\u0016J\b\u0010'\u001a\u00020\u001eH\u0002J\b\u0010(\u001a\u00020\u001eH\u0002J\b\u0010)\u001a\u00020\u001eH\u0002J\b\u0010*\u001a\u00020\u001eH\u0002J\u0018\u0010+\u001a\u00020\u001e2\u0006\u0010,\u001a\u00020\u00162\u0006\u0010-\u001a\u00020\bH\u0016J\u0010\u0010.\u001a\u00020\u001e2\u0006\u0010/\u001a\u00020\bH\u0002J\b\u00100\u001a\u00020\u001eH\u0016J&\u00101\u001a\u0004\u0018\u0001022\u0006\u00103\u001a\u0002042\b\u0010\u001f\u001a\u0004\u0018\u0001052\b\u00106\u001a\u0004\u0018\u000107H\u0016J\b\u00108\u001a\u00020\u001eH\u0016J\b\u00109\u001a\u00020\u001eH\u0016J\b\u0010:\u001a\u00020\u001eH\u0016J\b\u0010;\u001a\u00020\u001eH\u0016J\u0010\u0010<\u001a\u00020\u001e2\u0006\u0010\u001f\u001a\u00020\fH\u0016J\n\u0010=\u001a\u0004\u0018\u00010>H\u0016J\n\u0010?\u001a\u0004\u0018\u00010@H\u0016J\u0010\u0010A\u001a\u00020\u001e2\u0006\u0010!\u001a\u00020\"H\u0016J\b\u0010B\u001a\u00020\u001eH\u0002R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\bX\u0082\u000e¢\u0006\u0002\n\u0000R\u001a\u0010\n\u001a\b\u0012\u0004\u0012\u00020\f0\u000b8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\r\u0010\u000eR\u0014\u0010\u000f\u001a\u00020\u00018VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0010\u0010\u0011R\u000e\u0010\u0012\u001a\u00020\bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0014\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\f0\u0014X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0015\u001a\u00020\u0016X\u0082\u000e¢\u0006\u0002\n\u0000R \u0010\u0017\u001a\u00020\u0005X\u0096.¢\u0006\u0014\n\u0000\u0012\u0004\b\u0018\u0010\u0003\u001a\u0004\b\u0019\u0010\u001a\"\u0004\b\u001b\u0010\u0006R\u000e\u0010\u001c\u001a\u00020\bX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006F"}, d2 = {"Lcom/swmansion/rnscreens/ScreenFragment;", "Landroidx/fragment/app/Fragment;", "Lcom/swmansion/rnscreens/ScreenFragmentWrapper;", "()V", "screenView", "Lcom/swmansion/rnscreens/Screen;", "(Lcom/swmansion/rnscreens/Screen;)V", "canDispatchAppear", "", "canDispatchWillAppear", "childScreenContainers", "", "Lcom/swmansion/rnscreens/ScreenContainer;", "getChildScreenContainers", "()Ljava/util/List;", Request.JsonKeys.FRAGMENT, "getFragment", "()Landroidx/fragment/app/Fragment;", "isTransitioning", "mChildScreenContainers", "", "mProgress", "", "screen", "getScreen$annotations", "getScreen", "()Lcom/swmansion/rnscreens/Screen;", "setScreen", "shouldUpdateOnResume", "addChildScreenContainer", "", RRWebVideoEvent.JsonKeys.CONTAINER, "canDispatchLifecycleEvent", "event", "Lcom/swmansion/rnscreens/ScreenFragment$ScreenLifecycleEvent;", "dispatchHeaderBackButtonClickedEvent", "dispatchLifecycleEvent", "fragmentWrapper", "dispatchLifecycleEventInChildContainers", "dispatchOnAppear", "dispatchOnDisappear", "dispatchOnWillAppear", "dispatchOnWillDisappear", "dispatchTransitionProgressEvent", ViewHierarchyNode.JsonKeys.ALPHA, "closing", "dispatchViewAnimationEvent", "animationEnd", "onContainerUpdate", "onCreateView", "Landroid/view/View;", "inflater", "Landroid/view/LayoutInflater;", "Landroid/view/ViewGroup;", "savedInstanceState", "Landroid/os/Bundle;", "onDestroy", "onResume", "onViewAnimationEnd", "onViewAnimationStart", "removeChildScreenContainer", "tryGetActivity", "Landroid/app/Activity;", "tryGetContext", "Lcom/facebook/react/bridge/ReactContext;", "updateLastEventDispatched", "updateWindowTraits", "Companion", "ScreenLifecycleEvent", "ScreensFrameLayout", "react-native-screens_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public class ScreenFragment extends Fragment implements ScreenFragmentWrapper {
public static final Companion INSTANCE = new Companion(null);
private boolean canDispatchAppear;
private boolean canDispatchWillAppear;
private boolean isTransitioning;
private final List<ScreenContainer> mChildScreenContainers;
private float mProgress;
public Screen screen;
private boolean shouldUpdateOnResume;
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0006\b\u0086\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004j\u0002\b\u0005j\u0002\b\u0006¨\u0006\u0007"}, d2 = {"Lcom/swmansion/rnscreens/ScreenFragment$ScreenLifecycleEvent;", "", "(Ljava/lang/String;I)V", "Appear", "WillAppear", "Disappear", "WillDisappear", "react-native-screens_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public enum ScreenLifecycleEvent {
Appear,
WillAppear,
Disappear,
WillDisappear
}
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
public class WhenMappings {
public static final int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[ScreenLifecycleEvent.values().length];
try {
iArr[ScreenLifecycleEvent.WillAppear.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[ScreenLifecycleEvent.Appear.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[ScreenLifecycleEvent.WillDisappear.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
iArr[ScreenLifecycleEvent.Disappear.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
$EnumSwitchMapping$0 = iArr;
}
}
public static void getScreen$annotations() {
}
@JvmStatic
protected static final View recycleView(View view) {
return INSTANCE.recycleView(view);
}
@Override
public Fragment getFragment() {
return this;
}
@Override
public Screen getScreen() {
Screen screen = this.screen;
if (screen != null) {
return screen;
}
Intrinsics.throwUninitializedPropertyAccessException("screen");
return null;
}
@Override
public void setScreen(Screen screen) {
Intrinsics.checkNotNullParameter(screen, "<set-?>");
this.screen = screen;
}
public ScreenFragment() {
this.mChildScreenContainers = new ArrayList();
this.mProgress = -1.0f;
this.canDispatchWillAppear = true;
this.canDispatchAppear = true;
throw new IllegalStateException("Screen fragments should never be restored. Follow instructions from https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067 to properly configure your main activity.");
}
public ScreenFragment(Screen screenView) {
Intrinsics.checkNotNullParameter(screenView, "screenView");
this.mChildScreenContainers = new ArrayList();
this.mProgress = -1.0f;
this.canDispatchWillAppear = true;
this.canDispatchAppear = true;
setScreen(screenView);
}
public void onResume() {
super.onResume();
if (this.shouldUpdateOnResume) {
this.shouldUpdateOnResume = false;
ScreenWindowTraits.INSTANCE.trySetWindowTraits$react_native_screens_release(getScreen(), tryGetActivity(), tryGetContext());
}
}
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ScreensFrameLayout screensFrameLayout;
Intrinsics.checkNotNullParameter(inflater, "inflater");
getScreen().setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
Context context = getContext();
if (context != null) {
screensFrameLayout = new ScreensFrameLayout(context);
screensFrameLayout.addView(recycleView(getScreen()));
} else {
screensFrameLayout = null;
}
return screensFrameLayout;
}
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\b\u0010\u0005\u001a\u00020\u0006H\u0016¨\u0006\u0007"}, d2 = {"Lcom/swmansion/rnscreens/ScreenFragment$ScreensFrameLayout;", "Landroid/widget/FrameLayout;", "context", "Landroid/content/Context;", "(Landroid/content/Context;)V", "clearFocus", "", "react-native-screens_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
private static final class ScreensFrameLayout extends FrameLayout {
public ScreensFrameLayout(Context context) {
super(context);
Intrinsics.checkNotNullParameter(context, "context");
}
@Override
public void clearFocus() {
if (getVisibility() != 4) {
super.clearFocus();
}
}
}
@Override
public void onContainerUpdate() {
updateWindowTraits();
}
private final void updateWindowTraits() {
Activity activity = getActivity();
if (activity == null) {
this.shouldUpdateOnResume = true;
} else {
ScreenWindowTraits.INSTANCE.trySetWindowTraits$react_native_screens_release(getScreen(), activity, tryGetContext());
}
}
@Override
public Activity tryGetActivity() {
Fragment fragment;
Activity activity;
Activity activity2 = getActivity();
if (activity2 != null) {
return activity2;
}
ReactContext context = getScreen().getContext();
if (context instanceof ReactContext) {
ReactContext reactContext = context;
if (reactContext.getCurrentActivity() != null) {
return reactContext.getCurrentActivity();
}
}
for (ScreenContainer container = getScreen().getContainer(); container != null; container = container.getParent()) {
if ((container instanceof Screen) && (fragment = ((Screen) container).getFragment()) != null && (activity = fragment.getActivity()) != null) {
return activity;
}
}
return null;
}
@Override
public ReactContext tryGetContext() {
if (getContext() instanceof ReactContext) {
ReactContext context = getContext();
Intrinsics.checkNotNull(context, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
return context;
}
if (getScreen().getContext() instanceof ReactContext) {
ReactContext context2 = getScreen().getContext();
Intrinsics.checkNotNull(context2, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
return context2;
}
for (ScreenContainer container = getScreen().getContainer(); container != null; container = container.getParent()) {
if (container instanceof Screen) {
Screen screen = (Screen) container;
if (screen.getContext() instanceof ReactContext) {
ReactContext context3 = screen.getContext();
Intrinsics.checkNotNull(context3, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
return context3;
}
}
}
return null;
}
@Override
public List<ScreenContainer> getChildScreenContainers() {
return this.mChildScreenContainers;
}
@Override
public boolean canDispatchLifecycleEvent(ScreenLifecycleEvent event) {
Intrinsics.checkNotNullParameter(event, "event");
int i = WhenMappings.$EnumSwitchMapping$0[event.ordinal()];
if (i == 1) {
return this.canDispatchWillAppear;
}
if (i == 2) {
return this.canDispatchAppear;
}
if (i != 3) {
if (i != 4) {
throw new NoWhenBranchMatchedException();
}
if (!this.canDispatchAppear) {
return true;
}
} else if (!this.canDispatchWillAppear) {
return true;
}
return false;
}
@Override
public void updateLastEventDispatched(ScreenLifecycleEvent event) {
Intrinsics.checkNotNullParameter(event, "event");
int i = WhenMappings.$EnumSwitchMapping$0[event.ordinal()];
if (i == 1) {
this.canDispatchWillAppear = false;
return;
}
if (i == 2) {
this.canDispatchAppear = false;
} else if (i == 3) {
this.canDispatchWillAppear = true;
} else {
if (i != 4) {
return;
}
this.canDispatchAppear = true;
}
}
private final void dispatchOnWillAppear() {
dispatchLifecycleEvent(ScreenLifecycleEvent.WillAppear, this);
dispatchTransitionProgressEvent(c.a, false);
}
private final void dispatchOnAppear() {
dispatchLifecycleEvent(ScreenLifecycleEvent.Appear, this);
dispatchTransitionProgressEvent(1.0f, false);
}
private final void dispatchOnWillDisappear() {
dispatchLifecycleEvent(ScreenLifecycleEvent.WillDisappear, this);
dispatchTransitionProgressEvent(c.a, true);
}
private final void dispatchOnDisappear() {
dispatchLifecycleEvent(ScreenLifecycleEvent.Disappear, this);
dispatchTransitionProgressEvent(1.0f, true);
}
@Override
public void dispatchLifecycleEvent(ScreenLifecycleEvent event, ScreenFragmentWrapper fragmentWrapper) {
ScreenWillAppearEvent screenWillAppearEvent;
Intrinsics.checkNotNullParameter(event, "event");
Intrinsics.checkNotNullParameter(fragmentWrapper, "fragmentWrapper");
Fragment fragment = fragmentWrapper.getFragment();
if (fragment instanceof ScreenStackFragment) {
ScreenStackFragment screenStackFragment = (ScreenStackFragment) fragment;
if (screenStackFragment.canDispatchLifecycleEvent(event)) {
Screen screen = screenStackFragment.getScreen();
fragmentWrapper.updateLastEventDispatched(event);
int surfaceId = UIManagerHelper.getSurfaceId(screen);
int i = WhenMappings.$EnumSwitchMapping$0[event.ordinal()];
if (i == 1) {
screenWillAppearEvent = new ScreenWillAppearEvent(surfaceId, screen.getId());
} else if (i == 2) {
screenWillAppearEvent = new ScreenAppearEvent(surfaceId, screen.getId());
} else if (i == 3) {
screenWillAppearEvent = new ScreenWillDisappearEvent(surfaceId, screen.getId());
} else {
if (i != 4) {
throw new NoWhenBranchMatchedException();
}
screenWillAppearEvent = new ScreenDisappearEvent(surfaceId, screen.getId());
}
ReactContext context = getScreen().getContext();
Intrinsics.checkNotNull(context, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
EventDispatcher eventDispatcherForReactTag = UIManagerHelper.getEventDispatcherForReactTag(context, getScreen().getId());
if (eventDispatcherForReactTag != null) {
eventDispatcherForReactTag.dispatchEvent(screenWillAppearEvent);
}
fragmentWrapper.dispatchLifecycleEventInChildContainers(event);
}
}
}
@Override
public void dispatchLifecycleEventInChildContainers(ScreenLifecycleEvent event) {
ScreenFragmentWrapper fragmentWrapper;
Intrinsics.checkNotNullParameter(event, "event");
List<ScreenContainer> list = this.mChildScreenContainers;
ArrayList arrayList = new ArrayList();
for (Object obj : list) {
if (((ScreenContainer) obj).getScreenCount() > 0) {
arrayList.add(obj);
}
}
Iterator it = arrayList.iterator();
while (it.hasNext()) {
Screen topScreen = ((ScreenContainer) it.next()).getTopScreen();
if (topScreen != null && (fragmentWrapper = topScreen.getFragmentWrapper()) != null) {
dispatchLifecycleEvent(event, fragmentWrapper);
}
}
}
@Override
public void dispatchHeaderBackButtonClickedEvent() {
Context context = getScreen().getContext();
Intrinsics.checkNotNull(context, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
Context context2 = (ReactContext) context;
int surfaceId = UIManagerHelper.getSurfaceId(context2);
EventDispatcher eventDispatcherForReactTag = UIManagerHelper.getEventDispatcherForReactTag(context2, getScreen().getId());
if (eventDispatcherForReactTag != null) {
eventDispatcherForReactTag.dispatchEvent(new HeaderBackButtonClickedEvent(surfaceId, getScreen().getId()));
}
}
@Override
public void dispatchTransitionProgressEvent(float alpha, boolean closing) {
if (this instanceof ScreenStackFragment) {
if (this.mProgress == alpha) {
return;
}
float max = Math.max(c.a, Math.min(1.0f, alpha));
this.mProgress = max;
if (!(max == c.a)) {
r1 = (max != 1.0f ? 0 : 1) != 0 ? 2 : 3;
}
short s = (short) r1;
ScreenContainer container = getScreen().getContainer();
boolean goingForward = container instanceof ScreenStack ? ((ScreenStack) container).getGoingForward() : false;
Context context = getScreen().getContext();
Intrinsics.checkNotNull(context, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
Context context2 = (ReactContext) context;
EventDispatcher eventDispatcherForReactTag = UIManagerHelper.getEventDispatcherForReactTag(context2, getScreen().getId());
if (eventDispatcherForReactTag != null) {
eventDispatcherForReactTag.dispatchEvent(new ScreenTransitionProgressEvent(UIManagerHelper.getSurfaceId(context2), getScreen().getId(), this.mProgress, closing, goingForward, s));
}
}
}
@Override
public void addChildScreenContainer(ScreenContainer container) {
Intrinsics.checkNotNullParameter(container, "container");
this.mChildScreenContainers.add(container);
}
@Override
public void removeChildScreenContainer(ScreenContainer container) {
Intrinsics.checkNotNullParameter(container, "container");
this.mChildScreenContainers.remove(container);
}
@Override
public void onViewAnimationStart() {
dispatchViewAnimationEvent(false);
}
@Override
public void onViewAnimationEnd() {
dispatchViewAnimationEvent(true);
}
private final void dispatchViewAnimationEvent(final boolean animationEnd) {
this.isTransitioning = !animationEnd;
Fragment parentFragment = getParentFragment();
if (parentFragment == null || ((parentFragment instanceof ScreenFragment) && !((ScreenFragment) parentFragment).isTransitioning)) {
if (isResumed()) {
UiThreadUtil.runOnUiThread(new Runnable() {
@Override
public final void run() {
ScreenFragment.dispatchViewAnimationEvent$lambda$8(animationEnd, this);
}
});
} else if (animationEnd) {
dispatchOnDisappear();
} else {
dispatchOnWillDisappear();
}
}
}
public static final void dispatchViewAnimationEvent$lambda$8(boolean z, ScreenFragment this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
if (z) {
this$0.dispatchOnAppear();
} else {
this$0.dispatchOnWillAppear();
}
}
public void onDestroy() {
super.onDestroy();
ScreenContainer container = getScreen().getContainer();
if (container == null || !container.hasScreen(this)) {
ReactContext context = getScreen().getContext();
if (context instanceof ReactContext) {
int surfaceId = UIManagerHelper.getSurfaceId(context);
EventDispatcher eventDispatcherForReactTag = UIManagerHelper.getEventDispatcherForReactTag(context, getScreen().getId());
if (eventDispatcherForReactTag != null) {
eventDispatcherForReactTag.dispatchEvent(new ScreenDismissedEvent(surfaceId, getScreen().getId()));
}
}
}
this.mChildScreenContainers.clear();
}
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0004H\u0005¨\u0006\u0006"}, d2 = {"Lcom/swmansion/rnscreens/ScreenFragment$Companion;", "", "()V", "recycleView", "Landroid/view/View;", "view", "react-native-screens_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
@JvmStatic
protected final View recycleView(View view) {
Intrinsics.checkNotNullParameter(view, "view");
ViewParent parent = view.getParent();
if (parent != null) {
ViewGroup viewGroup = (ViewGroup) parent;
viewGroup.endViewTransition(view);
viewGroup.removeView(view);
}
view.setVisibility(0);
return view;
}
}
}