Created
July 8, 2019 13:21
-
-
Save myanmarlinks/9c4fe6d3601c21205bfb4f87b5ebbfb1 to your computer and use it in GitHub Desktop.
Bridge to Kotlin Part 8
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
fun main(args: Array<String>) { | |
val basicScreenState = BasicScreenState.ERROR | |
setBasicScreenState(basicScreenState) | |
} | |
enum class BasicScreenState { | |
ERROR, | |
LOADING, | |
DATA | |
} | |
fun setBasicScreenState(basicScreenState: BasicScreenState) { | |
when(basicScreenState) { | |
BasicScreenState.ERROR -> println("ERROR") | |
BasicScreenState.LOADING -> println("LOADING") | |
BasicScreenState.DATA -> println("DATA") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment