package x;

import android.content.Context;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.util.Log;
import android.util.Xml;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.constraintlayout.widget.ConstraintLayout;

/* JADX INFO: loaded from: classes.dex */
public final class e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final float f18392a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final float f18393b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final float f18394c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final float f18395d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final int f18396e;

    public e(Context context, XmlResourceParser xmlResourceParser) {
        this.f18392a = Float.NaN;
        this.f18393b = Float.NaN;
        this.f18394c = Float.NaN;
        this.f18395d = Float.NaN;
        this.f18396e = -1;
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(Xml.asAttributeSet(xmlResourceParser), n.i);
        int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
        for (int i = 0; i < indexCount; i++) {
            int index = typedArrayObtainStyledAttributes.getIndex(i);
            if (index == 0) {
                int resourceId = typedArrayObtainStyledAttributes.getResourceId(index, this.f18396e);
                this.f18396e = resourceId;
                String resourceTypeName = context.getResources().getResourceTypeName(resourceId);
                context.getResources().getResourceName(resourceId);
                if ("layout".equals(resourceTypeName)) {
                    new k().b((ConstraintLayout) LayoutInflater.from(context).inflate(resourceId, (ViewGroup) null));
                }
            } else if (index == 1) {
                this.f18395d = typedArrayObtainStyledAttributes.getDimension(index, this.f18395d);
            } else if (index == 2) {
                this.f18393b = typedArrayObtainStyledAttributes.getDimension(index, this.f18393b);
            } else if (index == 3) {
                this.f18394c = typedArrayObtainStyledAttributes.getDimension(index, this.f18394c);
            } else if (index == 4) {
                this.f18392a = typedArrayObtainStyledAttributes.getDimension(index, this.f18392a);
            } else {
                Log.v("ConstraintLayoutStates", "Unknown tag");
            }
        }
        typedArrayObtainStyledAttributes.recycle();
    }
}
