ProgressBar: support indeterminateOnly

This commit is contained in:
Julian Winkler
2024-09-03 17:53:22 +02:00
parent 973225738b
commit cdd2575116

View File

@@ -19,6 +19,9 @@ public class ProgressBar extends View {
haveCustomMeasure = false;
TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.ProgressBar, defStyle, 0);
setIndeterminate(a.getBoolean(com.android.internal.R.styleable.ProgressBar_indeterminate, false));
if (a.getBoolean(com.android.internal.R.styleable.ProgressBar_indeterminateOnly, false)) {
setIndeterminate(true);
}
setIndeterminateDrawable(a.getDrawable(com.android.internal.R.styleable.ProgressBar_indeterminateDrawable));
/* FIXME hack: NewPipe expects this to not be null, but for some reason it is */
if(indeterminateDrawable == null)