Answer the question
In order to leave comments, you need to log in
How to deal in Kotlin when activity returns null?
Who can tell in the splash screen fragment in onActivityCreated I call
Handler().postDelayed({
navigateToDestination(R.id.action_splashFragment_to_startFragment)
}, 2000L)
fun navigateToDestination(@IdRes destination: Int, args: Bundle? = null, navOptions: NavOptions? = null) {
(activity as NavigationActivity).navigateToDestination(destination, args, navOptions)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question