正在查看: CityMall v1.42.1 应用的 E.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CityMall v1.42.1 应用的 E.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.swmansion.rnscreens;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.animation.Animation;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsAnimationCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.fragment.app.Fragment;
import com.facebook.react.uimanager.c0;
import com.facebook.react.uimanager.events.EventDispatcher;
import com.facebook.react.uimanager.p0;
import com.facebook.react.uimanager.t0;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.shape.MaterialShapeDrawable;
import com.google.android.material.shape.ShapeAppearanceModel;
import com.simpl.android.fingerprint.BuildConfig;
import com.swmansion.rnscreens.I;
import com.swmansion.rnscreens.bottomsheet.SheetDelegate;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.SourceDebugExtension;
import y6.C0516e;
@Metadata
@SourceDebugExtension
public final class E extends x implements ScreenStackFragmentWrapper {
private x6.e A;
private SheetDelegate B;
private AppBarLayout i;
private Toolbar j;
private boolean k;
private boolean l;
private View m;
private C0193c n;
private Function1 y;
private B6.d z;
static final class a extends kotlin.jvm.internal.k implements Function1 {
public static final a i = new a();
a() {
super(1);
}
@Override
public final Float invoke(Number number) {
return Float.valueOf(0.0f);
}
}
static final class b extends kotlin.jvm.internal.k implements Function1 {
b() {
super(1);
}
@Override
public final Float invoke(Number number) {
return Float.valueOf(E.this.d().getHeight());
}
}
public static final class c extends WindowInsetsAnimationCompat.Callback {
c() {
super(0);
}
public WindowInsetsCompat onProgress(WindowInsetsCompat insets, List runningAnimations) {
kotlin.jvm.internal.j.i(insets, "insets");
kotlin.jvm.internal.j.i(runningAnimations, "runningAnimations");
return insets;
}
}
public E(C0208s screenView) {
super(screenView);
kotlin.jvm.internal.j.i(screenView, "screenView");
}
private final void R(C0208s c0208s) {
float g = c0.g(c0208s.getSheetCornerRadius());
ShapeAppearanceModel.b bVar = new ShapeAppearanceModel.b();
bVar.y(0, g);
bVar.D(0, g);
ShapeAppearanceModel m = bVar.m();
kotlin.jvm.internal.j.h(m, "build(...)");
MaterialShapeDrawable materialShapeDrawable = new MaterialShapeDrawable(m);
Integer j0 = j0(c0208s);
materialShapeDrawable.setTint(j0 != null ? j0.intValue() : 0);
c0208s.setBackground(materialShapeDrawable);
}
private final BottomSheetBehavior T() {
return new BottomSheetBehavior();
}
private final View W() {
View d = d();
while (d != null) {
if (d.isFocused()) {
return d;
}
d = d instanceof ViewGroup ? ((ViewGroup) d).getFocusedChild() : null;
}
return null;
}
private final z X() {
C0210u container = d().getContainer();
if (container instanceof z) {
return (z) container;
}
throw new IllegalStateException("ScreenStackFragment added into a non-stack container");
}
private final void a0() {
View view = getView();
ViewParent parent = view != null ? view.getParent() : null;
if (parent instanceof z) {
((z) parent).J();
}
}
public static final void b0(x6.e dimmingDelegate, ValueAnimator anim) {
kotlin.jvm.internal.j.i(dimmingDelegate, "$dimmingDelegate");
kotlin.jvm.internal.j.i(anim, "anim");
Object animatedValue = anim.getAnimatedValue();
Float f = animatedValue instanceof Float ? (Float) animatedValue : null;
if (f != null) {
dimmingDelegate.d().setAlpha(f.floatValue());
}
}
public static final void c0(E this$0, ValueAnimator anim) {
kotlin.jvm.internal.j.i(this$0, "this$0");
kotlin.jvm.internal.j.i(anim, "anim");
Object animatedValue = anim.getAnimatedValue();
Float f = animatedValue instanceof Float ? (Float) animatedValue : null;
if (f != null) {
this$0.d().setTranslationY(f.floatValue());
}
}
public static final void d0(x6.e dimmingDelegate, ValueAnimator anim) {
kotlin.jvm.internal.j.i(dimmingDelegate, "$dimmingDelegate");
kotlin.jvm.internal.j.i(anim, "anim");
Object animatedValue = anim.getAnimatedValue();
Float f = animatedValue instanceof Float ? (Float) animatedValue : null;
if (f != null) {
dimmingDelegate.d().setAlpha(f.floatValue());
}
}
public static final void e0(E this$0, ValueAnimator anim) {
kotlin.jvm.internal.j.i(this$0, "this$0");
kotlin.jvm.internal.j.i(anim, "anim");
Object animatedValue = anim.getAnimatedValue();
Float f = animatedValue instanceof Float ? (Float) animatedValue : null;
if (f != null) {
this$0.d().setTranslationY(f.floatValue());
}
}
private final x6.e g0(boolean z) {
x6.e eVar = this.A;
if (eVar == null || z) {
if (eVar != null) {
eVar.f(d().getSheetBehavior());
}
this.A = new x6.e(d().getReactContext(), d());
}
x6.e eVar2 = this.A;
kotlin.jvm.internal.j.f(eVar2);
return eVar2;
}
static x6.e h0(E e, boolean z, int i, Object obj) {
if ((i & 1) != 0) {
z = false;
}
return e.g0(z);
}
private final SheetDelegate i0() {
if (this.B == null) {
this.B = new SheetDelegate(d());
}
SheetDelegate sheetDelegate = this.B;
kotlin.jvm.internal.j.f(sheetDelegate);
return sheetDelegate;
}
private final Integer j0(C0208s c0208s) {
Integer valueOf;
ColorStateList D;
Drawable background = c0208s.getBackground();
ColorDrawable colorDrawable = background instanceof ColorDrawable ? (ColorDrawable) background : null;
if (colorDrawable != null) {
valueOf = Integer.valueOf(colorDrawable.getColor());
} else {
MaterialShapeDrawable background2 = c0208s.getBackground();
MaterialShapeDrawable materialShapeDrawable = background2 instanceof MaterialShapeDrawable ? background2 : null;
valueOf = (materialShapeDrawable == null || (D = materialShapeDrawable.D()) == null) ? null : Integer.valueOf(D.getDefaultColor());
}
if (valueOf != null) {
return valueOf;
}
ScreenContentWrapper contentWrapper = c0208s.getContentWrapper();
if (contentWrapper == null) {
return null;
}
return D6.f.a(contentWrapper);
}
private final boolean o0() {
G headerConfig = d().getHeaderConfig();
int configSubviewsCount = headerConfig != null ? headerConfig.getConfigSubviewsCount() : 0;
if (headerConfig != null && configSubviewsCount > 0) {
for (int i = 0; i < configSubviewsCount; i++) {
if (headerConfig.g(i).getType() == I.a.e) {
return true;
}
}
}
return false;
}
private final void p0(Menu menu) {
menu.clear();
if (o0()) {
Context context = getContext();
if (this.n == null && context != null) {
C0193c c0193c = new C0193c(context, this);
this.n = c0193c;
Function1 function1 = this.y;
if (function1 != null) {
function1.invoke(c0193c);
}
}
MenuItem add = menu.add(BuildConfig.FLAVOR);
add.setShowAsAction(2);
add.setActionView((View) this.n);
}
}
@Override
public void I() {
super.I();
a0();
d().e();
}
public boolean S() {
C0210u container = d().getContainer();
if (!(container instanceof z)) {
throw new IllegalStateException("ScreenStackFragment added into a non-stack container");
}
if (!kotlin.jvm.internal.j.d(((z) container).getRootScreen(), d())) {
return true;
}
Fragment parentFragment = getParentFragment();
if (parentFragment instanceof E) {
return ((E) parentFragment).S();
}
return false;
}
public void U() {
X().E(this);
}
public final void V() {
if (isRemoving() && isDetached()) {
return;
}
p0 reactContext = d().getReactContext();
int e = t0.e(reactContext);
EventDispatcher c2 = t0.c(reactContext, d().getId());
if (c2 != null) {
c2.h(new y6.h(e, d().getId()));
}
}
public final C0193c Y() {
return this.n;
}
public final SheetDelegate Z() {
return this.B;
}
@Override
public boolean e() {
return d().o();
}
public void f0() {
Toolbar toolbar;
AppBarLayout appBarLayout = this.i;
if (appBarLayout != null && (toolbar = this.j) != null && toolbar.getParent() == appBarLayout) {
appBarLayout.removeView(toolbar);
}
this.j = null;
}
@Override
public void j() {
super.j();
G headerConfig = d().getHeaderConfig();
if (headerConfig != null) {
headerConfig.l();
}
}
public final void k0(Function1 function1) {
this.y = function1;
}
public void l0(Toolbar toolbar) {
kotlin.jvm.internal.j.i(toolbar, "toolbar");
AppBarLayout appBarLayout = this.i;
if (appBarLayout != null) {
appBarLayout.addView(toolbar);
}
AppBarLayout.LayoutParams layoutParams = new AppBarLayout.LayoutParams(-1, -2);
layoutParams.g(0);
toolbar.setLayoutParams(layoutParams);
this.j = toolbar;
}
public void m0(boolean z) {
if (this.k != z) {
AppBarLayout appBarLayout = this.i;
if (appBarLayout != null) {
appBarLayout.setElevation(z ? 0.0f : c0.g(4.0f));
}
AppBarLayout appBarLayout2 = this.i;
if (appBarLayout2 != null) {
appBarLayout2.setStateListAnimator(null);
}
this.k = z;
}
}
public void n0(boolean z) {
if (this.l != z) {
CoordinatorLayout.d layoutParams = d().getLayoutParams();
kotlin.jvm.internal.j.g(layoutParams, "null cannot be cast to non-null type androidx.coordinatorlayout.widget.CoordinatorLayout.LayoutParams");
layoutParams.o(z ? null : new AppBarLayout.ScrollingViewBehavior());
this.l = z;
}
}
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
}
public Animation onCreateAnimation(int i, boolean z, int i2) {
return null;
}
public Animator onCreateAnimator(int i, boolean z, int i2) {
View view = null;
if (!x6.i.d(d())) {
return null;
}
?? animatorSet = new AnimatorSet();
final x6.e h0 = h0(this, false, 1, null);
if (z) {
ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, h0.e());
ofFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
E.b0(x6.e.this, valueAnimator);
}
});
ValueAnimator ofObject = ValueAnimator.ofObject(new C6.a(new b(), a.i), Float.valueOf(d().getHeight()), Float.valueOf(0.0f));
ofObject.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
E.c0(E.this, valueAnimator);
}
});
AnimatorSet.Builder play = h0.j(d(), d().getSheetInitialDetentIndex()) ? animatorSet.play(ofObject) : null;
if (play != null) {
play.with(ofFloat);
}
} else {
ValueAnimator ofFloat2 = ValueAnimator.ofFloat(h0.d().getAlpha(), 0.0f);
ofFloat2.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
E.d0(x6.e.this, valueAnimator);
}
});
?? r3 = this.z;
if (r3 == null) {
kotlin.jvm.internal.j.A("coordinatorLayout");
} else {
view = r3;
}
ValueAnimator ofFloat3 = ValueAnimator.ofFloat(0.0f, view.getBottom() - d().getTop());
ofFloat3.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
E.e0(E.this, valueAnimator);
}
});
animatorSet.play(ofFloat2).with(ofFloat3);
}
animatorSet.addListener(new C0516e(this, new y6.i(d()), z ? C0516e.a.a : C0516e.a.b));
return animatorSet;
}
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
kotlin.jvm.internal.j.i(menu, "menu");
kotlin.jvm.internal.j.i(inflater, "inflater");
p0(menu);
super.onCreateOptionsMenu(menu, inflater);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup viewGroup, Bundle bundle) {
AppBarLayout appBarLayout;
AppBarLayout appBarLayout2;
AppBarLayout appBarLayout3;
kotlin.jvm.internal.j.i(inflater, "inflater");
Context requireContext = requireContext();
kotlin.jvm.internal.j.h(requireContext, "requireContext(...)");
this.z = new B6.d(requireContext, this);
C0208s d = d();
CoordinatorLayout.d dVar = new CoordinatorLayout.d(-1, -1);
dVar.o(x6.i.d(d()) ? T() : this.l ? null : new AppBarLayout.ScrollingViewBehavior());
d.setLayoutParams(dVar);
CoordinatorLayout coordinatorLayout = this.z;
if (coordinatorLayout == null) {
kotlin.jvm.internal.j.A("coordinatorLayout");
coordinatorLayout = null;
}
coordinatorLayout.addView(z6.c.b(d()));
if (x6.i.d(d())) {
d().setClipToOutline(true);
R(d());
d().setElevation(d().getSheetElevation());
SheetDelegate i0 = i0();
BottomSheetBehavior<C0208s> sheetBehavior = d().getSheetBehavior();
kotlin.jvm.internal.j.f(sheetBehavior);
SheetDelegate.e(i0, sheetBehavior, null, 0, 6, null);
x6.e g0 = g0(true);
C0208s d2 = d();
CoordinatorLayout coordinatorLayout2 = this.z;
if (coordinatorLayout2 == null) {
kotlin.jvm.internal.j.A("coordinatorLayout");
coordinatorLayout2 = null;
}
g0.h(d2, coordinatorLayout2);
C0208s d3 = d();
BottomSheetBehavior sheetBehavior2 = d().getSheetBehavior();
kotlin.jvm.internal.j.f(sheetBehavior2);
g0.g(d3, sheetBehavior2);
C0210u container = d().getContainer();
kotlin.jvm.internal.j.f(container);
CoordinatorLayout coordinatorLayout3 = this.z;
if (coordinatorLayout3 == null) {
kotlin.jvm.internal.j.A("coordinatorLayout");
coordinatorLayout3 = null;
}
coordinatorLayout3.measure(View.MeasureSpec.makeMeasureSpec(container.getWidth(), 1073741824), View.MeasureSpec.makeMeasureSpec(container.getHeight(), 1073741824));
CoordinatorLayout coordinatorLayout4 = this.z;
if (coordinatorLayout4 == null) {
kotlin.jvm.internal.j.A("coordinatorLayout");
coordinatorLayout4 = null;
}
coordinatorLayout4.layout(0, 0, container.getWidth(), container.getHeight());
ViewCompat.J0(d(), new c());
} else {
Context context = getContext();
if (context != null) {
appBarLayout = new AppBarLayout(context);
appBarLayout.setBackgroundColor(0);
appBarLayout.setLayoutParams(new AppBarLayout.LayoutParams(-1, -2));
} else {
appBarLayout = null;
}
this.i = appBarLayout;
CoordinatorLayout coordinatorLayout5 = this.z;
if (coordinatorLayout5 == null) {
kotlin.jvm.internal.j.A("coordinatorLayout");
coordinatorLayout5 = null;
}
coordinatorLayout5.addView(this.i);
if (this.k && (appBarLayout3 = this.i) != null) {
appBarLayout3.setTargetElevation(0.0f);
}
Toolbar toolbar = this.j;
if (toolbar != null && (appBarLayout2 = this.i) != null) {
appBarLayout2.addView(z6.c.b(toolbar));
}
setHasOptionsMenu(true);
}
CoordinatorLayout coordinatorLayout6 = this.z;
if (coordinatorLayout6 != null) {
return coordinatorLayout6;
}
kotlin.jvm.internal.j.A("coordinatorLayout");
return null;
}
public void onPrepareOptionsMenu(Menu menu) {
G headerConfig;
kotlin.jvm.internal.j.i(menu, "menu");
if (!d().o() || ((headerConfig = d().getHeaderConfig()) != null && !headerConfig.h())) {
p0(menu);
}
super.onPrepareOptionsMenu(menu);
}
public void onStart() {
View view = this.m;
if (view != null) {
view.requestFocus();
}
super.onStart();
}
public void onStop() {
if (D6.a.a.a(getContext())) {
this.m = W();
}
super.onStop();
}
public void onViewCreated(View view, Bundle bundle) {
kotlin.jvm.internal.j.i(view, "view");
super.onViewCreated(view, bundle);
}
public E() {
throw new IllegalStateException("ScreenStack 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.");
}
}