Here we have a thread that repeatedly posts a UI task through a Handler and then pretends to do some work. Sort the lines of code into the correct order.
Handlers
Perform on tap
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
lightView.setBackgroundColor(if ((n % 2) == 0) Color.BLACK else Color.YELLOW)
}
handler.post {
}
Thread.sleep(500)
thread {
repeat(10) { n ->
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.