Initial commit
This commit is contained in:
32
sources/androidx/appcompat/widget/AppCompatRatingBar.java
Normal file
32
sources/androidx/appcompat/widget/AppCompatRatingBar.java
Normal file
@@ -0,0 +1,32 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user