create
fun create(@ColorInt color: Int, alpha: Float = -1.0f, widthPx: Int? = null, heightPx: Int? = null, style: Style? = null): SolidColor
Java-compatible factory method that accepts pixel values for dimensions. Use this method when calling from Java code with pixel values.
Parameters
color
The color to render.
alpha
The alpha of the color, in the range 0.0, 1.0. Use -1.0f to use color's alpha.
widthPx
Width in pixels, or null to not set.
heightPx
Height in pixels, or null to not set.
style
Additional style to apply, or null for no additional style.