Skip to content

Instantly share code, notes, and snippets.

@vitoksmile
Created March 3, 2025 16:09
Show Gist options
  • Save vitoksmile/6a42f3fd5b6f80001c21fdcf10a14c91 to your computer and use it in GitHub Desktop.
Save vitoksmile/6a42f3fd5b6f80001c21fdcf10a14c91 to your computer and use it in GitHub Desktop.
Mastering delays in Android
@Composable
fun TestComponent() {
val context = LocalContext.current
LifecycleEventEffect(Lifecycle.Event.ON_RESUME) {
delay(1.seconds)
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