package androidx.slidingpanelayout.widget;

import X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20;
import X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.accessibility.AccessibilityEvent;
import androidx.customview.view.AbsSavedState;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
/* loaded from: classes.dex */
public class SlidingPaneLayout extends ViewGroup {

    /* renamed from: IFxWkV_5  reason: collision with root package name */
    public boolean f3566IFxWkV_5;
    public float KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public int f2512KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2 f2513KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Rect f2514KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Drawable f2515KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public View f2516KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Mqv2r_3 f2517KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Field f2518KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Method f2519KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final ArrayList<QxJ9d_1> f2520KQgRr5e_0;

    /* renamed from: Mqv2r_3  reason: collision with root package name */
    public float f3567Mqv2r_3;

    /* renamed from: Mqv2r_3  reason: collision with other field name */
    public int f2521Mqv2r_3;

    /* renamed from: Mqv2r_3  reason: collision with other field name */
    public boolean f2522Mqv2r_3;
    public float PGPF6hQ_2;

    /* renamed from: PGPF6hQ_2  reason: collision with other field name */
    public final int f2523PGPF6hQ_2;

    /* renamed from: PGPF6hQ_2  reason: collision with other field name */
    public boolean f2524PGPF6hQ_2;
    public float QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public int f2525QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public Drawable f2526QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public boolean f2527QxJ9d_1;

    /* renamed from: X6FRs_4  reason: collision with root package name */
    public int f3568X6FRs_4;

    /* renamed from: X6FRs_4  reason: collision with other field name */
    public boolean f2528X6FRs_4;

    /* loaded from: classes.dex */
    public class KQgRr5e_0 extends X6FRs_4.IMuAHx_6.EuDEkJe_12.KQgRr5e_0 {
        public final Rect KQgRr5e_0 = new Rect();

        public KQgRr5e_0() {
        }

        public boolean KQgRr5e_0(View view) {
            return SlidingPaneLayout.this.m982KQgRr5e_0(view);
        }

        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.KQgRr5e_0
        public void onInitializeAccessibilityEvent(View view, AccessibilityEvent accessibilityEvent) {
            super.onInitializeAccessibilityEvent(view, accessibilityEvent);
            accessibilityEvent.setClassName(SlidingPaneLayout.class.getName());
        }

        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.KQgRr5e_0
        public void onInitializeAccessibilityNodeInfo(View view, X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3 mqv2r_3) {
            X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3 KQgRr5e_0 = X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3.KQgRr5e_0(mqv2r_3);
            super.onInitializeAccessibilityNodeInfo(view, KQgRr5e_0);
            KQgRr5e_0(mqv2r_3, KQgRr5e_0);
            KQgRr5e_0.m238QxJ9d_1();
            mqv2r_3.m231KQgRr5e_0((CharSequence) SlidingPaneLayout.class.getName());
            mqv2r_3.Mqv2r_3(view);
            ViewParent m259KQgRr5e_0 = ZzDuCHW_20.m259KQgRr5e_0(view);
            if (m259KQgRr5e_0 instanceof View) {
                mqv2r_3.PGPF6hQ_2((View) m259KQgRr5e_0);
            }
            int childCount = SlidingPaneLayout.this.getChildCount();
            for (int i = 0; i < childCount; i++) {
                View childAt = SlidingPaneLayout.this.getChildAt(i);
                if (!KQgRr5e_0(childAt) && childAt.getVisibility() == 0) {
                    ZzDuCHW_20.IMuAHx_6(childAt, 1);
                    mqv2r_3.m230KQgRr5e_0(childAt);
                }
            }
        }

        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.KQgRr5e_0
        public boolean onRequestSendAccessibilityEvent(ViewGroup viewGroup, View view, AccessibilityEvent accessibilityEvent) {
            if (KQgRr5e_0(view)) {
                return false;
            }
            return super.onRequestSendAccessibilityEvent(viewGroup, view, accessibilityEvent);
        }

        public final void KQgRr5e_0(X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3 mqv2r_3, X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3 mqv2r_32) {
            Rect rect = this.KQgRr5e_0;
            mqv2r_32.KQgRr5e_0(rect);
            mqv2r_3.PGPF6hQ_2(rect);
            mqv2r_32.QxJ9d_1(rect);
            mqv2r_3.Mqv2r_3(rect);
            mqv2r_3.JZJr_16(mqv2r_32.EuDEkJe_12());
            mqv2r_3.X6FRs_4(mqv2r_32.m235PGPF6hQ_2());
            mqv2r_3.m231KQgRr5e_0(mqv2r_32.m226KQgRr5e_0());
            mqv2r_3.QxJ9d_1(mqv2r_32.m237QxJ9d_1());
            mqv2r_3.FSaI4_7(mqv2r_32.IFxWkV_5());
            mqv2r_3.X6FRs_4(mqv2r_32.X6FRs_4());
            mqv2r_3.Xgtqvk_8(mqv2r_32.IMuAHx_6());
            mqv2r_3.XnFJ5_9(mqv2r_32.FSaI4_7());
            mqv2r_3.KQgRr5e_0(mqv2r_32.m240QxJ9d_1());
            mqv2r_3.YghfZG_14(mqv2r_32.KNBe_11());
            mqv2r_3.KNBe_11(mqv2r_32.Xgtqvk_8());
            mqv2r_3.m229KQgRr5e_0(mqv2r_32.m222KQgRr5e_0());
            mqv2r_3.QxJ9d_1(mqv2r_32.PGPF6hQ_2());
        }
    }

    /* loaded from: classes.dex */
    public interface Mqv2r_3 {
        void KQgRr5e_0(View view);

        void KQgRr5e_0(View view, float f);

        void QxJ9d_1(View view);
    }

    /* loaded from: classes.dex */
    public class PGPF6hQ_2 extends PGPF6hQ_2.AbstractC0068PGPF6hQ_2 {
        public PGPF6hQ_2() {
        }

        @Override // X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.AbstractC0068PGPF6hQ_2
        public int clampViewPositionHorizontal(View view, int i, int i2) {
            LayoutParams layoutParams = (LayoutParams) SlidingPaneLayout.this.f2516KQgRr5e_0.getLayoutParams();
            if (SlidingPaneLayout.this.QxJ9d_1()) {
                int width = SlidingPaneLayout.this.getWidth() - ((SlidingPaneLayout.this.getPaddingRight() + ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin) + SlidingPaneLayout.this.f2516KQgRr5e_0.getWidth());
                return Math.max(Math.min(i, width), width - SlidingPaneLayout.this.f2521Mqv2r_3);
            }
            int paddingLeft = SlidingPaneLayout.this.getPaddingLeft() + ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin;
            return Math.min(Math.max(i, paddingLeft), SlidingPaneLayout.this.f2521Mqv2r_3 + paddingLeft);
        }

        @Override // X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.AbstractC0068PGPF6hQ_2
        public int clampViewPositionVertical(View view, int i, int i2) {
            return view.getTop();
        }

        @Override // X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.AbstractC0068PGPF6hQ_2
        public int getViewHorizontalDragRange(View view) {
            return SlidingPaneLayout.this.f2521Mqv2r_3;
        }

        @Override // X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.AbstractC0068PGPF6hQ_2
        public void onEdgeDragStarted(int i, int i2) {
            SlidingPaneLayout slidingPaneLayout = SlidingPaneLayout.this;
            slidingPaneLayout.f2513KQgRr5e_0.KQgRr5e_0(slidingPaneLayout.f2516KQgRr5e_0, i2);
        }

        @Override // X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.AbstractC0068PGPF6hQ_2
        public void onViewCaptured(View view, int i) {
            SlidingPaneLayout.this.KQgRr5e_0();
        }

        @Override // X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.AbstractC0068PGPF6hQ_2
        public void onViewDragStateChanged(int i) {
            if (SlidingPaneLayout.this.f2513KQgRr5e_0.PGPF6hQ_2() == 0) {
                SlidingPaneLayout slidingPaneLayout = SlidingPaneLayout.this;
                if (slidingPaneLayout.KQgRr5e_0 == 0.0f) {
                    slidingPaneLayout.X6FRs_4(slidingPaneLayout.f2516KQgRr5e_0);
                    SlidingPaneLayout slidingPaneLayout2 = SlidingPaneLayout.this;
                    slidingPaneLayout2.KQgRr5e_0(slidingPaneLayout2.f2516KQgRr5e_0);
                    SlidingPaneLayout.this.f2522Mqv2r_3 = false;
                    return;
                }
                slidingPaneLayout.m983QxJ9d_1(slidingPaneLayout.f2516KQgRr5e_0);
                SlidingPaneLayout.this.f2522Mqv2r_3 = true;
            }
        }

        @Override // X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.AbstractC0068PGPF6hQ_2
        public void onViewPositionChanged(View view, int i, int i2, int i3, int i4) {
            SlidingPaneLayout.this.KQgRr5e_0(i);
            SlidingPaneLayout.this.invalidate();
        }

        @Override // X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.AbstractC0068PGPF6hQ_2
        public void onViewReleased(View view, float f, float f2) {
            int paddingLeft;
            LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
            if (SlidingPaneLayout.this.QxJ9d_1()) {
                int paddingRight = SlidingPaneLayout.this.getPaddingRight() + ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin;
                if (f < 0.0f || (f == 0.0f && SlidingPaneLayout.this.KQgRr5e_0 > 0.5f)) {
                    paddingRight += SlidingPaneLayout.this.f2521Mqv2r_3;
                }
                paddingLeft = (SlidingPaneLayout.this.getWidth() - paddingRight) - SlidingPaneLayout.this.f2516KQgRr5e_0.getWidth();
            } else {
                paddingLeft = ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin + SlidingPaneLayout.this.getPaddingLeft();
                if (f > 0.0f || (f == 0.0f && SlidingPaneLayout.this.KQgRr5e_0 > 0.5f)) {
                    paddingLeft += SlidingPaneLayout.this.f2521Mqv2r_3;
                }
            }
            SlidingPaneLayout.this.f2513KQgRr5e_0.PGPF6hQ_2(paddingLeft, view.getTop());
            SlidingPaneLayout.this.invalidate();
        }

        @Override // X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.AbstractC0068PGPF6hQ_2
        public boolean tryCaptureView(View view, int i) {
            if (SlidingPaneLayout.this.f2524PGPF6hQ_2) {
                return false;
            }
            return ((LayoutParams) view.getLayoutParams()).f2532KQgRr5e_0;
        }
    }

    /* loaded from: classes.dex */
    public class QxJ9d_1 implements Runnable {
        public final View KQgRr5e_0;

        public QxJ9d_1(View view) {
            this.KQgRr5e_0 = view;
        }

        @Override // java.lang.Runnable
        public void run() {
            if (this.KQgRr5e_0.getParent() == SlidingPaneLayout.this) {
                this.KQgRr5e_0.setLayerType(0, null);
                SlidingPaneLayout.this.Mqv2r_3(this.KQgRr5e_0);
            }
            SlidingPaneLayout.this.f2520KQgRr5e_0.remove(this);
        }
    }

    /* loaded from: classes.dex */
    public static class SavedState extends AbsSavedState {
        public static final Parcelable.Creator<SavedState> CREATOR = new KQgRr5e_0();
        public boolean QxJ9d_1;

        /* loaded from: classes.dex */
        public static class KQgRr5e_0 implements Parcelable.ClassLoaderCreator<SavedState> {
            @Override // android.os.Parcelable.ClassLoaderCreator
            /* renamed from: KQgRr5e_0 */
            public SavedState createFromParcel(Parcel parcel, ClassLoader classLoader) {
                return new SavedState(parcel, null);
            }

            @Override // android.os.Parcelable.Creator
            /* renamed from: KQgRr5e_0 */
            public SavedState createFromParcel(Parcel parcel) {
                return new SavedState(parcel, null);
            }

            @Override // android.os.Parcelable.Creator
            /* renamed from: KQgRr5e_0 */
            public SavedState[] newArray(int i) {
                return new SavedState[i];
            }
        }

        public SavedState(Parcelable parcelable) {
            super(parcelable);
        }

        @Override // androidx.customview.view.AbsSavedState, android.os.Parcelable
        public void writeToParcel(Parcel parcel, int i) {
            super.writeToParcel(parcel, i);
            parcel.writeInt(this.QxJ9d_1 ? 1 : 0);
        }

        public SavedState(Parcel parcel, ClassLoader classLoader) {
            super(parcel, classLoader);
            this.QxJ9d_1 = parcel.readInt() != 0;
        }
    }

    public SlidingPaneLayout(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    public void KQgRr5e_0(View view) {
        Mqv2r_3 mqv2r_3 = this.f2517KQgRr5e_0;
        if (mqv2r_3 != null) {
            mqv2r_3.KQgRr5e_0(view);
        }
        sendAccessibilityEvent(32);
    }

    public boolean Mqv2r_3() {
        return this.f2527QxJ9d_1;
    }

    public void PGPF6hQ_2(View view) {
        Mqv2r_3 mqv2r_3 = this.f2517KQgRr5e_0;
        if (mqv2r_3 != null) {
            mqv2r_3.KQgRr5e_0(view, this.KQgRr5e_0);
        }
    }

    /* renamed from: QxJ9d_1  reason: collision with other method in class */
    public void m983QxJ9d_1(View view) {
        Mqv2r_3 mqv2r_3 = this.f2517KQgRr5e_0;
        if (mqv2r_3 != null) {
            mqv2r_3.QxJ9d_1(view);
        }
        sendAccessibilityEvent(32);
    }

    public void X6FRs_4(View view) {
        int i;
        int i2;
        int i3;
        int i4;
        View childAt;
        boolean z;
        View view2 = view;
        boolean QxJ9d_12 = QxJ9d_1();
        int width = QxJ9d_12 ? getWidth() - getPaddingRight() : getPaddingLeft();
        int paddingLeft = QxJ9d_12 ? getPaddingLeft() : getWidth() - getPaddingRight();
        int paddingTop = getPaddingTop();
        int height = getHeight() - getPaddingBottom();
        if (view2 == null || !QxJ9d_1(view)) {
            i = 0;
            i2 = 0;
            i3 = 0;
            i4 = 0;
        } else {
            i = view.getLeft();
            i2 = view.getRight();
            i3 = view.getTop();
            i4 = view.getBottom();
        }
        int childCount = getChildCount();
        int i5 = 0;
        while (i5 < childCount && (childAt = getChildAt(i5)) != view2) {
            if (childAt.getVisibility() == 8) {
                z = QxJ9d_12;
            } else {
                z = QxJ9d_12;
                childAt.setVisibility((Math.max(QxJ9d_12 ? paddingLeft : width, childAt.getLeft()) < i || Math.max(paddingTop, childAt.getTop()) < i3 || Math.min(QxJ9d_12 ? width : paddingLeft, childAt.getRight()) > i2 || Math.min(height, childAt.getBottom()) > i4) ? 0 : 4);
            }
            i5++;
            view2 = view;
            QxJ9d_12 = z;
        }
    }

    @Override // android.view.ViewGroup
    public boolean checkLayoutParams(ViewGroup.LayoutParams layoutParams) {
        return (layoutParams instanceof LayoutParams) && super.checkLayoutParams(layoutParams);
    }

    @Override // android.view.View
    public void computeScroll() {
        if (this.f2513KQgRr5e_0.KQgRr5e_0(true)) {
            if (!this.f2527QxJ9d_1) {
                this.f2513KQgRr5e_0.m585KQgRr5e_0();
            } else {
                ZzDuCHW_20.m262KQgRr5e_0((View) this);
            }
        }
    }

    @Override // android.view.View
    public void draw(Canvas canvas) {
        Drawable drawable;
        int i;
        int i2;
        super.draw(canvas);
        if (QxJ9d_1()) {
            drawable = this.f2526QxJ9d_1;
        } else {
            drawable = this.f2515KQgRr5e_0;
        }
        View childAt = getChildCount() > 1 ? getChildAt(1) : null;
        if (childAt == null || drawable == null) {
            return;
        }
        int top = childAt.getTop();
        int bottom = childAt.getBottom();
        int intrinsicWidth = drawable.getIntrinsicWidth();
        if (QxJ9d_1()) {
            i2 = childAt.getRight();
            i = intrinsicWidth + i2;
        } else {
            int left = childAt.getLeft();
            int i3 = left - intrinsicWidth;
            i = left;
            i2 = i3;
        }
        drawable.setBounds(i2, top, i, bottom);
        drawable.draw(canvas);
    }

    @Override // android.view.ViewGroup
    public boolean drawChild(Canvas canvas, View view, long j) {
        LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
        int save = canvas.save();
        if (this.f2527QxJ9d_1 && !layoutParams.f2532KQgRr5e_0 && this.f2516KQgRr5e_0 != null) {
            canvas.getClipBounds(this.f2514KQgRr5e_0);
            if (QxJ9d_1()) {
                Rect rect = this.f2514KQgRr5e_0;
                rect.left = Math.max(rect.left, this.f2516KQgRr5e_0.getRight());
            } else {
                Rect rect2 = this.f2514KQgRr5e_0;
                rect2.right = Math.min(rect2.right, this.f2516KQgRr5e_0.getLeft());
            }
            canvas.clipRect(this.f2514KQgRr5e_0);
        }
        boolean drawChild = super.drawChild(canvas, view, j);
        canvas.restoreToCount(save);
        return drawChild;
    }

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateDefaultLayoutParams() {
        return new LayoutParams();
    }

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
        return layoutParams instanceof ViewGroup.MarginLayoutParams ? new LayoutParams((ViewGroup.MarginLayoutParams) layoutParams) : new LayoutParams(layoutParams);
    }

    public int getCoveredFadeColor() {
        return this.f2525QxJ9d_1;
    }

    public int getParallaxDistance() {
        return this.f3568X6FRs_4;
    }

    public int getSliderFadeColor() {
        return this.f2512KQgRr5e_0;
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        this.f2528X6FRs_4 = true;
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        this.f2528X6FRs_4 = true;
        int size = this.f2520KQgRr5e_0.size();
        for (int i = 0; i < size; i++) {
            this.f2520KQgRr5e_0.get(i).run();
        }
        this.f2520KQgRr5e_0.clear();
    }

    @Override // android.view.ViewGroup
    public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
        boolean z;
        View childAt;
        int actionMasked = motionEvent.getActionMasked();
        if (!this.f2527QxJ9d_1 && actionMasked == 0 && getChildCount() > 1 && (childAt = getChildAt(1)) != null) {
            this.f2522Mqv2r_3 = !this.f2513KQgRr5e_0.KQgRr5e_0(childAt, (int) motionEvent.getX(), (int) motionEvent.getY());
        }
        if (!this.f2527QxJ9d_1 || (this.f2524PGPF6hQ_2 && actionMasked != 0)) {
            this.f2513KQgRr5e_0.m594QxJ9d_1();
            return super.onInterceptTouchEvent(motionEvent);
        } else if (actionMasked == 3 || actionMasked == 1) {
            this.f2513KQgRr5e_0.m594QxJ9d_1();
            return false;
        } else {
            if (actionMasked == 0) {
                this.f2524PGPF6hQ_2 = false;
                float x = motionEvent.getX();
                float y = motionEvent.getY();
                this.PGPF6hQ_2 = x;
                this.f3567Mqv2r_3 = y;
                if (this.f2513KQgRr5e_0.KQgRr5e_0(this.f2516KQgRr5e_0, (int) x, (int) y) && m982KQgRr5e_0(this.f2516KQgRr5e_0)) {
                    z = true;
                    return this.f2513KQgRr5e_0.m590KQgRr5e_0(motionEvent) || z;
                }
            } else if (actionMasked == 2) {
                float x2 = motionEvent.getX();
                float y2 = motionEvent.getY();
                float abs = Math.abs(x2 - this.PGPF6hQ_2);
                float abs2 = Math.abs(y2 - this.f3567Mqv2r_3);
                if (abs > this.f2513KQgRr5e_0.QxJ9d_1() && abs2 > abs) {
                    this.f2513KQgRr5e_0.m594QxJ9d_1();
                    this.f2524PGPF6hQ_2 = true;
                    return false;
                }
            }
            z = false;
            if (this.f2513KQgRr5e_0.m590KQgRr5e_0(motionEvent)) {
                return true;
            }
        }
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onLayout(boolean z, int i, int i2, int i3, int i4) {
        int i5;
        int i6;
        int i7;
        int i8;
        boolean QxJ9d_12 = QxJ9d_1();
        if (QxJ9d_12) {
            this.f2513KQgRr5e_0.Mqv2r_3(2);
        } else {
            this.f2513KQgRr5e_0.Mqv2r_3(1);
        }
        int i9 = i3 - i;
        int paddingRight = QxJ9d_12 ? getPaddingRight() : getPaddingLeft();
        int paddingLeft = QxJ9d_12 ? getPaddingLeft() : getPaddingRight();
        int paddingTop = getPaddingTop();
        int childCount = getChildCount();
        if (this.f2528X6FRs_4) {
            this.KQgRr5e_0 = (this.f2527QxJ9d_1 && this.f2522Mqv2r_3) ? 1.0f : 0.0f;
        }
        int i10 = paddingRight;
        for (int i11 = 0; i11 < childCount; i11++) {
            View childAt = getChildAt(i11);
            if (childAt.getVisibility() != 8) {
                LayoutParams layoutParams = (LayoutParams) childAt.getLayoutParams();
                int measuredWidth = childAt.getMeasuredWidth();
                if (layoutParams.f2532KQgRr5e_0) {
                    int i12 = i9 - paddingLeft;
                    int min = (Math.min(paddingRight, i12 - this.f2523PGPF6hQ_2) - i10) - (((ViewGroup.MarginLayoutParams) layoutParams).leftMargin + ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin);
                    this.f2521Mqv2r_3 = min;
                    int i13 = QxJ9d_12 ? ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin : ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin;
                    layoutParams.QxJ9d_1 = ((i10 + i13) + min) + (measuredWidth / 2) > i12;
                    int i14 = (int) (min * this.KQgRr5e_0);
                    i10 += i13 + i14;
                    this.KQgRr5e_0 = i14 / this.f2521Mqv2r_3;
                    i5 = 0;
                } else if (!this.f2527QxJ9d_1 || (i6 = this.f3568X6FRs_4) == 0) {
                    i10 = paddingRight;
                    i5 = 0;
                } else {
                    i5 = (int) ((1.0f - this.KQgRr5e_0) * i6);
                    i10 = paddingRight;
                }
                if (QxJ9d_12) {
                    i8 = (i9 - i10) + i5;
                    i7 = i8 - measuredWidth;
                } else {
                    i7 = i10 - i5;
                    i8 = i7 + measuredWidth;
                }
                childAt.layout(i7, paddingTop, i8, childAt.getMeasuredHeight() + paddingTop);
                paddingRight += childAt.getWidth();
            }
        }
        if (this.f2528X6FRs_4) {
            if (this.f2527QxJ9d_1) {
                if (this.f3568X6FRs_4 != 0) {
                    KQgRr5e_0(this.KQgRr5e_0);
                }
                if (((LayoutParams) this.f2516KQgRr5e_0.getLayoutParams()).QxJ9d_1) {
                    KQgRr5e_0(this.f2516KQgRr5e_0, this.KQgRr5e_0, this.f2512KQgRr5e_0);
                }
            } else {
                for (int i15 = 0; i15 < childCount; i15++) {
                    KQgRr5e_0(getChildAt(i15), 0.0f, this.f2512KQgRr5e_0);
                }
            }
            X6FRs_4(this.f2516KQgRr5e_0);
        }
        this.f2528X6FRs_4 = false;
    }

    @Override // android.view.View
    public void onMeasure(int i, int i2) {
        int paddingTop;
        int i3;
        int i4;
        int makeMeasureSpec;
        int i5;
        int i6;
        int makeMeasureSpec2;
        float f;
        int i7;
        int makeMeasureSpec3;
        int makeMeasureSpec4;
        int i8;
        int mode = View.MeasureSpec.getMode(i);
        int size = View.MeasureSpec.getSize(i);
        int mode2 = View.MeasureSpec.getMode(i2);
        int size2 = View.MeasureSpec.getSize(i2);
        if (mode != 1073741824) {
            if (!isInEditMode()) {
                throw new IllegalStateException("Width must have an exact value or MATCH_PARENT");
            }
            if (mode != Integer.MIN_VALUE && mode == 0) {
                size = 300;
            }
        } else if (mode2 == 0) {
            if (!isInEditMode()) {
                throw new IllegalStateException("Height must not be UNSPECIFIED");
            }
            if (mode2 == 0) {
                mode2 = X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID;
                size2 = 300;
            }
        }
        boolean z = false;
        if (mode2 == Integer.MIN_VALUE) {
            paddingTop = (size2 - getPaddingTop()) - getPaddingBottom();
            i3 = 0;
        } else if (mode2 != 1073741824) {
            i3 = 0;
            paddingTop = 0;
        } else {
            i3 = (size2 - getPaddingTop()) - getPaddingBottom();
            paddingTop = i3;
        }
        int paddingLeft = (size - getPaddingLeft()) - getPaddingRight();
        int childCount = getChildCount();
        if (childCount > 2) {
            Log.e("SlidingPaneLayout", "onMeasure: More than two child views are not supported.");
        }
        this.f2516KQgRr5e_0 = null;
        int i9 = paddingLeft;
        int i10 = 0;
        boolean z2 = false;
        float f2 = 0.0f;
        while (true) {
            i4 = 8;
            if (i10 >= childCount) {
                break;
            }
            View childAt = getChildAt(i10);
            LayoutParams layoutParams = (LayoutParams) childAt.getLayoutParams();
            if (childAt.getVisibility() == 8) {
                layoutParams.QxJ9d_1 = z;
            } else {
                float f3 = layoutParams.f2530KQgRr5e_0;
                if (f3 > 0.0f) {
                    f2 += f3;
                    if (((ViewGroup.MarginLayoutParams) layoutParams).width == 0) {
                    }
                }
                int i11 = ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin + ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin;
                int i12 = ((ViewGroup.MarginLayoutParams) layoutParams).width;
                if (i12 == -2) {
                    makeMeasureSpec3 = View.MeasureSpec.makeMeasureSpec(paddingLeft - i11, X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID);
                    f = f2;
                    i7 = X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID;
                } else {
                    f = f2;
                    i7 = X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID;
                    if (i12 == -1) {
                        makeMeasureSpec3 = View.MeasureSpec.makeMeasureSpec(paddingLeft - i11, 1073741824);
                    } else {
                        makeMeasureSpec3 = View.MeasureSpec.makeMeasureSpec(i12, 1073741824);
                    }
                }
                int i13 = ((ViewGroup.MarginLayoutParams) layoutParams).height;
                if (i13 == -2) {
                    i8 = View.MeasureSpec.makeMeasureSpec(paddingTop, i7);
                } else {
                    if (i13 == -1) {
                        makeMeasureSpec4 = View.MeasureSpec.makeMeasureSpec(paddingTop, 1073741824);
                    } else {
                        makeMeasureSpec4 = View.MeasureSpec.makeMeasureSpec(i13, 1073741824);
                    }
                    i8 = makeMeasureSpec4;
                }
                childAt.measure(makeMeasureSpec3, i8);
                int measuredWidth = childAt.getMeasuredWidth();
                int measuredHeight = childAt.getMeasuredHeight();
                if (mode2 == i7 && measuredHeight > i3) {
                    i3 = Math.min(measuredHeight, paddingTop);
                }
                i9 -= measuredWidth;
                boolean z3 = i9 < 0;
                layoutParams.f2532KQgRr5e_0 = z3;
                z2 |= z3;
                if (z3) {
                    this.f2516KQgRr5e_0 = childAt;
                }
                f2 = f;
            }
            i10++;
            z = false;
        }
        if (z2 || f2 > 0.0f) {
            int i14 = paddingLeft - this.f2523PGPF6hQ_2;
            int i15 = 0;
            while (i15 < childCount) {
                View childAt2 = getChildAt(i15);
                if (childAt2.getVisibility() != i4) {
                    LayoutParams layoutParams2 = (LayoutParams) childAt2.getLayoutParams();
                    if (childAt2.getVisibility() != i4) {
                        boolean z4 = ((ViewGroup.MarginLayoutParams) layoutParams2).width == 0 && layoutParams2.f2530KQgRr5e_0 > 0.0f;
                        int measuredWidth2 = z4 ? 0 : childAt2.getMeasuredWidth();
                        if (z2 && childAt2 != this.f2516KQgRr5e_0) {
                            if (((ViewGroup.MarginLayoutParams) layoutParams2).width < 0 && (measuredWidth2 > i14 || layoutParams2.f2530KQgRr5e_0 > 0.0f)) {
                                if (z4) {
                                    int i16 = ((ViewGroup.MarginLayoutParams) layoutParams2).height;
                                    if (i16 == -2) {
                                        makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(paddingTop, X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID);
                                        i6 = 1073741824;
                                    } else if (i16 == -1) {
                                        i6 = 1073741824;
                                        makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(paddingTop, 1073741824);
                                    } else {
                                        i6 = 1073741824;
                                        makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i16, 1073741824);
                                    }
                                } else {
                                    i6 = 1073741824;
                                    makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(childAt2.getMeasuredHeight(), 1073741824);
                                }
                                childAt2.measure(View.MeasureSpec.makeMeasureSpec(i14, i6), makeMeasureSpec2);
                            }
                        } else if (layoutParams2.f2530KQgRr5e_0 > 0.0f) {
                            if (((ViewGroup.MarginLayoutParams) layoutParams2).width == 0) {
                                int i17 = ((ViewGroup.MarginLayoutParams) layoutParams2).height;
                                if (i17 == -2) {
                                    makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(paddingTop, X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID);
                                } else if (i17 == -1) {
                                    makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(paddingTop, 1073741824);
                                } else {
                                    makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(i17, 1073741824);
                                }
                            } else {
                                makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(childAt2.getMeasuredHeight(), 1073741824);
                            }
                            if (z2) {
                                int i18 = paddingLeft - (((ViewGroup.MarginLayoutParams) layoutParams2).leftMargin + ((ViewGroup.MarginLayoutParams) layoutParams2).rightMargin);
                                i5 = i14;
                                int makeMeasureSpec5 = View.MeasureSpec.makeMeasureSpec(i18, 1073741824);
                                if (measuredWidth2 != i18) {
                                    childAt2.measure(makeMeasureSpec5, makeMeasureSpec);
                                }
                                i15++;
                                i14 = i5;
                                i4 = 8;
                            } else {
                                i5 = i14;
                                childAt2.measure(View.MeasureSpec.makeMeasureSpec(measuredWidth2 + ((int) ((layoutParams2.f2530KQgRr5e_0 * Math.max(0, i9)) / f2)), 1073741824), makeMeasureSpec);
                                i15++;
                                i14 = i5;
                                i4 = 8;
                            }
                        }
                    }
                }
                i5 = i14;
                i15++;
                i14 = i5;
                i4 = 8;
            }
        }
        setMeasuredDimension(size, i3 + getPaddingTop() + getPaddingBottom());
        this.f2527QxJ9d_1 = z2;
        if (this.f2513KQgRr5e_0.PGPF6hQ_2() == 0 || z2) {
            return;
        }
        this.f2513KQgRr5e_0.m585KQgRr5e_0();
    }

    @Override // android.view.View
    public void onRestoreInstanceState(Parcelable parcelable) {
        if (!(parcelable instanceof SavedState)) {
            super.onRestoreInstanceState(parcelable);
            return;
        }
        SavedState savedState = (SavedState) parcelable;
        super.onRestoreInstanceState(savedState.getSuperState());
        if (savedState.QxJ9d_1) {
            X6FRs_4();
        } else {
            m981KQgRr5e_0();
        }
        this.f2522Mqv2r_3 = savedState.QxJ9d_1;
    }

    @Override // android.view.View
    public Parcelable onSaveInstanceState() {
        SavedState savedState = new SavedState(super.onSaveInstanceState());
        savedState.QxJ9d_1 = Mqv2r_3() ? PGPF6hQ_2() : this.f2522Mqv2r_3;
        return savedState;
    }

    @Override // android.view.View
    public void onSizeChanged(int i, int i2, int i3, int i4) {
        super.onSizeChanged(i, i2, i3, i4);
        if (i != i3) {
            this.f2528X6FRs_4 = true;
        }
    }

    @Override // android.view.View
    public boolean onTouchEvent(MotionEvent motionEvent) {
        if (!this.f2527QxJ9d_1) {
            return super.onTouchEvent(motionEvent);
        }
        this.f2513KQgRr5e_0.KQgRr5e_0(motionEvent);
        int actionMasked = motionEvent.getActionMasked();
        if (actionMasked != 0) {
            if (actionMasked == 1 && m982KQgRr5e_0(this.f2516KQgRr5e_0)) {
                float x = motionEvent.getX();
                float y = motionEvent.getY();
                float f = x - this.PGPF6hQ_2;
                float f2 = y - this.f3567Mqv2r_3;
                int QxJ9d_12 = this.f2513KQgRr5e_0.QxJ9d_1();
                if ((f * f) + (f2 * f2) < QxJ9d_12 * QxJ9d_12 && this.f2513KQgRr5e_0.KQgRr5e_0(this.f2516KQgRr5e_0, (int) x, (int) y)) {
                    KQgRr5e_0(this.f2516KQgRr5e_0, 0);
                }
            }
        } else {
            float x2 = motionEvent.getX();
            float y2 = motionEvent.getY();
            this.PGPF6hQ_2 = x2;
            this.f3567Mqv2r_3 = y2;
        }
        return true;
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public void requestChildFocus(View view, View view2) {
        super.requestChildFocus(view, view2);
        if (isInTouchMode() || this.f2527QxJ9d_1) {
            return;
        }
        this.f2522Mqv2r_3 = view == this.f2516KQgRr5e_0;
    }

    public void setCoveredFadeColor(int i) {
        this.f2525QxJ9d_1 = i;
    }

    public void setPanelSlideListener(Mqv2r_3 mqv2r_3) {
        this.f2517KQgRr5e_0 = mqv2r_3;
    }

    public void setParallaxDistance(int i) {
        this.f3568X6FRs_4 = i;
        requestLayout();
    }

    @Deprecated
    public void setShadowDrawable(Drawable drawable) {
        setShadowDrawableLeft(drawable);
    }

    public void setShadowDrawableLeft(Drawable drawable) {
        this.f2515KQgRr5e_0 = drawable;
    }

    public void setShadowDrawableRight(Drawable drawable) {
        this.f2526QxJ9d_1 = drawable;
    }

    @Deprecated
    public void setShadowResource(int i) {
        setShadowDrawable(getResources().getDrawable(i));
    }

    public void setShadowResourceLeft(int i) {
        setShadowDrawableLeft(X6FRs_4.IMuAHx_6.X6FRs_4.KQgRr5e_0.m332KQgRr5e_0(getContext(), i));
    }

    public void setShadowResourceRight(int i) {
        setShadowDrawableRight(X6FRs_4.IMuAHx_6.X6FRs_4.KQgRr5e_0.m332KQgRr5e_0(getContext(), i));
    }

    public void setSliderFadeColor(int i) {
        this.f2512KQgRr5e_0 = i;
    }

    /* loaded from: classes.dex */
    public static class LayoutParams extends ViewGroup.MarginLayoutParams {
        public static final int[] KQgRr5e_0 = {16843137};

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public float f2530KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public Paint f2531KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public boolean f2532KQgRr5e_0;
        public boolean QxJ9d_1;

        public LayoutParams() {
            super(-1, -1);
            this.f2530KQgRr5e_0 = 0.0f;
        }

        public LayoutParams(ViewGroup.LayoutParams layoutParams) {
            super(layoutParams);
            this.f2530KQgRr5e_0 = 0.0f;
        }

        public LayoutParams(ViewGroup.MarginLayoutParams marginLayoutParams) {
            super(marginLayoutParams);
            this.f2530KQgRr5e_0 = 0.0f;
        }

        public LayoutParams(Context context, AttributeSet attributeSet) {
            super(context, attributeSet);
            this.f2530KQgRr5e_0 = 0.0f;
            TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, KQgRr5e_0);
            this.f2530KQgRr5e_0 = obtainStyledAttributes.getFloat(0, 0.0f);
            obtainStyledAttributes.recycle();
        }
    }

    public SlidingPaneLayout(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.f2512KQgRr5e_0 = -858993460;
        this.f2528X6FRs_4 = true;
        this.f2514KQgRr5e_0 = new Rect();
        this.f2520KQgRr5e_0 = new ArrayList<>();
        float f = context.getResources().getDisplayMetrics().density;
        this.f2523PGPF6hQ_2 = (int) ((32.0f * f) + 0.5f);
        setWillNotDraw(false);
        ZzDuCHW_20.KQgRr5e_0(this, new KQgRr5e_0());
        ZzDuCHW_20.IMuAHx_6(this, 1);
        X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2 KQgRr5e_02 = X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2.KQgRr5e_0(this, 0.5f, new PGPF6hQ_2());
        this.f2513KQgRr5e_0 = KQgRr5e_02;
        KQgRr5e_02.m586KQgRr5e_0(f * 400.0f);
    }

    public void Mqv2r_3(View view) {
        Field field;
        int i = Build.VERSION.SDK_INT;
        if (i >= 17) {
            ZzDuCHW_20.KQgRr5e_0(view, ((LayoutParams) view.getLayoutParams()).f2531KQgRr5e_0);
            return;
        }
        if (i >= 16) {
            if (!this.f3566IFxWkV_5) {
                try {
                    this.f2519KQgRr5e_0 = View.class.getDeclaredMethod("getDisplayList", null);
                } catch (NoSuchMethodException e) {
                    Log.e("SlidingPaneLayout", "Couldn't fetch getDisplayList method; dimming won't work right.", e);
                }
                try {
                    Field declaredField = View.class.getDeclaredField("mRecreateDisplayList");
                    this.f2518KQgRr5e_0 = declaredField;
                    declaredField.setAccessible(true);
                } catch (NoSuchFieldException e2) {
                    Log.e("SlidingPaneLayout", "Couldn't fetch mRecreateDisplayList field; dimming will be slow.", e2);
                }
                this.f3566IFxWkV_5 = true;
            }
            if (this.f2519KQgRr5e_0 != null && (field = this.f2518KQgRr5e_0) != null) {
                try {
                    field.setBoolean(view, true);
                    this.f2519KQgRr5e_0.invoke(view, null);
                } catch (Exception e3) {
                    Log.e("SlidingPaneLayout", "Error refreshing display list state", e3);
                }
            } else {
                view.invalidate();
                return;
            }
        }
        ZzDuCHW_20.KQgRr5e_0(this, view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
    }

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attributeSet) {
        return new LayoutParams(getContext(), attributeSet);
    }

    public boolean PGPF6hQ_2() {
        return !this.f2527QxJ9d_1 || this.KQgRr5e_0 == 1.0f;
    }

    public static boolean QxJ9d_1(View view) {
        Drawable background;
        if (view.isOpaque()) {
            return true;
        }
        return Build.VERSION.SDK_INT < 18 && (background = view.getBackground()) != null && background.getOpacity() == -1;
    }

    public void KQgRr5e_0() {
        int childCount = getChildCount();
        for (int i = 0; i < childCount; i++) {
            View childAt = getChildAt(i);
            if (childAt.getVisibility() == 4) {
                childAt.setVisibility(0);
            }
        }
    }

    public final boolean KQgRr5e_0(View view, int i) {
        if (this.f2528X6FRs_4 || KQgRr5e_0(0.0f, i)) {
            this.f2522Mqv2r_3 = false;
            return true;
        }
        return false;
    }

    public final boolean QxJ9d_1(View view, int i) {
        if (this.f2528X6FRs_4 || KQgRr5e_0(1.0f, i)) {
            this.f2522Mqv2r_3 = true;
            return true;
        }
        return false;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public boolean m981KQgRr5e_0() {
        return KQgRr5e_0(this.f2516KQgRr5e_0, 0);
    }

    public boolean QxJ9d_1() {
        return ZzDuCHW_20.Mqv2r_3((View) this) == 1;
    }

    public void KQgRr5e_0(int i) {
        if (this.f2516KQgRr5e_0 == null) {
            this.KQgRr5e_0 = 0.0f;
            return;
        }
        boolean QxJ9d_12 = QxJ9d_1();
        LayoutParams layoutParams = (LayoutParams) this.f2516KQgRr5e_0.getLayoutParams();
        int width = this.f2516KQgRr5e_0.getWidth();
        if (QxJ9d_12) {
            i = (getWidth() - i) - width;
        }
        float paddingRight = (i - ((QxJ9d_12 ? getPaddingRight() : getPaddingLeft()) + (QxJ9d_12 ? ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin : ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin))) / this.f2521Mqv2r_3;
        this.KQgRr5e_0 = paddingRight;
        if (this.f3568X6FRs_4 != 0) {
            KQgRr5e_0(paddingRight);
        }
        if (layoutParams.QxJ9d_1) {
            KQgRr5e_0(this.f2516KQgRr5e_0, this.KQgRr5e_0, this.f2512KQgRr5e_0);
        }
        PGPF6hQ_2(this.f2516KQgRr5e_0);
    }

    public boolean X6FRs_4() {
        return QxJ9d_1(this.f2516KQgRr5e_0, 0);
    }

    public final void KQgRr5e_0(View view, float f, int i) {
        LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
        if (f > 0.0f && i != 0) {
            int i2 = (((int) ((((-16777216) & i) >>> 24) * f)) << 24) | (i & 16777215);
            if (layoutParams.f2531KQgRr5e_0 == null) {
                layoutParams.f2531KQgRr5e_0 = new Paint();
            }
            layoutParams.f2531KQgRr5e_0.setColorFilter(new PorterDuffColorFilter(i2, PorterDuff.Mode.SRC_OVER));
            if (view.getLayerType() != 2) {
                view.setLayerType(2, layoutParams.f2531KQgRr5e_0);
            }
            Mqv2r_3(view);
        } else if (view.getLayerType() != 0) {
            Paint paint = layoutParams.f2531KQgRr5e_0;
            if (paint != null) {
                paint.setColorFilter(null);
            }
            QxJ9d_1 qxJ9d_1 = new QxJ9d_1(view);
            this.f2520KQgRr5e_0.add(qxJ9d_1);
            ZzDuCHW_20.KQgRr5e_0(this, qxJ9d_1);
        }
    }

    public boolean KQgRr5e_0(float f, int i) {
        int paddingLeft;
        if (this.f2527QxJ9d_1) {
            boolean QxJ9d_12 = QxJ9d_1();
            LayoutParams layoutParams = (LayoutParams) this.f2516KQgRr5e_0.getLayoutParams();
            if (QxJ9d_12) {
                paddingLeft = (int) (getWidth() - (((getPaddingRight() + ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin) + (f * this.f2521Mqv2r_3)) + this.f2516KQgRr5e_0.getWidth()));
            } else {
                paddingLeft = (int) (getPaddingLeft() + ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin + (f * this.f2521Mqv2r_3));
            }
            X6FRs_4.Xgtqvk_8.KQgRr5e_0.PGPF6hQ_2 pGPF6hQ_2 = this.f2513KQgRr5e_0;
            View view = this.f2516KQgRr5e_0;
            if (pGPF6hQ_2.QxJ9d_1(view, paddingLeft, view.getTop())) {
                KQgRr5e_0();
                ZzDuCHW_20.m262KQgRr5e_0((View) this);
                return true;
            }
            return false;
        }
        return false;
    }

    /* JADX WARN: Removed duplicated region for block: B:12:0x0023  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void KQgRr5e_0(float f) {
        boolean z;
        int childCount;
        boolean QxJ9d_12 = QxJ9d_1();
        LayoutParams layoutParams = (LayoutParams) this.f2516KQgRr5e_0.getLayoutParams();
        if (layoutParams.QxJ9d_1) {
            if ((QxJ9d_12 ? ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin : ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin) <= 0) {
                z = true;
                childCount = getChildCount();
                for (int i = 0; i < childCount; i++) {
                    View childAt = getChildAt(i);
                    if (childAt != this.f2516KQgRr5e_0) {
                        int i2 = this.f3568X6FRs_4;
                        this.QxJ9d_1 = f;
                        int i3 = ((int) ((1.0f - this.QxJ9d_1) * i2)) - ((int) ((1.0f - f) * i2));
                        if (QxJ9d_12) {
                            i3 = -i3;
                        }
                        childAt.offsetLeftAndRight(i3);
                        if (z) {
                            float f2 = this.QxJ9d_1;
                            KQgRr5e_0(childAt, QxJ9d_12 ? f2 - 1.0f : 1.0f - f2, this.f2525QxJ9d_1);
                        }
                    }
                }
            }
        }
        z = false;
        childCount = getChildCount();
        while (i < childCount) {
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public boolean m982KQgRr5e_0(View view) {
        if (view == null) {
            return false;
        }
        return this.f2527QxJ9d_1 && ((LayoutParams) view.getLayoutParams()).QxJ9d_1 && this.KQgRr5e_0 > 0.0f;
    }
}
