Skip to content

Instantly share code, notes, and snippets.

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