Skip to content

Instantly share code, notes, and snippets.

Last active March 31, 2018 11:33
What would you like to do?
private fun Fragment.getNavigationController(parent: Fragment? = null) : NavigationController? {
if (parentFragment == null) return null
if (parent == null) return getNavigationController(parentFragment)
if (parentFragment!! is NavigationController) {
return parentFragment as NavigationController
return getNavigationController(parentFragment)
val Fragment.navigationController : NavigationController? by lazy {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment