Last active
March 30, 2019 17:38
-
-
Save abhaysood/1b0521441a28943463d637827bc122af to your computer and use it in GitHub Desktop.
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 RootComponent(...) { | |
val locationSelection = LocationSelectionComponent(...) | |
fun launchLocationSelection() { | |
// Create the component | |
locationSelection = LocationSelectionComponent(...) | |
// Register callbacks | |
locationSelection.callbacks = object: LocationSelectionComponent.Callbacks() { | |
override fun onPickupAndDestinationSelected(pickup: Pickup, | |
destination: Destination) { | |
// launch some other component | |
} | |
} | |
// Signal the component to start it's tasks | |
locationSelection.start() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment