package p028j;

import android.content.Context;
import android.graphics.Bitmap;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RatingBar;
import p007c.C0485a;

/* renamed from: j.n0 */
/* loaded from: classes.dex */
public class C1159n0 extends RatingBar {

    /* renamed from: d */
    public final C1137l0 f2822d;

    public C1159n0(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, C0485a.ratingBarStyle);
    }

    public C1159n0(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        C1073b3.m2264a(this, getContext());
        C1137l0 c1137l0 = new C1137l0(this);
        this.f2822d = c1137l0;
        c1137l0.mo1902c(attributeSet, i);
    }

    @Override // android.widget.RatingBar, android.widget.AbsSeekBar, android.widget.ProgressBar, android.view.View
    public synchronized void onMeasure(int i, int i2) {
        super.onMeasure(i, i2);
        Bitmap m2056b = this.f2822d.m2056b();
        if (m2056b != null) {
            setMeasuredDimension(View.resolveSizeAndState(m2056b.getWidth() * getNumStars(), i, 0), getMeasuredHeight());
        }
    }
}