Skip to content

Instantly share code, notes, and snippets.

@vitoksmile
Created March 3, 2025 16:06
Show Gist options
  • Save vitoksmile/768177be42725632cb2616af926faf51 to your computer and use it in GitHub Desktop.
Save vitoksmile/768177be42725632cb2616af926faf51 to your computer and use it in GitHub Desktop.
Mastering delays in Android
class TestClass(
private val context: Context,
) {
fun onResume() {
thread {
Thread.sleep(1_000)
Toast.makeText(context, "Hello, Medium", Toast.LENGTH_LONG).show()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment