private void OnFriendPickerDone(FriendPickerFragment fragment) { Android.Support.V4.App.FragmentManager fm = SupportFragmentManager; fm.PopBackStack(); String results = ""; var selection = fragment.Selection; if (selection != null && selection.Count > 0) { List <String> names = new List <String> (); foreach (IGraphUser user in selection) { names.Add(user.Name); } results = string.Join(", ", names.ToArray()); } else { results = GetString(Resource.String.no_friends_selected); } ShowAlert(GetString(Resource.String.you_picked), results); }
public override void OnBackPressed() { InvalidateOptionsMenu();//redraw toolbar Menu if (SupportFragmentManager.BackStackEntryCount > 0) { SupportFragmentManager.PopBackStack(); mCurrentFragment = mStackFragment.Pop(); //corrects the highlighted navigation menu item NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view); navigationView.SetCheckedItem(CurrentSelectedNavigation(mCurrentFragment)); mDrawerLayout.CloseDrawers();//close drawer on back press } else { base.OnBackPressed(); } }
private void OnPlacePickerDone(PlacePickerFragment fragment) { Android.Support.V4.App.FragmentManager fm = SupportFragmentManager; fm.PopBackStack(); String result = ""; IGraphPlace selection = fragment.Selection; if (selection != null) { result = selection.Name; } else { result = GetString(Resource.String.no_place_selected); } ShowAlert(GetString(Resource.String.you_picked), result); }
////public async Task postuploadedcompliance() ////{ //// List<Comp_AttachmentModel> models = new List<Comp_AttachmentModel>(); //// models = db.GetFullAttachmentData(task_id_to_send); //// string json = JsonConvert.SerializeObject(models); //// try //// { //// string item = await restService.CompliancePostServiceMethod(Activity, "UpoadTaskCompliance", json, "completed"); //// if (item.Contains("Data Submitted Sucessfully")) //// { //// //db.updateComplianceStatus(id); //// Toast.MakeText(Activity, "compliance post Successfully..", ToastLength.Long).Show(); //// //progress.Dismiss(); //// } //// else //// { //// Toast.MakeText(Activity, "Oops! Something Went Wrong.", ToastLength.Long).Show(); //// //progress.Dismiss(); //// } //// } //// catch (Exception ex) //// { //// //progress.Dismiss(); //// } //// //progress.Dismiss(); ////} public async Task compliancemarkascompleted() { if (image_comp_lst.Count >= img_min && video_comp_lst.Count >= vdo_min && audio_comp_lst.Count >= aud_min) { dynamic value = new ExpandoObject(); value.Remark = "ok"; value.task_id = task_id_to_send; string json = JsonConvert.SerializeObject(value); try { string item = await restService.ComplianceTaskMarkCompleted(Activity, "SetCompleteTaskSubmition", json, "completed"); if (item.Contains("Task completed successfully")) { //db.updateComplianceStatus(id); Toast.MakeText(Activity, "Task completed successfully..", ToastLength.Long).Show(); db.UpdateInboxTaskStatus(task_id_to_send); Android.Support.V4.App.FragmentManager fm = Activity.SupportFragmentManager; fm.PopBackStack(); //progress.Dismiss(); } else { Toast.MakeText(Activity, "Oops! Something Went Wrong.", ToastLength.Long).Show(); //progress.Dismiss(); } } catch (Exception ex) { //progress.Dismiss(); } } else { Toast.MakeText(Activity, "Please attach all mandatory compliances", ToastLength.Long).Show(); } //progress.Dismiss(); }