createDp
fun createDp(@ColorInt color: Int = Color.TRANSPARENT, indeterminateDrawable: Drawable? = null, widthDp: Float? = null, heightDp: Float? = null, style: Style? = null, @AttrRes defStyleAttr: Int = 0, @StyleRes defStyleRes: Int = 0): ProgressPrimitiveComponent
Java-compatible factory method that accepts dp values for dimensions. Use this method when calling from Java code with dp values (e.g., from .widthDip() or .heightDip() calls).
Parameters
color
Tint color for the indeterminateDrawable.
indeterminateDrawable
Drawable to be shown to indicate progress.
widthDp
Width in dp, or null to not set.
heightDp
Height in dp, or null to not set.
style
Additional style to apply, or null for no additional style.
defStyleAttr
Theme attribute referencing a style with progress bar defaults.
defStyleRes
Style resource supplying progress bar defaults (e.g. android:indeterminateDrawable); used only when indeterminateDrawable is null.