Perform on tap

Report a typo

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.

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 ->
              
                }
              
___

Create a free account to access the full topic