package com.seewo.libvui.eduexplore;

import android.animation.ObjectAnimator;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.util.TypedValue;
import android.view.WindowManager;
import com.seewo.libvui.c;

/* JADX INFO: compiled from: EduBaseDialog.java */
/* JADX INFO: loaded from: classes.dex */
public class a extends Dialog {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private ObjectAnimator f1873b;

    public a(Context context, int i2) {
        super(context, i2);
    }

    protected void a() {
        ObjectAnimator objectAnimator = this.f1873b;
        if (objectAnimator != null) {
            objectAnimator.cancel();
            this.f1873b = null;
        }
    }

    @Override // android.app.Dialog, android.content.DialogInterface
    public void dismiss() {
        super.dismiss();
        a();
    }

    @Override // android.app.Dialog
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        WindowManager.LayoutParams attributes = getWindow().getAttributes();
        attributes.gravity = 17;
        TypedValue typedValue = new TypedValue();
        getContext().getTheme().resolveAttribute(com.seewo.libvui.a.edu_dialog_width, typedValue, true);
        if (typedValue.data != 0) {
            attributes.width = (int) typedValue.getDimension(getContext().getResources().getDisplayMetrics());
        } else {
            attributes.width = getContext().getTheme().getResources().getDimensionPixelOffset(c.edu_dialog_width);
        }
        attributes.height = -2;
        getWindow().setAttributes(attributes);
    }

    public a(Context context) {
        super(context);
    }
}
