Created
November 12, 2020 01:26
-
-
Save NurseyitTursunkulov/1264a102f07908dd3294e40438190d6f 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 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