Last active
February 15, 2020 07:30
-
-
Save arkivanov/0394e67d6c220f48b2d557af6d446cbd to your computer and use it in GitHub Desktop.
Fragment tree with inputs and outputs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FragmentWithDialog(output: (Output) -> Unit) : Fragment() { | |
sealed class Output { | |
object DialogShown : Output() | |
} | |
} | |
class FragmentWithInput(input: Observable<Input>) : Fragment() { | |
sealed class Input { | |
object HideKeyboard : Input() | |
} | |
} | |
class FragmentWithDialogAndInput : Fragment() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
// Add fragments to childFragmentManager and wire them | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment