mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-19 04:13:18 +01:00
129 lines
5.2 KiB
Java
129 lines
5.2 KiB
Java
package com.google.android.material.transition;
|
|
|
|
import android.animation.Animator;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import androidx.annotation.AttrRes;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.annotation.RestrictTo;
|
|
import androidx.core.view.GravityCompat;
|
|
import androidx.transition.TransitionValues;
|
|
import com.google.android.material.R;
|
|
import defpackage.a$$ExternalSyntheticOutline0;
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes7.dex */
|
|
public final class MaterialSharedAxis extends MaterialVisibility<VisibilityAnimatorProvider> {
|
|
|
|
@AttrRes
|
|
private static final int DEFAULT_THEMED_DURATION_ATTR = R.attr.motionDurationLong1;
|
|
|
|
@AttrRes
|
|
private static final int DEFAULT_THEMED_EASING_ATTR = R.attr.motionEasingEmphasizedInterpolator;
|
|
public static final int X = 0;
|
|
public static final int Y = 1;
|
|
public static final int Z = 2;
|
|
private final int axis;
|
|
private final boolean forward;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Retention(RetentionPolicy.SOURCE)
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
|
|
public @interface Axis {
|
|
}
|
|
|
|
public MaterialSharedAxis(int i, boolean z) {
|
|
super(createPrimaryAnimatorProvider(i, z), createSecondaryAnimatorProvider());
|
|
this.axis = i;
|
|
this.forward = z;
|
|
}
|
|
|
|
private static VisibilityAnimatorProvider createPrimaryAnimatorProvider(int i, boolean z) {
|
|
if (i == 0) {
|
|
return new SlideDistanceProvider(z ? GravityCompat.END : GravityCompat.START);
|
|
}
|
|
if (i == 1) {
|
|
return new SlideDistanceProvider(z ? 80 : 48);
|
|
}
|
|
if (i == 2) {
|
|
return new ScaleProvider(z);
|
|
}
|
|
Single$$ExternalSyntheticBUOutline0.m$3(a$$ExternalSyntheticOutline0.m(i, "Invalid axis: "));
|
|
return null;
|
|
}
|
|
|
|
private static VisibilityAnimatorProvider createSecondaryAnimatorProvider() {
|
|
return new FadeThroughProvider();
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility
|
|
public /* bridge */ /* synthetic */ void addAdditionalAnimatorProvider(@NonNull VisibilityAnimatorProvider visibilityAnimatorProvider) {
|
|
super.addAdditionalAnimatorProvider(visibilityAnimatorProvider);
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility
|
|
public /* bridge */ /* synthetic */ void clearAdditionalAnimatorProvider() {
|
|
super.clearAdditionalAnimatorProvider();
|
|
}
|
|
|
|
public int getAxis() {
|
|
return this.axis;
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility
|
|
@AttrRes
|
|
public int getDurationThemeAttrResId(boolean z) {
|
|
return DEFAULT_THEMED_DURATION_ATTR;
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility
|
|
@AttrRes
|
|
public int getEasingThemeAttrResId(boolean z) {
|
|
return DEFAULT_THEMED_EASING_ATTR;
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility
|
|
@NonNull
|
|
public /* bridge */ /* synthetic */ VisibilityAnimatorProvider getPrimaryAnimatorProvider() {
|
|
return super.getPrimaryAnimatorProvider();
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility
|
|
@Nullable
|
|
public /* bridge */ /* synthetic */ VisibilityAnimatorProvider getSecondaryAnimatorProvider() {
|
|
return super.getSecondaryAnimatorProvider();
|
|
}
|
|
|
|
public boolean isForward() {
|
|
return this.forward;
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility, androidx.transition.Transition
|
|
public /* bridge */ /* synthetic */ boolean isSeekingSupported() {
|
|
return super.isSeekingSupported();
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility, androidx.transition.Visibility
|
|
public /* bridge */ /* synthetic */ Animator onAppear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
|
|
return super.onAppear(viewGroup, view, transitionValues, transitionValues2);
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility, androidx.transition.Visibility
|
|
public /* bridge */ /* synthetic */ Animator onDisappear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
|
|
return super.onDisappear(viewGroup, view, transitionValues, transitionValues2);
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility
|
|
public /* bridge */ /* synthetic */ boolean removeAdditionalAnimatorProvider(@NonNull VisibilityAnimatorProvider visibilityAnimatorProvider) {
|
|
return super.removeAdditionalAnimatorProvider(visibilityAnimatorProvider);
|
|
}
|
|
|
|
@Override // com.google.android.material.transition.MaterialVisibility
|
|
public /* bridge */ /* synthetic */ void setSecondaryAnimatorProvider(@Nullable VisibilityAnimatorProvider visibilityAnimatorProvider) {
|
|
super.setSecondaryAnimatorProvider(visibilityAnimatorProvider);
|
|
}
|
|
}
|