- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
79 lines
2.8 KiB
Java
79 lines
2.8 KiB
Java
package androidx.fragment.app;
|
|
|
|
import android.view.View;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.collection.ArrayMap;
|
|
import androidx.core.app.SharedElementCallback;
|
|
import java.util.ArrayList;
|
|
|
|
/* loaded from: classes.dex */
|
|
class FragmentTransition {
|
|
static final FragmentTransitionImpl PLATFORM_IMPL = new FragmentTransitionCompat21();
|
|
static final FragmentTransitionImpl SUPPORT_IMPL = resolveSupportImpl();
|
|
|
|
public static boolean supportsTransition() {
|
|
return (PLATFORM_IMPL == null && SUPPORT_IMPL == null) ? false : true;
|
|
}
|
|
|
|
private static FragmentTransitionImpl resolveSupportImpl() {
|
|
try {
|
|
return (FragmentTransitionImpl) Class.forName("androidx.transition.FragmentTransitionSupport").getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
|
|
} catch (Exception unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static String findKeyForValue(ArrayMap<String, String> arrayMap, String str) {
|
|
int size = arrayMap.size();
|
|
for (int i = 0; i < size; i++) {
|
|
if (str.equals(arrayMap.valueAt(i))) {
|
|
return arrayMap.keyAt(i);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static void retainValues(@NonNull ArrayMap<String, String> arrayMap, @NonNull ArrayMap<String, View> arrayMap2) {
|
|
for (int size = arrayMap.size() - 1; size >= 0; size--) {
|
|
if (!arrayMap2.containsKey(arrayMap.valueAt(size))) {
|
|
arrayMap.removeAt(size);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static void callSharedElementStartEnd(Fragment fragment, Fragment fragment2, boolean z, ArrayMap<String, View> arrayMap, boolean z2) {
|
|
SharedElementCallback enterTransitionCallback;
|
|
if (z) {
|
|
enterTransitionCallback = fragment2.getEnterTransitionCallback();
|
|
} else {
|
|
enterTransitionCallback = fragment.getEnterTransitionCallback();
|
|
}
|
|
if (enterTransitionCallback != null) {
|
|
ArrayList arrayList = new ArrayList();
|
|
ArrayList arrayList2 = new ArrayList();
|
|
int size = arrayMap == null ? 0 : arrayMap.size();
|
|
for (int i = 0; i < size; i++) {
|
|
arrayList2.add(arrayMap.keyAt(i));
|
|
arrayList.add(arrayMap.valueAt(i));
|
|
}
|
|
if (z2) {
|
|
enterTransitionCallback.onSharedElementStart(arrayList2, arrayList, null);
|
|
} else {
|
|
enterTransitionCallback.onSharedElementEnd(arrayList2, arrayList, null);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static void setViewVisibility(ArrayList<View> arrayList, int i) {
|
|
if (arrayList == null) {
|
|
return;
|
|
}
|
|
for (int size = arrayList.size() - 1; size >= 0; size--) {
|
|
arrayList.get(size).setVisibility(i);
|
|
}
|
|
}
|
|
|
|
private FragmentTransition() {
|
|
}
|
|
}
|