Skip to content

Instantly share code, notes, and snippets.

@vitoksmile
Created March 3, 2025 16:07
Show Gist options
  • Save vitoksmile/4e2548c38cf5e37e7a4e9293d32af0af to your computer and use it in GitHub Desktop.
Save vitoksmile/4e2548c38cf5e37e7a4e9293d32af0af to your computer and use it in GitHub Desktop.
Mastering delays in Android
class TestFragment : Fragment() {
override fun onResume() {
super.onResume()
requireView().postDelayed({
Toast.makeText(requireContext(), "Hello, Medium", Toast.LENGTH_LONG).show()
}, 1_000)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment