async void HomeFragment_TripActionEndTrip(object sender, EventArgs e) { //Reset app status = "NORMAL"; homeFragment.ResetAfterTrip(); ShowProgressDialogue(); LatLng pickupLatLng = new LatLng(newRideDetails.PickupLat, newRideDetails.PickupLng); double fares = await mapHelper.CalculateFares(pickupLatLng, mLastLatLng); CloseProgressDialogue(); newTripEventListener.EndTrip(fares); newTripEventListener = null; CollectPaymentFragment collectPaymentFragment = new CollectPaymentFragment(fares); collectPaymentFragment.Cancelable = false; var trans = SupportFragmentManager.BeginTransaction(); collectPaymentFragment.Show(trans, "pay"); collectPaymentFragment.PaymentCollected += (o, u) => { collectPaymentFragment.Dismiss(); }; availablityListener.ReActivate(); }
private void ShowFareDialog(double fare) { var collectPaymentFragment = new CollectPaymentFragment(newRideDetails, fare); collectPaymentFragment.Cancelable = false; AndroidX.Fragment.App.FragmentTransaction ft = SupportFragmentManager.BeginTransaction(); ft.Add(collectPaymentFragment, "collect_pay_frag"); ft.CommitAllowingStateLoss(); }