Skip to content

Instantly share code, notes, and snippets.

@furkanaskin
Created December 5, 2018 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save furkanaskin/0d3ccca2db62e0be20931753932a095e to your computer and use it in GitHub Desktop.
Save furkanaskin/0d3ccca2db62e0be20931753932a095e to your computer and use it in GitHub Desktop.
class ThreadBlockingActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_thread_blocking)
GlobalScope.launch(Dispatchers.Main){
Toast.makeText(applicationContext,"10 Saniyelik geri sayım başladı.",Toast.LENGTH_SHORT).show()
delay(10000)
tv_thread.text = "10 Saniye sonra değişti."
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment