ADD week 5
This commit is contained in:
		| @@ -0,0 +1,106 @@ | ||||
| package com.google.android.material.transition; | ||||
|  | ||||
| import android.animation.Animator; | ||||
| import android.view.View; | ||||
| import android.view.ViewGroup; | ||||
| import androidx.core.view.GravityCompat; | ||||
| import androidx.transition.TransitionValues; | ||||
| import com.google.android.material.R; | ||||
| import java.lang.annotation.Retention; | ||||
| import java.lang.annotation.RetentionPolicy; | ||||
|  | ||||
| /* loaded from: classes.dex */ | ||||
| public final class MaterialSharedAxis extends MaterialVisibility<VisibilityAnimatorProvider> { | ||||
|     private static final int DEFAULT_THEMED_DURATION_ATTR = R.attr.motionDurationLong1; | ||||
|     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; | ||||
|  | ||||
|     @Retention(RetentionPolicy.SOURCE) | ||||
|     public @interface Axis { | ||||
|     } | ||||
|  | ||||
|     public int getAxis() { | ||||
|         return this.axis; | ||||
|     } | ||||
|  | ||||
|     @Override // com.google.android.material.transition.MaterialVisibility | ||||
|     int getDurationThemeAttrResId(boolean z) { | ||||
|         return DEFAULT_THEMED_DURATION_ATTR; | ||||
|     } | ||||
|  | ||||
|     @Override // com.google.android.material.transition.MaterialVisibility | ||||
|     int getEasingThemeAttrResId(boolean z) { | ||||
|         return DEFAULT_THEMED_EASING_ATTR; | ||||
|     } | ||||
|  | ||||
|     public boolean isForward() { | ||||
|         return this.forward; | ||||
|     } | ||||
|  | ||||
|     @Override // com.google.android.material.transition.MaterialVisibility | ||||
|     public /* bridge */ /* synthetic */ void addAdditionalAnimatorProvider(VisibilityAnimatorProvider visibilityAnimatorProvider) { | ||||
|         super.addAdditionalAnimatorProvider(visibilityAnimatorProvider); | ||||
|     } | ||||
|  | ||||
|     @Override // com.google.android.material.transition.MaterialVisibility | ||||
|     public /* bridge */ /* synthetic */ void clearAdditionalAnimatorProvider() { | ||||
|         super.clearAdditionalAnimatorProvider(); | ||||
|     } | ||||
|  | ||||
|     @Override // com.google.android.material.transition.MaterialVisibility | ||||
|     public /* bridge */ /* synthetic */ VisibilityAnimatorProvider getPrimaryAnimatorProvider() { | ||||
|         return super.getPrimaryAnimatorProvider(); | ||||
|     } | ||||
|  | ||||
|     @Override // com.google.android.material.transition.MaterialVisibility | ||||
|     public /* bridge */ /* synthetic */ VisibilityAnimatorProvider getSecondaryAnimatorProvider() { | ||||
|         return super.getSecondaryAnimatorProvider(); | ||||
|     } | ||||
|  | ||||
|     @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(VisibilityAnimatorProvider visibilityAnimatorProvider) { | ||||
|         return super.removeAdditionalAnimatorProvider(visibilityAnimatorProvider); | ||||
|     } | ||||
|  | ||||
|     @Override // com.google.android.material.transition.MaterialVisibility | ||||
|     public /* bridge */ /* synthetic */ void setSecondaryAnimatorProvider(VisibilityAnimatorProvider visibilityAnimatorProvider) { | ||||
|         super.setSecondaryAnimatorProvider(visibilityAnimatorProvider); | ||||
|     } | ||||
|  | ||||
|     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); | ||||
|         } | ||||
|         throw new IllegalArgumentException("Invalid axis: " + i); | ||||
|     } | ||||
|  | ||||
|     private static VisibilityAnimatorProvider createSecondaryAnimatorProvider() { | ||||
|         return new FadeThroughProvider(); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user