package com.youth.banner.transformer; import android.view.View; import androidx.viewpager.widget.ViewPager; /* loaded from: classes2.dex */ public abstract class ABaseTransformer implements ViewPager.PageTransformer { @Override // androidx.viewpager.widget.ViewPager.PageTransformer public void a(View view, float f) { c(view, f); d(view, f); b(view, f); } protected boolean a() { return true; } protected void b(View view, float f) { } protected abstract boolean b(); protected void c(View view, float f) { float width = view.getWidth(); float f2 = 0.0f; view.setRotationX(0.0f); view.setRotationY(0.0f); view.setRotation(0.0f); view.setScaleX(1.0f); view.setScaleY(1.0f); view.setPivotX(0.0f); view.setPivotY(0.0f); view.setTranslationY(0.0f); view.setTranslationX(b() ? 0.0f : (-width) * f); if (!a()) { view.setAlpha(1.0f); return; } if (f > -1.0f && f < 1.0f) { f2 = 1.0f; } view.setAlpha(f2); } protected abstract void d(View view, float f); }