horizontalGradient
Horizontal gradient background running from startX to endX, with explicit color stops. Dimensions are in dp; endX left null means the tile's right edge.
Parameters
Explicit stop to color pairs, e.g. 0f to color(...).
Starting x position, in dp. Defaults to 0.
Ending x position, in dp. Defaults to none (the tile's right edge).
How the gradient repeats past its endX when it doesn't cover the whole tile. Defaults to clamp (extends the last color).
Opacity applied to the whole gradient, from 0f to 1f. Defaults to 1f.
Horizontal gradient background running from startX to endX, with colors spread evenly along the line. Dimensions are in dp; endX left null means the tile's right edge.
Parameters
Colors spread evenly along the gradient.
Starting x position, in dp. Defaults to 0.
Ending x position, in dp. Defaults to none (the tile's right edge).
How the gradient repeats past its endX when it doesn't cover the whole tile. Defaults to clamp (extends the last color).
Opacity applied to the whole gradient, from 0f to 1f. Defaults to 1f.