private void TxtSubCategoriesOnTouch(object sender, View.TouchEventArgs e) { try { if (e?.Event?.Action != MotionEventActions.Down) { return; } if (CategoriesController.ListCategoriesPage.Count > 0) { DialogType = "SubCategories"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = new List <string>(); var subCat = CategoriesController.ListCategoriesPage.FirstOrDefault(a => a.CategoriesId == CategoryId)?.SubList; if (subCat?.Count > 0) { arrayAdapter = subCat.Select(item => item.Lang).ToList(); } dialogList.Title(GetText(Resource.String.Lbl_SelectCategories)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else { Methods.DisplayReportResult(this, "Not have List Categories Page"); } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void AddStoryLayout_Click(object sender, EventArgs e) { try { var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); arrayAdapter.Add(Activity.GetText(Resource.String.text)); arrayAdapter.Add(GetText(Resource.String.image)); arrayAdapter.Add(GetText(Resource.String.video)); dialogList.Title(GetText(Resource.String.Lbl_Addnewstory)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void MAdapterOnItemLongClick(object sender, Holders.MesClickEventArgs e) { try { if (e.Position > -1) { SelectedItemPositions = MAdapter.GetItem(e.Position); if (SelectedItemPositions != null) { var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); if (e.Type == Holders.TypeClick.Text) { arrayAdapter.Add(GetText(Resource.String.Lbl_Copy)); } if (SelectedItemPositions.MesData.Position == "right") { arrayAdapter.Add(GetText(Resource.String.Lbl_MessageInfo)); arrayAdapter.Add(GetText(Resource.String.Lbl_DeleteMessage)); } arrayAdapter.Add(GetText(Resource.String.Lbl_Forward)); arrayAdapter.Add(SelectedItemPositions.MesData.IsStarted ? GetText(Resource.String.Lbl_UnFavorite) : GetText(Resource.String.Lbl_Favorite)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } } } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtMoreOnClick(object sender, EventArgs e) { try { DialogType = "More"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); arrayAdapter.Add(GetText(Resource.String.Lbl_Edit)); arrayAdapter.Add(GetText(Resource.String.Lbl_Delete)); dialogList.Title(GetText(Resource.String.Lbl_More)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
//Type private void LayoutTypeOnClick(object sender, EventArgs e) { try { var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = new List <string>(); arrayAdapter.Add(Context.GetString(Resource.String.Lbl_All)); arrayAdapter.Add(Context.GetString(Resource.String.Lbl_User)); arrayAdapter.Add(Context.GetString(Resource.String.Lbl_Group)); arrayAdapter.Add(Context.GetString(Resource.String.Lbl_Page)); dialogList.Title(GetText(Resource.String.Lbl_TypeChat)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
public void OnClick(View v) { try { if (v.Id == Txt_gender_text.Id) { var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this); arrayAdapter.Add(GetText(Resource.String.Radio_Male)); arrayAdapter.Add(GetText(Resource.String.Radio_Female)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } } catch (Exception e) { Console.WriteLine(e); } }
//Location private void LayoutLocationOnClick(object sender, EventArgs e) { try { TypeDialog = "Location"; string[] countriesArray = Context.Resources.GetStringArray(Resource.Array.countriesArray); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = countriesArray.ToList(); dialogList.Title(GetText(Resource.String.Lbl_Location)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtCountryOnTouch(object sender, View.TouchEventArgs e) { try { TypeDialog = "Country"; var countriesArray = WoWonderTools.GetCountryList(this); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = countriesArray.Select(item => item.Value).ToList(); dialogList.Title(GetText(Resource.String.Lbl_Country)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void TxtGenderOnTouch(object sender, View.TouchEventArgs e) { try { if (e?.Event?.Action != MotionEventActions.Down) { return; } TypeDialog = "Genders"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); switch (ListUtils.SettingsSiteList?.Genders?.Count) { case > 0: arrayAdapter.AddRange(from item in ListUtils.SettingsSiteList?.Genders select item.Value); break; default: arrayAdapter.Add(GetText(Resource.String.Radio_Male)); arrayAdapter.Add(GetText(Resource.String.Radio_Female)); break; } dialogList.Title(GetText(Resource.String.Lbl_Gender)).TitleColorRes(Resource.Color.primary); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
//Add Media File private void AddButtonOnClick(object sender, EventArgs e) { try { if (!Methods.CheckConnectivity()) { Toast.MakeText(this, GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Long).Show(); return; } var naxPhotoPerUser = ListUtils.SettingsSiteList.FirstOrDefault()?.MaxPhotoPerUser; var isPro = ListUtils.MyUserInfo.FirstOrDefault()?.IsPro ?? "0"; if (isPro == "0" && MAdapter.ItemCount == Convert.ToInt32(naxPhotoPerUser)) { //You have exceeded the maximum of likes or swipes per this day Toast.MakeText(this, GetString(Resource.String.Lbl_ErrorLimitOfMediaUploads), ToastLength.Short).Show(); return; } var arrayAdapter = new List <string> { GetString(Resource.String.Lbl_ImageGallery), GetString(Resource.String.Lbl_TakeImageFromCamera), GetString(Resource.String.Lbl_VideoGallery), GetString(Resource.String.Lbl_RecordVideoFromCamera), }; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialogList.Title(GetText(Resource.String.Lbl_ChooseTheFileType)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//open Payment private void BtnDonateOnClick(object sender, EventArgs e) { try { DialogType = "Payment"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); if (AppSettings.ShowInAppBilling && Client.IsExtended && Convert.ToInt64(DataObject.Amount) <= 100) { arrayAdapter.Add(GetString(Resource.String.Btn_GooglePlay)); } if (AppSettings.ShowPaypal) { arrayAdapter.Add(GetString(Resource.String.Btn_Paypal)); } if (AppSettings.ShowCreditCard) { arrayAdapter.Add(GetString(Resource.String.Lbl_CreditCard)); } //if (AppSettings.ShowBankTransfer) //wael add on next version // arrayAdapter.Add(GetString(Resource.String.Lbl_BankTransfer)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
public void MoreCommentReplyPostClick(CommentReplyClickEventArgs e) { try { if (Methods.CheckConnectivity()) { TypeDialog = "MoreComment"; CommentObject = e.CommentObject; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(MainContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); arrayAdapter.Add(MainContext.GetString(Resource.String.Lbl_CopeText)); arrayAdapter.Add(MainContext.GetString(Resource.String.Lbl_Report)); if (CommentObject?.Owner != null && (bool)CommentObject?.Owner || CommentObject?.Publisher?.UserId == UserDetails.UserId) { arrayAdapter.Add(MainContext.GetString(Resource.String.Lbl_Edit)); arrayAdapter.Add(MainContext.GetString(Resource.String.Lbl_Delete)); } dialogList.Title(MainContext.GetString(Resource.String.Lbl_More)); dialogList.Items(arrayAdapter); dialogList.PositiveText(MainContext.GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else { Toast.MakeText(MainContext, MainContext.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show(); } } catch (Exception exception) { Console.WriteLine(exception); } }
//Report / Delete / Copy comment private void MAdapterOnOnItemLongClick(object sender, CommentAdapterClickEventArgs e) { try { var position = e.Position; if (position > -1) { ItemComments = MAdapter.GetItem(position); if (ItemComments != null) { var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); if (UserDetails.IsLogin) { arrayAdapter.Add(ActivityContext.GetText(Resource.String.Lbl_Report)); } if (ItemComments.Owner && UserDetails.IsLogin) { arrayAdapter.Add(ActivityContext.GetText(Resource.String.Lbl_Delete)); } arrayAdapter.Add(ActivityContext.GetText(Resource.String.Lbl_Copy)); dialogList.Items(arrayAdapter); dialogList.PositiveText(ActivityContext.GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } } } catch (Exception exception) { Console.WriteLine(exception); } }
//Price private void PriceEditTextOnClick(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } TypeDialog = "Price"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); foreach (var item in ListUtils.PriceList) { if (item.Price == "0.00" || item.Price == "0.0" || item.Price == "0") { arrayAdapter.Add(GetText(Resource.String.Lbl_Free)); } else { arrayAdapter.Add(CurrencySymbol + item.Price); } } dialogList.Title(GetText(Resource.String.Lbl_Price)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtCategoryOnTouch(object sender, View.TouchEventArgs e) { try { if (e?.Event?.Action != MotionEventActions.Down) { return; } switch (CategoriesController.ListCategoriesJob.Count) { case > 0: { TypeDialog = "Categories"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = CategoriesController.ListCategoriesJob.Select(item => item.CategoriesName).ToList(); dialogList.Title(GetText(Resource.String.Lbl_SelectCategories)).TitleColorRes(Resource.Color.primary); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); break; } default: Methods.DisplayReportResult(this, "Not have List Categories Job"); break; } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void TxtDiscountTypeOnTouch(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } TypeDialog = "DiscountOffersAdapter"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = WoWonderTools.GetAddDiscountList(this).Select(pair => pair.Value).ToList(); dialogList.Title(GetText(Resource.String.Lbl_DiscountType)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//More private void ButtonMoreOnClick(object sender, EventArgs e) { try { var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); if (UserDetails.IsLogin) { arrayAdapter.Add(Context.GetText(Resource.String.Lbl_Block)); } arrayAdapter.Add(Context.GetText(Resource.String.Lbl_CopyLinkToProfile)); dialogList.Items(arrayAdapter); dialogList.PositiveText(Context.GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//Location private void LayoutLocationOnClick(object sender, EventArgs e) { try { TypeDialog = "Location"; var countriesArray = WoWonderTools.GetCountryList(Activity); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = countriesArray.Select(item => item.Value).ToList(); arrayAdapter.Insert(0, GetText(Resource.String.Lbl_All)); dialogList.Title(GetText(Resource.String.Lbl_Location)).TitleColorRes(Resource.Color.primary); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
//Status private void LayoutStatusOnClick(object sender, EventArgs e) { try { TypeDialog = "Status"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); arrayAdapter.Add(GetText(Resource.String.Lbl_All)); arrayAdapter.Add(GetText(Resource.String.Lbl_Offline)); arrayAdapter.Add(GetText(Resource.String.Lbl_Online)); dialogList.Title(GetText(Resource.String.Lbl_Status)).TitleColorRes(Resource.Color.primary); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
public void AlbumsOnMoreClick(MoreAlbumsClickEventArgs args) { try { OptionDialog = "Albums"; MoreAlbumsArgs = args; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); arrayAdapter.Add(ActivityContext.GetText(Resource.String.Lbl_Share)); arrayAdapter.Add(ActivityContext.GetText(Resource.String.Lbl_Copy)); dialogList.Title(ActivityContext.GetText(Resource.String.Lbl_Albums)); dialogList.Items(arrayAdapter); dialogList.PositiveText(ActivityContext.GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception e) { Console.WriteLine(e); } }
//Choose SortBy private void SortByLayoutOnClick(object sender, EventArgs e) { try { TypeDialog = "SortBy"; List <string> arrayAdapter = new List <string>(); MaterialDialog.Builder dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); arrayAdapter.Add(Context.GetText(Resource.String.Lbl_Views)); arrayAdapter.Add(Context.GetText(Resource.String.Lbl_Subscribers)); arrayAdapter.Add(Context.GetText(Resource.String.Lbl_MostActive)); dialogList.Title(GetText(Resource.String.Lbl_SortBy)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Cancel)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//Relationship //1 >> Single //2 >> In a relationship //3 >> Married //4 >> Engaged //5 >> All private void LayoutRelationshipOnClick(object sender, EventArgs e) { try { var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); arrayAdapter.Add(GetText(Resource.String.Lbl_All)); arrayAdapter.Add(GetText(Resource.String.Lbl_Single)); arrayAdapter.Add(GetText(Resource.String.Lbl_InRelationship)); arrayAdapter.Add(GetText(Resource.String.Lbl_Married)); arrayAdapter.Add(GetText(Resource.String.Lbl_Engaged)); dialogList.Title(GetText(Resource.String.Lbl_Relationship)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
public override bool OnPreferenceTreeClick(Preference preference) { try { if (preference.Key == "whocanfollow_key") { TypeDialog = "WhoCanFollow"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialogList.Title(Resource.String.Lbl_Who_can_follow_me); arrayAdapter.Add(GetText(Resource.String.Lbl_Everyone)); //>> value = 0 arrayAdapter.Add(GetText(Resource.String.Lbl_People_i_Follow)); //>> value = 1 dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else if (preference.Key == "whocanMessage_key") { TypeDialog = "Message"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialogList.Title(Resource.String.Lbl_Who_can_message_me); arrayAdapter.Add(GetText(Resource.String.Lbl_Everyone)); //>> value = 0 arrayAdapter.Add(GetText(Resource.String.Lbl_People_i_Follow)); //>> value = 1 arrayAdapter.Add(GetText(Resource.String.Lbl_No_body)); //>> value = 2 dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else if (preference.Key == "whoCanSeeMyfriends_key") { TypeDialog = "CanSeeMyFriends"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialogList.Title(Resource.String.Lbl_CanSeeMyfriends); arrayAdapter.Add(GetText(Resource.String.Lbl_Everyone)); //>> value = 0 arrayAdapter.Add(GetText(Resource.String.Lbl_People_i_Follow)); //>> value = 1 arrayAdapter.Add(GetText(Resource.String.Lbl_People_Follow_Me)); //>> value = 2 arrayAdapter.Add(GetText(Resource.String.Lbl_No_body)); //>> value = 3 dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else if (preference.Key == "whoCanPostOnMyTimeline_key") { TypeDialog = "CanPostOnMyTimeline"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialogList.Title(Resource.String.Lbl_CanPostOnMyTimeline); arrayAdapter.Add(GetText(Resource.String.Lbl_Everyone)); //>> value = 0 arrayAdapter.Add(GetText(Resource.String.Lbl_People_i_Follow)); //>> value = 1 arrayAdapter.Add(GetText(Resource.String.Lbl_No_body)); //>> value = 2 dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else if (preference.Key == "whoCanSeeMyBirthday_key") { TypeDialog = "Birthday"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialogList.Title(Resource.String.Lbl_Who_can_see_my_birthday); arrayAdapter.Add(GetText(Resource.String.Lbl_Everyone)); //>> value = 0 arrayAdapter.Add(GetText(Resource.String.Lbl_People_i_Follow)); //>> value = 1 arrayAdapter.Add(GetText(Resource.String.Lbl_No_body)); //>> value = 2 dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } return(base.OnPreferenceTreeClick(preference)); } catch (Exception e) { Console.WriteLine(e); return(base.OnPreferenceTreeClick(preference)); } }
//open Payment private void BtnDonateOnClick(object sender, EventArgs e) { try { DialogType = "Donate"; var dialog = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialog.Title(Resource.String.Lbl_Donate); dialog.Input(Resource.String.Lbl_DonateCode, 0, false, (materialDialog, s) => { try { if (s.Length <= 0) { return; } CodeName = s.ToString(); if (Convert.ToDouble(CodeName) > Convert.ToDouble(DataObject.Amount)) { Toast.MakeText(this, GetText(Resource.String.Lbl_CantDonate) + " " + TxtFundAmount.Text, ToastLength.Long)?.Show(); return; } DialogType = "Payment"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); if (AppSettings.ShowInAppBilling && Client.IsExtended && Convert.ToInt64(CodeName) <= 100) { arrayAdapter.Add(GetString(Resource.String.Btn_GooglePlay)); } if (AppSettings.ShowPaypal) { arrayAdapter.Add(GetString(Resource.String.Btn_Paypal)); } if (AppSettings.ShowCreditCard) { arrayAdapter.Add(GetString(Resource.String.Lbl_CreditCard)); } //if (AppSettings.ShowBankTransfer) //wael add on next version // arrayAdapter.Add(GetString(Resource.String.Lbl_BankTransfer)); if (AppSettings.ShowRazorPay) { arrayAdapter.Add(GetString(Resource.String.Lbl_RazorPay)); } if (AppSettings.ShowPayStack) { arrayAdapter.Add(GetString(Resource.String.Lbl_PayStack)); } if (AppSettings.ShowCashFree) { arrayAdapter.Add(GetString(Resource.String.Lbl_CashFree)); } if (AppSettings.ShowPaySera) { arrayAdapter.Add(GetString(Resource.String.Lbl_PaySera)); } dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }); dialog.InputType(InputTypes.ClassText); dialog.PositiveText(GetText(Resource.String.Btn_Send)).OnPositive(this); dialog.NegativeText(GetText(Resource.String.Lbl_Cancel)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void SetQuestion() { try { #region Question One switch (DataInfoObject.QuestionOneType) { case "free_text_question": { QuestionOneLayout.LayoutResource = Resource.Layout.ViewSub_Question_EditText; if (InflatedQuestionOne == null) { InflatedQuestionOne = QuestionOneLayout.Inflate(); } QuestionOneLayout.Visibility = ViewStates.Visible; TxtQuestion = InflatedQuestionOne.FindViewById <TextView>(Resource.Id.QuestionTextView); TxtQuestion.Text = Methods.FunString.DecodeString(DataInfoObject.QuestionOne); EdtQuestion = InflatedQuestionOne.FindViewById <EditText>(Resource.Id.QuestionEditText); Methods.SetColorEditText(EdtQuestion, AppSettings.SetTabDarkTheme ? Color.White : Color.Black); EdtQuestion.TextChanged += (sender, args) => { try { QuestionOneAnswer = args.Text.ToString(); } catch (Exception e) { Console.WriteLine(e); } }; break; } case "yes_no_question": { QuestionOneLayout.LayoutResource = Resource.Layout.ViewSub_Question_CheckBox; if (InflatedQuestionOne == null) { InflatedQuestionOne = QuestionOneLayout.Inflate(); } QuestionOneLayout.Visibility = ViewStates.Visible; TxtQuestion = InflatedQuestionOne.FindViewById <TextView>(Resource.Id.QuestionTextView); TxtQuestion.Text = Methods.FunString.DecodeString(DataInfoObject.QuestionOne); RdoYes = InflatedQuestionOne.FindViewById <RadioButton>(Resource.Id.radioYes); RdoNo = InflatedQuestionOne.FindViewById <RadioButton>(Resource.Id.radioNo); RdoYes.CheckedChange += (sender, args) => { try { var isChecked = RdoYes.Checked; if (!isChecked) { return; } RdoNo.Checked = false; QuestionOneAnswer = "yes"; } catch (Exception e) { Console.WriteLine(e); } }; RdoNo.CheckedChange += (sender, args) => { try { var isChecked = RdoNo.Checked; if (!isChecked) { return; } RdoNo.Checked = false; QuestionOneAnswer = "no"; } catch (Exception e) { Console.WriteLine(e); } }; break; } case "multiple_choice_question": { QuestionOneLayout.LayoutResource = Resource.Layout.ViewSub_Question_List; if (InflatedQuestionOne == null) { InflatedQuestionOne = QuestionOneLayout.Inflate(); } QuestionOneLayout.Visibility = ViewStates.Visible; TxtQuestion = InflatedQuestionOne.FindViewById <TextView>(Resource.Id.QuestionTextView); TxtQuestion.Text = Methods.FunString.DecodeString(DataInfoObject.QuestionOne); EdtQuestion = InflatedQuestionOne.FindViewById <EditText>(Resource.Id.QuestionEditText); Methods.SetColorEditText(EdtQuestion, AppSettings.SetTabDarkTheme ? Color.White : Color.Black); Methods.SetFocusable(EdtQuestion); EdtQuestion.Touch += (sender, args) => { if (args.Event.Action != MotionEventActions.Down) { return; } DialogType = "QuestionOne"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = new List <string>(); if (DataInfoObject.QuestionOneAnswers?.Count > 0) { arrayAdapter = DataInfoObject.QuestionOneAnswers; } dialogList.Title(Methods.FunString.DecodeString(DataInfoObject.QuestionOne)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); }; break; } default: QuestionOneLayout.Visibility = ViewStates.Gone; break; } #endregion #region Question Two switch (DataInfoObject.QuestionTwoType) { case "free_text_question": { QuestionTwoLayout.LayoutResource = Resource.Layout.ViewSub_Question_EditText; if (InflatedQuestionTwo == null) { InflatedQuestionTwo = QuestionTwoLayout.Inflate(); } QuestionTwoLayout.Visibility = ViewStates.Visible; TxtQuestion = InflatedQuestionTwo.FindViewById <TextView>(Resource.Id.QuestionTextView); TxtQuestion.Text = Methods.FunString.DecodeString(DataInfoObject.QuestionTwo); EdtQuestion = InflatedQuestionTwo.FindViewById <EditText>(Resource.Id.QuestionEditText); Methods.SetColorEditText(EdtQuestion, AppSettings.SetTabDarkTheme ? Color.White : Color.Black); EdtQuestion.TextChanged += (sender, args) => { try { QuestionTwoAnswer = args.Text.ToString(); } catch (Exception e) { Console.WriteLine(e); } }; break; } case "yes_no_question": { QuestionTwoLayout.LayoutResource = Resource.Layout.ViewSub_Question_CheckBox; if (InflatedQuestionTwo == null) { InflatedQuestionTwo = QuestionTwoLayout.Inflate(); } QuestionTwoLayout.Visibility = ViewStates.Visible; TxtQuestion = InflatedQuestionTwo.FindViewById <TextView>(Resource.Id.QuestionTextView); TxtQuestion.Text = Methods.FunString.DecodeString(DataInfoObject.QuestionTwo); RdoYes = InflatedQuestionTwo.FindViewById <RadioButton>(Resource.Id.radioYes); RdoNo = InflatedQuestionTwo.FindViewById <RadioButton>(Resource.Id.radioNo); RdoYes.CheckedChange += (sender, args) => { try { var isChecked = RdoYes.Checked; if (!isChecked) { return; } RdoNo.Checked = false; QuestionTwoAnswer = "yes"; } catch (Exception e) { Console.WriteLine(e); } }; RdoNo.CheckedChange += (sender, args) => { try { var isChecked = RdoNo.Checked; if (!isChecked) { return; } RdoNo.Checked = false; QuestionTwoAnswer = "no"; } catch (Exception e) { Console.WriteLine(e); } }; break; } case "multiple_choice_question": { QuestionTwoLayout.LayoutResource = Resource.Layout.ViewSub_Question_List; if (InflatedQuestionTwo == null) { InflatedQuestionTwo = QuestionTwoLayout.Inflate(); } QuestionTwoLayout.Visibility = ViewStates.Visible; TxtQuestion = InflatedQuestionTwo.FindViewById <TextView>(Resource.Id.QuestionTextView); TxtQuestion.Text = Methods.FunString.DecodeString(DataInfoObject.QuestionTwo); EdtQuestion = InflatedQuestionTwo.FindViewById <EditText>(Resource.Id.QuestionEditText); Methods.SetColorEditText(EdtQuestion, AppSettings.SetTabDarkTheme ? Color.White : Color.Black); Methods.SetFocusable(EdtQuestion); EdtQuestion.Touch += (sender, args) => { if (args.Event.Action != MotionEventActions.Down) { return; } DialogType = "QuestionTwo"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = new List <string>(); if (DataInfoObject.QuestionTwoAnswers?.Count > 0) { arrayAdapter = DataInfoObject.QuestionTwoAnswers; } dialogList.Title(Methods.FunString.DecodeString(DataInfoObject.QuestionTwo)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); }; break; } default: QuestionTwoLayout.Visibility = ViewStates.Gone; break; } #endregion #region Question Three switch (DataInfoObject.QuestionThreeType) { case "free_text_question": { QuestionThreeLayout.LayoutResource = Resource.Layout.ViewSub_Question_EditText; if (InflatedQuestionThree == null) { InflatedQuestionThree = QuestionThreeLayout.Inflate(); } QuestionThreeLayout.Visibility = ViewStates.Visible; TxtQuestion = InflatedQuestionThree.FindViewById <TextView>(Resource.Id.QuestionTextView); TxtQuestion.Text = Methods.FunString.DecodeString(DataInfoObject.QuestionThree); EdtQuestion = InflatedQuestionThree.FindViewById <EditText>(Resource.Id.QuestionEditText); Methods.SetColorEditText(EdtQuestion, AppSettings.SetTabDarkTheme ? Color.White : Color.Black); EdtQuestion.TextChanged += (sender, args) => { try { QuestionThreeAnswer = args.Text.ToString(); } catch (Exception e) { Console.WriteLine(e); } }; break; } case "yes_no_question": { QuestionThreeLayout.LayoutResource = Resource.Layout.ViewSub_Question_CheckBox; if (InflatedQuestionThree == null) { InflatedQuestionThree = QuestionThreeLayout.Inflate(); } QuestionThreeLayout.Visibility = ViewStates.Visible; TxtQuestion = InflatedQuestionThree.FindViewById <TextView>(Resource.Id.QuestionTextView); TxtQuestion.Text = Methods.FunString.DecodeString(DataInfoObject.QuestionThree); RdoYes = InflatedQuestionThree.FindViewById <RadioButton>(Resource.Id.radioYes); RdoNo = InflatedQuestionThree.FindViewById <RadioButton>(Resource.Id.radioNo); RdoYes.CheckedChange += (sender, args) => { try { var isChecked = RdoYes.Checked; if (!isChecked) { return; } RdoNo.Checked = false; QuestionThreeAnswer = "yes"; } catch (Exception e) { Console.WriteLine(e); } }; RdoNo.CheckedChange += (sender, args) => { try { var isChecked = RdoNo.Checked; if (!isChecked) { return; } RdoNo.Checked = false; QuestionThreeAnswer = "no"; } catch (Exception e) { Console.WriteLine(e); } }; break; } case "multiple_choice_question": { QuestionThreeLayout.LayoutResource = Resource.Layout.ViewSub_Question_List; if (InflatedQuestionThree == null) { InflatedQuestionThree = QuestionThreeLayout.Inflate(); } QuestionThreeLayout.Visibility = ViewStates.Visible; TxtQuestion = InflatedQuestionThree.FindViewById <TextView>(Resource.Id.QuestionTextView); TxtQuestion.Text = Methods.FunString.DecodeString(DataInfoObject.QuestionThree); EdtQuestion = InflatedQuestionThree.FindViewById <EditText>(Resource.Id.QuestionEditText); Methods.SetColorEditText(EdtQuestion, AppSettings.SetTabDarkTheme ? Color.White : Color.Black); Methods.SetFocusable(EdtQuestion); EdtQuestion.Touch += (sender, args) => { if (args.Event.Action != MotionEventActions.Down) { return; } DialogType = "QuestionThree"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = new List <string>(); if (DataInfoObject.QuestionThreeAnswers?.Count > 0) { arrayAdapter = DataInfoObject.QuestionThreeAnswers; } dialogList.Title(Methods.FunString.DecodeString(DataInfoObject.QuestionThree)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); }; break; } default: QuestionThreeLayout.Visibility = ViewStates.Gone; break; } #endregion } catch (Exception e) { Console.WriteLine(e); } }
private void PlansAdapterOnItemClick(object sender, UpgradeGoProAdapterClickEventArgs e) { try { if (e.Position > -1) { ItemUpgrade = PlansAdapter.GetItem(e.Position); if (ItemUpgrade != null) { var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); if (AppSettings.ShowInAppBilling && Client.IsExtended) { arrayAdapter.Add(GetString(Resource.String.Btn_GooglePlay)); } if (AppSettings.ShowPaypal) { arrayAdapter.Add(GetString(Resource.String.Btn_Paypal)); } if (AppSettings.ShowCreditCard) { arrayAdapter.Add(GetString(Resource.String.Lbl_CreditCard)); } if (AppSettings.ShowBankTransfer) { arrayAdapter.Add(GetString(Resource.String.Lbl_BankTransfer)); } if (AppSettings.ShowRazorPay) { arrayAdapter.Add(GetString(Resource.String.Lbl_RazorPay)); } if (AppSettings.ShowPayStack) { arrayAdapter.Add(GetString(Resource.String.Lbl_PayStack)); } if (AppSettings.ShowCashFree) { arrayAdapter.Add(GetString(Resource.String.Lbl_CashFree)); } if (AppSettings.ShowPaySera) { arrayAdapter.Add(GetString(Resource.String.Lbl_PaySera)); } dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
public void OnClick(View v) { try { if (v.Id == Txt_Gender.Id) { TypeDialog = "Gender"; var arrayAdapter = new List <string>(); var DialogList = new MaterialDialog.Builder(this); arrayAdapter.Add(GetText(Resource.String.Lbl_All)); arrayAdapter.Add(GetText(Resource.String.Radio_Male)); arrayAdapter.Add(GetText(Resource.String.Radio_Female)); DialogList.Title(GetText(Resource.String.Lbl_Gender)); DialogList.Items(arrayAdapter); DialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); DialogList.AlwaysCallSingleChoiceCallback(); DialogList.ItemsCallback(this).Build().Show(); } else if (v.Id == Txt_ProfilePicture.Id) { TypeDialog = "ProfilePicture"; var arrayAdapter = new List <string>(); var DialogList = new MaterialDialog.Builder(this); arrayAdapter.Add(GetText(Resource.String.Lbl_All)); arrayAdapter.Add(GetText(Resource.String.Lbl_Yes)); arrayAdapter.Add(GetText(Resource.String.Lbl_No)); DialogList.Title(GetText(Resource.String.Lbl_Profile_Picture)); DialogList.Items(arrayAdapter); DialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); DialogList.AlwaysCallSingleChoiceCallback(); DialogList.ItemsCallback(this).Build().Show(); } else if (v.Id == Txt_Status.Id) { TypeDialog = "Status"; var arrayAdapter = new List <string>(); var DialogList = new MaterialDialog.Builder(this); arrayAdapter.Add(GetText(Resource.String.Lbl_All)); arrayAdapter.Add(GetText(Resource.String.Lbl_Offline)); arrayAdapter.Add(GetText(Resource.String.Lbl_Online)); DialogList.Title(GetText(Resource.String.Lbl_Status)); DialogList.Items(arrayAdapter); DialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); DialogList.AlwaysCallSingleChoiceCallback(); DialogList.ItemsCallback(this).Build().Show(); } } catch (Exception e) { Console.WriteLine(e); } }
// Replace the contents of a view (invoked by the layout manager) public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) { try { if (viewHolder is JobsAdapterViewHolder holder) { var item = JobList[position]; if (item != null) { if (item.Image.Contains("http")) { var image = item.Image.Replace(Client.WebsiteUrl + "/", ""); if (!image.Contains("http")) { item.Image = Client.WebsiteUrl + "/" + image; } else { item.Image = image; } GlideImageLoader.LoadImage(ActivityContext, item.Image, holder.Image, ImageStyle.FitCenter, ImagePlaceholders.Drawable); } else { File file2 = new File(item.Image); var photoUri = FileProvider.GetUriForFile(ActivityContext, ActivityContext.PackageName + ".fileprovider", file2); Glide.With(ActivityContext).Load(photoUri).Apply(new RequestOptions()).Into(holder.Image); } holder.Title.Text = Methods.FunString.DecodeString(item.Title); var(currency, currencyIcon) = WoWonderTools.GetCurrency(item.Currency); var categoryName = CategoriesController.ListCategoriesJob.FirstOrDefault(categories => categories.CategoriesId == item.Category)?.CategoriesName; Console.WriteLine(currency); if (string.IsNullOrEmpty(categoryName)) { categoryName = Application.Context.GetText(Resource.String.Lbl_Unknown); } holder.Salary.Text = currencyIcon + " " + item.Minimum + " - " + currencyIcon + " " + item.Maximum + " . " + categoryName; holder.Description.Text = Methods.FunString.SubStringCutOf(Methods.FunString.DecodeString(item.Description), 100); if (item.IsOwner) { holder.IconMore.Visibility = ViewStates.Visible; holder.Button.Text = ActivityContext.GetString(Resource.String.Lbl_show_applies) + " (" + item.ApplyCount + ")"; holder.Button.Tag = "ShowApply"; } else { holder.IconMore.Visibility = ViewStates.Gone; } //Set Button if its applied if (item.Apply == "true") { holder.Button.Text = ActivityContext.GetString(Resource.String.Lbl_already_applied); holder.Button.Enabled = false; } if (!holder.Button.HasOnClickListeners) { holder.Button.Click += (sender, args) => { try { switch (holder.Button.Tag.ToString()) { // Open Apply Job Activity case "ShowApply": { if (item.ApplyCount == "0") { Toast.MakeText(ActivityContext, ActivityContext.GetString(Resource.String.Lbl_ThereAreNoRequests), ToastLength.Short).Show(); return; } var intent = new Intent(ActivityContext, typeof(ShowApplyJobActivity)); intent.PutExtra("JobsObject", JsonConvert.SerializeObject(item)); ActivityContext.StartActivity(intent); break; } case "Apply": { var intent = new Intent(ActivityContext, typeof(ApplyJobActivity)); intent.PutExtra("JobsObject", JsonConvert.SerializeObject(item)); ActivityContext.StartActivity(intent); break; } } } catch (Exception e) { Console.WriteLine(e); } }; holder.IconMore.Click += (sender, args) => { try { DialogType = "More"; DataInfoObject = item; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); arrayAdapter.Add(ActivityContext.GetText(Resource.String.Lbl_Edit)); arrayAdapter.Add(ActivityContext.GetText(Resource.String.Lbl_Delete)); dialogList.Title(ActivityContext.GetText(Resource.String.Lbl_More)); dialogList.Items(arrayAdapter); dialogList.NegativeText(ActivityContext.GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception e) { Console.WriteLine(e); } }; } } } } catch (Exception exception) { Console.WriteLine(exception); } }
private void BtnContinueOnClick(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(TxtAmount.Text) || string.IsNullOrWhiteSpace(TxtAmount.Text) || Convert.ToInt32(TxtAmount.Text) == 0) { Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_Please_enter_amount), ToastLength.Short)?.Show(); return; } if (!Methods.CheckConnectivity()) { Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Long)?.Show(); return; } GlobalContext.TypeOpenPayment = "AddFundsFragment"; Price = TxtAmount.Text; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); if (AppSettings.ShowPaypal) { arrayAdapter.Add(GetString(Resource.String.Btn_Paypal)); } if (AppSettings.ShowCreditCard) { arrayAdapter.Add(GetString(Resource.String.Lbl_CreditCard)); } if (AppSettings.ShowBankTransfer) { arrayAdapter.Add(GetString(Resource.String.Lbl_BankTransfer)); } if (AppSettings.ShowRazorPay) { arrayAdapter.Add(GetString(Resource.String.Lbl_RazorPay)); } if (AppSettings.ShowPayStack) { arrayAdapter.Add(GetString(Resource.String.Lbl_PayStack)); } if (AppSettings.ShowCashFree) { arrayAdapter.Add(GetString(Resource.String.Lbl_CashFree)); } if (AppSettings.ShowPaySera) { arrayAdapter.Add(GetString(Resource.String.Lbl_PaySera)); } dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void MAdapterOnCallClick(object sender, LastCallsAdapterClickEventArgs adapterClickEvents) { try { var position = adapterClickEvents.Position; if (position >= 0) { var item = MAdapter.GetItem(position); if (item != null) { DataUser = item; string timeNow = DateTime.Now.ToString("hh:mm"); var unixTimestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); string time = Convert.ToString(unixTimestamp); if (AppSettings.EnableAudioCall && AppSettings.EnableVideoCall) { var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); arrayAdapter.Add(Context.GetText(Resource.String.Lbl_Voice_call)); arrayAdapter.Add(Context.GetText(Resource.String.Lbl_Video_call)); dialogList.Title(GetText(Resource.String.Lbl_Call)); //dialogList.Content(GetText(Resource.String.Lbl_Select_Type_Call)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else if (AppSettings.EnableAudioCall == false && AppSettings.EnableVideoCall) // Video Call On { try { Intent intentVideoCall = new Intent(Context, typeof(TwilioVideoCallActivity)); if (AppSettings.UseLibrary == SystemCall.Agora) { intentVideoCall = new Intent(Context, typeof(AgoraVideoCallActivity)); intentVideoCall.PutExtra("type", "Agora_video_calling_start"); } else if (AppSettings.UseLibrary == SystemCall.Twilio) { intentVideoCall = new Intent(Context, typeof(TwilioVideoCallActivity)); intentVideoCall.PutExtra("type", "Twilio_video_calling_start"); } intentVideoCall.PutExtra("UserID", item.UserId); intentVideoCall.PutExtra("avatar", item.Avatar); intentVideoCall.PutExtra("name", item.Name); intentVideoCall.PutExtra("time", timeNow); intentVideoCall.PutExtra("CallID", time); intentVideoCall.PutExtra("access_token", "YOUR_TOKEN"); intentVideoCall.PutExtra("access_token_2", "YOUR_TOKEN"); intentVideoCall.PutExtra("from_id", "0"); intentVideoCall.PutExtra("active", "0"); intentVideoCall.PutExtra("status", "0"); intentVideoCall.PutExtra("room_name", "TestRoom"); StartActivity(intentVideoCall); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } } else if (AppSettings.EnableAudioCall && AppSettings.EnableVideoCall == false) // Audio Call On { try { Intent intentVideoCall = new Intent(Context, typeof(TwilioVideoCallActivity)); if (AppSettings.UseLibrary == SystemCall.Agora) { intentVideoCall = new Intent(Context, typeof(AgoraAudioCallActivity)); intentVideoCall.PutExtra("type", "Agora_audio_calling_start"); } else if (AppSettings.UseLibrary == SystemCall.Twilio) { intentVideoCall = new Intent(Context, typeof(TwilioAudioCallActivity)); intentVideoCall.PutExtra("type", "Twilio_audio_calling_start"); } intentVideoCall.PutExtra("UserID", item.UserId); intentVideoCall.PutExtra("avatar", item.Avatar); intentVideoCall.PutExtra("name", item.Name); intentVideoCall.PutExtra("time", timeNow); intentVideoCall.PutExtra("CallID", time); intentVideoCall.PutExtra("access_token", "YOUR_TOKEN"); intentVideoCall.PutExtra("access_token_2", "YOUR_TOKEN"); intentVideoCall.PutExtra("from_id", "0"); intentVideoCall.PutExtra("active", "0"); intentVideoCall.PutExtra("status", "0"); intentVideoCall.PutExtra("room_name", "TestRoom"); StartActivity(intentVideoCall); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } } } } } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }