Skip to content

Instantly share code, notes, and snippets.

@NurseyitTursunkulov
Created November 12, 2020 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NurseyitTursunkulov/1264a102f07908dd3294e40438190d6f to your computer and use it in GitHub Desktop.
Save NurseyitTursunkulov/1264a102f07908dd3294e40438190d6f to your computer and use it in GitHub Desktop.
class LocationDisplayFragment : Fragment(R.layout.fragment_location_display) {
val viewModel: MainViewModel by sharedViewModel()
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
tv_display_pickup.setOnClickListener {
with(viewModel) {
currentIsPickupLocation = true
openBottomSheetFragment()
}
}
tv_display_destination.setOnClickListener {
with(viewModel) {
currentIsPickupLocation = false
openBottomSheetFragment()
}
}
btn_done.setOnClickListener {
notifyBothLocationsChosen()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment