-
-
Save IslamBesto/c63e4f840e22ea8707e2ec07d3bdf505 to your computer and use it in GitHub Desktop.
Colored rectangles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val screenHeight = size.height | |
val rectHeight = screenHeight / 10 | |
for (i in 0 until 10) { | |
val color = if (i % 2 == 0) lightStadiumGreen else darkStadiumGreen | |
drawRect( | |
color = color, | |
topLeft = Offset(0f, i * rectHeight), | |
size = Size(size.width, rectHeight) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment