33 lines
1.1 KiB
Java
33 lines
1.1 KiB
Java
package androidx.appcompat.widget;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Bitmap;
|
|
import android.util.AttributeSet;
|
|
import android.view.View;
|
|
import android.widget.RatingBar;
|
|
import androidx.appcompat.R$attr;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class AppCompatRatingBar extends RatingBar {
|
|
private final AppCompatProgressBarHelper a;
|
|
|
|
public AppCompatRatingBar(Context context, AttributeSet attributeSet) {
|
|
this(context, attributeSet, R$attr.ratingBarStyle);
|
|
}
|
|
|
|
@Override // android.widget.RatingBar, android.widget.AbsSeekBar, android.widget.ProgressBar, android.view.View
|
|
protected synchronized void onMeasure(int i, int i2) {
|
|
super.onMeasure(i, i2);
|
|
Bitmap a = this.a.a();
|
|
if (a != null) {
|
|
setMeasuredDimension(View.resolveSizeAndState(a.getWidth() * getNumStars(), i, 0), getMeasuredHeight());
|
|
}
|
|
}
|
|
|
|
public AppCompatRatingBar(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
this.a = new AppCompatProgressBarHelper(this);
|
|
this.a.a(attributeSet, i);
|
|
}
|
|
}
|