private void RecourdPlaybutton_Click(object sender, EventArgs e) { try { if (!string.IsNullOrEmpty(RecourdFilePath)) { if (RecourdPlaybutton.Tag.ToString() == "Stop") { RecourdPlaybutton.Tag = "Playing"; RecourdPlaybutton.SetColor(Color.ParseColor("#efefef")); RecourdPlaybutton.SetImageResource(Resource.Drawable.ic_stop_dark_arrow); AudioPlayerClass.PlayAudioFromPath(RecourdFilePath); VoiceSeekbar.Max = AudioPlayerClass.Player.Duration; TimerSound.Interval = 1000; TimerSound.Elapsed += TimerSound_Elapsed; TimerSound.Start(); } else { RestPlayButton(); } } } catch (Exception exception) { Console.WriteLine(exception); } }
private void RecordPlayButton_Click(object sender, EventArgs e) { try { switch (string.IsNullOrEmpty(RecordFilePath)) { case false when RecordPlayButton?.Tag?.ToString() == "Stop": RecordPlayButton.Tag = "Playing"; RecordPlayButton.SetColor(Color.ParseColor("#efefef")); RecordPlayButton.SetImageResource(Resource.Drawable.ic_stop_dark_arrow); AudioPlayerClass.PlayAudioFromPath(RecordFilePath); VoiceSeekBar.Max = AudioPlayerClass.Player.Duration; TimerSound.Interval = 1000; TimerSound.Elapsed += TimerSound_Elapsed; TimerSound.Start(); break; case false: RestPlayButton(); break; } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
//Follow private void BtnAddUserOnClick(object sender, EventArgs e) { try { if (!UserDetails.IsLogin) { PopupDialogController dialog = new PopupDialogController(Activity, null, "Login"); dialog.ShowNormalDialog(Activity.GetText(Resource.String.Lbl_Login), Activity.GetText(Resource.String.Lbl_Message_Sorry_signin), Activity.GetText(Resource.String.Lbl_Yes), Activity.GetText(Resource.String.Lbl_No)); return; } if (!Methods.CheckConnectivity()) { Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show(); return; } switch (BtnFollow.Tag.ToString()) { case "Add": //Sent follow BtnFollow.SetColor(Color.ParseColor(AppSettings.MainColor)); BtnFollow.SetImageResource(Resource.Drawable.ic_tick); BtnFollow.Tag = "friends"; DataUser.IsFollowing = true; Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_Sent_successfully_followed), ToastLength.Short).Show(); PollyController.RunRetryPolicyFunction(new List <Func <Task> > { () => RequestsAsync.User.FollowUnFollowUserAsync(UserId, true) }); break; case "friends": //Sent un follow BtnFollow.SetColor(Color.ParseColor("#444444")); BtnFollow.SetImageResource(Resource.Drawable.ic_add); BtnFollow.Tag = "Add"; DataUser.IsFollowing = false; Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_Sent_successfully_Unfollowed), ToastLength.Short).Show(); PollyController.RunRetryPolicyFunction(new List <Func <Task> > { () => RequestsAsync.User.FollowUnFollowUserAsync(UserId, false) }); break; } var dataUser = GlobalContext?.MainFragment?.ArtistsAdapter?.ArtistsList?.FirstOrDefault(a => a.Id == DataUser.Id); if (dataUser != null) { dataUser.IsFollowing = DataUser.IsFollowing; GlobalContext.MainFragment.ArtistsAdapter.NotifyDataSetChanged(); } } catch (Exception exception) { Console.WriteLine(exception); } }
//open Layout as a message public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { try { base.OnCreateView(inflater, container, savedInstanceState); var view = inflater.Inflate(Resource.Layout.Dialog_User_Fragment, container, false); // Get values TxtUsername = view.FindViewById <TextView>(Resource.Id.Txt_Username); TxtName = view.FindViewById <TextView>(Resource.Id.Txt_SecendreName); BtnSendMesseges = view.FindViewById <CircleButton>(Resource.Id.SendMesseges_button); BtnAdd = view.FindViewById <CircleButton>(Resource.Id.Add_button); BtnAdd.Tag = "Add"; ImageUserprofile = view.FindViewById <ImageView>(Resource.Id.profileAvatar_image); //profile_picture GlideImageLoader.LoadImage(Activity, Item.Avatar, ImageUserprofile, ImageStyle.CircleCrop, ImagePlaceholders.Drawable); TxtUsername.Text = Item.Name; TxtName.Text = "@" + Item.Username; if (Item.IsFollowing == "1") // My Friend { BtnAdd.SetColor(Color.ParseColor(AppSettings.MainColor)); BtnAdd.SetImageResource(Resource.Drawable.ic_tick); BtnAdd.Tag = "friends"; } else if (Item.IsFollowing == "2") // Request { BtnAdd.SetColor(Color.ParseColor(AppSettings.MainColor)); BtnAdd.SetImageResource(Resource.Drawable.ic_tick); BtnAdd.Tag = "Request"; } else if (Item.IsFollowing == "0") //Not Friend { BtnAdd.Visibility = ViewStates.Visible; BtnAdd.SetColor(Color.ParseColor("#8c8a8a")); BtnAdd.SetImageResource(Resource.Drawable.ic_add); BtnAdd.Tag = "Add"; } // Event BtnSendMesseges.Click += BtnSendMessegesOnClick; BtnAdd.Click += BtnAddOnClick; return(view); } catch (Exception e) { Console.WriteLine(e); return(null); } }
IEnumerator DoEndAnimation(bool correct, CircleButton correctButton) { box.Active = false; if (correct) { correctButton.SetColor(UnityEngine.Color.green); } else { correctButton.SetColor(UnityEngine.Color.red); } yield return(new UnityEngine.WaitForSeconds(1.0f)); if (!correct && game.RemoveLife()) { yield break; } game.circleBox.GetComponent <CircleButtonBox>().Clear(() => { game.SetCurrentState(game.QuestionState); }, 0.5f); }
public override View GetView(int position, View convertView, ViewGroup parent) { var item = items[position]; View view = convertView; if (view == null) { view = context.LayoutInflater.Inflate(Resource.Layout.CustomView, null); } //view.Background DD = view.FindViewById <LinearLayout>(Resource.Id.DataDot); Circle = new CircleButton(context) { Id = item.ID }; Circle.SetMinimumHeight(100); Circle.SetMaxHeight(100); Circle.SetMinimumWidth(100); Circle.SetMaxWidth(100); Circle.Clickable = false; Circle.Pressed = false; Circle.SetColor(Color.Rgb(item.Red, item.Green, item.Blue)); var param = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent); DD.AddView(Circle, param); DS = view.FindViewById <TextView>(Resource.Id.DataSpace); DS.Text = " "; DT = view.FindViewById <TextView>(Resource.Id.DataText); DT.Text = item.DataName; return(view); }
private void AddFriendOrFollowButtonClick(object sender, EventArgs e) { try { if (Methods.CheckConnectivity()) { if (AddFriendOrFollowButton.Tag.ToString() == "Add") //(is_following == "0") >> Not Friend { AddFriendOrFollowButton.SetColor(Color.ParseColor(AppSettings.MainColor)); AddFriendOrFollowButton.SetImageResource(Resource.Drawable.ic_tick); AddFriendOrFollowButton.Tag = "friends"; } else if (AddFriendOrFollowButton.Tag.ToString() == "request") //(is_following == "2") >> Request { AddFriendOrFollowButton.SetColor(Color.ParseColor(AppSettings.MainColor)); AddFriendOrFollowButton.SetImageResource(Resource.Drawable.ic_tick); AddFriendOrFollowButton.Tag = "Add"; } else //(is_following == "1") >> Friend { AddFriendOrFollowButton.SetColor(Color.ParseColor("#8c8a8a")); AddFriendOrFollowButton.SetImageResource(Resource.Drawable.ic_add); AddFriendOrFollowButton.Tag = "Add"; } PollyController.RunRetryPolicyFunction(new List <Func <Task> > { () => RequestsAsync.Global.Follow_User(SUserId) }); } else { Toast.MakeText(this, GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show(); } } catch (Exception exception) { Console.WriteLine(exception); } }
private async Task LoadDataAsync() { if (Methods.CheckConnectivity()) { var channel = await ApiRequest.GetChannelData(Activity, IdChannel); if (channel != null) { TextSanitizer text = new TextSanitizer(TxtAboutChannel, Activity, GlobalContext); text.Load(AppTools.GetAboutFinal(channel)); if (channel.Gender == "male" || channel.Gender == "Male") { TxtGender.Text = GetText(Resource.String.Radio_Male); } else { TxtGender.Text = GetText(Resource.String.Radio_Female); } TxtEmail.Text = channel.Email; Facebook = channel.Facebook; Google = channel.Google; Twitter = channel.Twitter; if (string.IsNullOrEmpty(channel.Facebook)) { BtnFacebook.Enabled = false; BtnFacebook.SetColor(Color.ParseColor("#8c8a8a")); } else { BtnFacebook.Enabled = true; } if (string.IsNullOrEmpty(channel.Twitter)) { BtnTwitter.Enabled = false; BtnTwitter.SetColor(Color.ParseColor("#8c8a8a")); } else { BtnTwitter.Enabled = true; } if (string.IsNullOrEmpty(channel.Google)) { BtnGoogle.Enabled = false; BtnGoogle.SetColor(Color.ParseColor("#8c8a8a")); } else { BtnGoogle.Enabled = true; } if (IdChannel == UserDetails.UserId) { var idCurrency = ListUtils.MySettingsList?.PaymentCurrency; var(currency, currencyIcon) = AppTools.GetCurrency(idCurrency); Console.WriteLine(currencyIcon); TxtMonetization.Text = channel.Balance + " " + currency; } } } else { Toast.MakeText(Context, Context.GetString(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show(); } }
IEnumerator DoEndAnimation(bool correct, CircleButton correctButton, CircleButton clickedButton = null) { Finished = true; box.Active = false; game.StartCoroutine(game.gameLettersHandler.CleanupCO(correct)); if (countdownCo != null) { game.StopCoroutine(countdownCo); } if (ReadingGameConfiguration.Instance.CurrentGameType == ReadingGameConfiguration.GameType.ReadAndListen) { if (!TutorialMode) { if (correct) { game.AddScore(1); } } } if (ReadingGameConfiguration.Instance.CurrentGameType != ReadingGameConfiguration.GameType.SimonSong) { yield return(new WaitForSeconds(1.0f)); } if (ReadingGameConfiguration.Instance.CurrentGameType != ReadingGameConfiguration.GameType.ReadAndListen) { if (!correct && game.RemoveLife()) { yield break; } } if (ReadingGameConfiguration.Instance.CurrentGameType == ReadingGameConfiguration.GameType.SimonSong) { // Time up if (!correct && !clickedButton) { game.circleBox.GetComponent <CircleButtonBox>().ClearButtonsApartFrom(correctButton); } else { if (correct) { game.AddScore(1); } else { clickedButton?.SetColor(Color.red); yield return(new WaitForSeconds(0.5f)); } correctButton.SetColor(Color.green); game.circleBox.GetComponent <CircleButtonBox>().Clear(startDelay: 0.5f); } game.Context.GetAudioManager().PlayVocabularyData(correctButton.Answer); game.ChangeLoopingSong(game.CurrentSongBPM.intro); Debug.Log("POST ANSWER INTRO LOOP"); game.onSongLoop += () => { KeeperManager.I.CloseSubtitles(); Debug.Log("END - POST ANSWER INTRO LOOP"); game.StopLoopingSong(); game.SetCurrentState(game.QuestionState); }; } else if (ReadingGameConfiguration.Instance.CurrentGameType == ReadingGameConfiguration.GameType.SimonSong) { game.circleBox.GetComponent <CircleButtonBox>().ClearButtonsApartFrom(correctButton); game.circleBox.GetComponent <CircleButtonBox>().Clear(() => { game.SetCurrentState(game.QuestionState); }, 0.5f); } else { //if (!correct) clickedButton?.SetColor(Color.red); correctButton.SetColor(Color.green); game.circleBox.GetComponent <CircleButtonBox>().Clear(() => { game.SetCurrentState(game.QuestionState); }, 0.5f); } }
void OnAnswered(CircleButton clickedButton) { if (Finished) { return; } Finished = true; game.DisableRepeatPromptButton(); if (ReadingGameConfiguration.Instance.ShowTimer && !TutorialMode) { UI.MinigamesUI.Timer.Pause(); } bool isCorrect = clickedButton != null && DataMatchingHelper.IsDataMatching(clickedButton.Answer, correctLLData, LetterEqualityStrictness.Letter); game.Context.GetAudioManager().PlaySound(isCorrect ? Sfx.OK : Sfx.KO); if (isCorrect) { clickedButton?.SetColor(Color.green); } else { if (clickedButton != null) { TutorialUI.MarkNo(clickedButton.transform.position); } } if (ReadingGameConfiguration.Instance.CurrentGameType == ReadingGameConfiguration.GameType.ReadAndListen) { if (isCorrect) { correctLLData = new LL_ImageData(correctLLData.Id); var runLetter = game.runLettersBox.AddRunLetter(correctLLData, Vector3.one * 4); runLetter.Stop(); runLetter.PlayAnimation(LLAnimationStates.LL_dancing); } else { game.runLettersBox.AnimateAll(LLAnimationStates.LL_tickling); } // First read the answer you clicked if (clickedButton != null) { game.Context.GetAudioManager().PlayVocabularyData(clickedButton.Answer, autoClose: false, callback: () => { // Then read the one that is correct, if not already correct, and highlight it if (!isCorrect) { if (TutorialMode) { Finished = false; } else { correctButton.SetColor(Color.green); game.Context.GetAudioManager().PlayVocabularyData(correctButton.Answer, callback: () => { // Then translate the sentence game.Context.GetAudioManager().PlayVocabularyData( game.CurrentQuestion.GetQuestion(), autoClose: false, keeperMode: KeeperMode.NativeNoSubtitles, callback: () => { Next(isCorrect, clickedButton); }); }); } } else { // Just translate the sentence game.Context.GetAudioManager().PlayVocabularyData(game.CurrentQuestion.GetQuestion(), autoClose: false, keeperMode: KeeperMode.NativeNoSubtitles, callback: () => { Next(isCorrect, clickedButton); }); } }); } else { // Time out. Just as if you failed. if (TutorialMode) { Finished = false; } else { correctButton.SetColor(Color.green); game.Context.GetAudioManager().PlayVocabularyData(correctButton.Answer, callback: () => { // Then translate the sentence game.Context.GetAudioManager().PlayVocabularyData( game.CurrentQuestion.GetQuestion(), autoClose: false, keeperMode: KeeperMode.NativeNoSubtitles, callback: () => { Next(isCorrect, clickedButton); }); }); } } } else { Next(isCorrect, clickedButton); } }
//open Layout as a message public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { try { base.OnCreateView(inflater, container, savedInstanceState); // Set our view from the "Dialog_User_Fragment" layout resource var view = inflater.Inflate(Resource.Layout.Dialog_User_Fragment, container, false); // Get values Txt_Username = view.FindViewById <TextView>(Resource.Id.Txt_Username); Txt_Name = view.FindViewById <TextView>(Resource.Id.Txt_SecendreName); Btn_SendMesseges = view.FindViewById <CircleButton>(Resource.Id.SendMesseges_button); Btn_Add = view.FindViewById <CircleButton>(Resource.Id.Add_button); Btn_Add.Tag = "Add"; Image_Userprofile = view.FindViewById <ImageView>(Resource.Id.profileAvatar_image); //profile_picture ImageCacheLoader.LoadImage(_Item.Avatar, Image_Userprofile, false, true); Txt_Username.Text = _Item.Name; Txt_Name.Text = "@" + _Item.Username; if (_Item.is_following == "1") // My Friend { Btn_Add.Visibility = ViewStates.Visible; Btn_Add.SetColor(Color.ParseColor("#efefef")); Btn_Add.SetImageResource(Resource.Drawable.ic_tick); Btn_Add.Drawable.SetTint(Color.ParseColor("#444444")); Btn_Add.Tag = "friends"; } else if (_Item.is_following == "2") // Request { Btn_Add.SetColor(Color.ParseColor("#efefef")); Btn_Add.SetImageResource(Resource.Drawable.ic_tick); Btn_Add.Drawable.SetTint(Color.ParseColor("#444444")); Btn_Add.Tag = "Request"; } else if (_Item.is_following == "0") //Not Friend { Btn_Add.Visibility = ViewStates.Visible; Btn_Add.SetColor(Color.ParseColor("#444444")); Btn_Add.SetImageResource(Resource.Drawable.ic_add); Btn_Add.Drawable.SetTint(Color.ParseColor("#ffffff")); Btn_Add.Tag = "Add"; } // Event Btn_SendMesseges.Click += BtnSendMessegesOnClick; Btn_Add.Click += BtnAddOnClick; return(view); } catch (Exception e) { Console.WriteLine(e); return(null); } }
private void BtnAddOnClick(object sender, EventArgs eventArgs) { try { if (IMethods.CheckConnectivity()) { if (Btn_Add.Tag.ToString() == "Add") //(is_following == "0") >> Not Friend { Btn_Add.SetColor(Color.ParseColor("#efefef")); Btn_Add.SetImageResource(Resource.Drawable.ic_tick); Btn_Add.Drawable.SetTint(Color.ParseColor("#444444")); Btn_Add.Tag = "friends"; _Item.is_following = "1"; } else if (Btn_Add.Tag.ToString() == "request") //(is_following == "2") >> Request { Btn_Add.SetColor(Color.ParseColor("#efefef")); Btn_Add.SetImageResource(Resource.Drawable.ic_tick); Btn_Add.Drawable.SetTint(Color.ParseColor("#444444")); Btn_Add.Tag = "Add"; _Item.is_following = "2"; } else //(is_following == "1") >> Friend { Btn_Add.SetColor(Color.ParseColor("#444444")); Btn_Add.SetImageResource(Resource.Drawable.ic_add); Btn_Add.Drawable.SetTint(Color.ParseColor("#ffffff")); Btn_Add.Tag = "Add"; var dbDatabase = new SqLiteDatabase(); dbDatabase.Delete_UsersContact(_Userid); dbDatabase.Dispose(); _Item.is_following = "0"; } var response = Global.Follow_User(_Userid).ConfigureAwait(false); if (_Item.is_following == "1") { if (AppSettings.ConnectivitySystem == "1") { Toast.MakeText(Application.Context, this.GetText(Resource.String.Lbl_Sent_successfully_followed), ToastLength.Short).Show(); } else { Toast.MakeText(Application.Context, this.GetText(Resource.String.Lbl_Sent_successfully_FriendRequest), ToastLength.Short) .Show(); } } else { if (AppSettings.ConnectivitySystem == "1") { Toast.MakeText(Application.Context, this.GetText(Resource.String.Lbl_Sent_successfully_Unfollowed), ToastLength.Short) .Show(); } else { Toast.MakeText(Application.Context, this.GetText(Resource.String.Lbl_Sent_successfully_FriendRequestCancelled), ToastLength.Short).Show(); } } } else { Toast.MakeText(Application.Context, this.GetText(Resource.String.Lbl_Error_check_internet_connection), ToastLength.Short).Show(); } } catch (Exception e) { Console.WriteLine(e); } }
private void InitComponent() { try { TxtNameIcon = FindViewById <TextView>(Resource.Id.name_icon); TxtFullname = FindViewById <TextView>(Resource.Id.Txt_fullname); TxtUserName = FindViewById <TextView>(Resource.Id.username); TxtFollowers = FindViewById <TextView>(Resource.Id.Txt_flowersView); TxtFollowersCount = FindViewById <TextView>(Resource.Id.Txt_flowers_count); TxtFollowing = FindViewById <TextView>(Resource.Id.flowinglabelView); TxtFollowingCount = FindViewById <TextView>(Resource.Id.Txt_flowing_countView); TxtFirstName = FindViewById <EditText>(Resource.Id.FirstName_text); TxtLastName = FindViewById <EditText>(Resource.Id.LastName_text); UserProfileImage = FindViewById <ImageView>(Resource.Id.profile_image); CoverImage = FindViewById <ImageView>(Resource.Id.coverImageView); TxtGenderIcon = FindViewById <TextView>(Resource.Id.gender_icon); TxtGenderText = FindViewById <EditText>(Resource.Id.gender_text); TxtLocationIcon = FindViewById <TextView>(Resource.Id.location_icon); TxtLocationText = FindViewById <EditText>(Resource.Id.location_text); TxtMobileIcon = FindViewById <TextView>(Resource.Id.mobile_icon); TxtMobileText = FindViewById <EditText>(Resource.Id.mobile_text); TxtWebsiteIcon = FindViewById <TextView>(Resource.Id.website_icon); TxtWebsiteText = FindViewById <EditText>(Resource.Id.website_text); TxtWorkIcon = FindViewById <TextView>(Resource.Id.work_icon); TxtWorkText = FindViewById <EditText>(Resource.Id.work_text); TxtFacebookIcon = FindViewById <TextView>(Resource.Id.facebook_icon); TxtFacebookText = FindViewById <EditText>(Resource.Id.facebook_text); TxtGoogleIcon = FindViewById <TextView>(Resource.Id.Google_icon); TxtGoogleText = FindViewById <EditText>(Resource.Id.Google_text); TxtTwitterIcon = FindViewById <TextView>(Resource.Id.Twitter_icon); TxtTwitterText = FindViewById <EditText>(Resource.Id.Twitter_text); TxtVkIcon = FindViewById <TextView>(Resource.Id.VK_icon); TxtVkText = FindViewById <EditText>(Resource.Id.VK_text); TxtInstagramIcon = FindViewById <TextView>(Resource.Id.Instagram_icon); TxtInstagramText = FindViewById <EditText>(Resource.Id.Instagram_text); TxtYoutubeIcon = FindViewById <TextView>(Resource.Id.Youtube_icon); TxtYoutubeText = FindViewById <EditText>(Resource.Id.Youtube_text); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtGenderIcon, IonIconsFonts.Male); TxtGenderIcon.SetTextColor(Color.ParseColor("#4693d8")); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtLocationIcon, IonIconsFonts.Location); TxtLocationIcon.SetTextColor(Color.ParseColor(AppSettings.MainColor)); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtMobileIcon, IonIconsFonts.AndroidCall); TxtMobileIcon.SetTextColor(Color.ParseColor("#fa6670")); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtWebsiteIcon, IonIconsFonts.AndroidGlobe); TxtWebsiteIcon.SetTextColor(Color.ParseColor("#6b38d1")); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtWorkIcon, IonIconsFonts.Briefcase); TxtWorkIcon.SetTextColor(Color.ParseColor("#eca72c")); EditProfileButton = FindViewById <CircleButton>(Resource.Id.Edit_button); //EditProfile_button.Click += EditProfileButtonOnClick; EditProfileButton.Visibility = ViewStates.Invisible; EditProfileButton.SetColor(Color.ParseColor("#282828")); if (AppSettings.SetTabDarkTheme) { TxtFirstName.SetTextColor(Color.White); TxtFirstName.SetHintTextColor(Color.White); TxtLastName.SetTextColor(Color.White); TxtLastName.SetHintTextColor(Color.White); TxtGenderText.SetTextColor(Color.White); TxtGenderText.SetHintTextColor(Color.White); TxtLocationText.SetTextColor(Color.White); TxtLocationText.SetHintTextColor(Color.White); TxtMobileText.SetTextColor(Color.White); TxtMobileText.SetHintTextColor(Color.White); TxtWebsiteText.SetTextColor(Color.White); TxtWebsiteText.SetHintTextColor(Color.White); TxtWorkText.SetTextColor(Color.White); TxtWorkText.SetHintTextColor(Color.White); TxtFacebookText.SetTextColor(Color.White); TxtFacebookText.SetHintTextColor(Color.White); TxtGoogleText.SetTextColor(Color.White); TxtGoogleText.SetHintTextColor(Color.White); TxtTwitterText.SetTextColor(Color.White); TxtTwitterText.SetHintTextColor(Color.White); TxtVkText.SetTextColor(Color.White); TxtVkText.SetHintTextColor(Color.White); TxtInstagramText.SetTextColor(Color.White); TxtInstagramText.SetHintTextColor(Color.White); TxtYoutubeText.SetTextColor(Color.White); TxtYoutubeText.SetHintTextColor(Color.White); } else { TxtFirstName.SetTextColor(Color.Black); TxtFirstName.SetHintTextColor(Color.Black); TxtLastName.SetTextColor(Color.Black); TxtLastName.SetHintTextColor(Color.Black); TxtGenderText.SetTextColor(Color.Black); TxtGenderText.SetHintTextColor(Color.Black); TxtLocationText.SetTextColor(Color.Black); TxtLocationText.SetHintTextColor(Color.Black); TxtMobileText.SetTextColor(Color.Black); TxtMobileText.SetHintTextColor(Color.Black); TxtWebsiteText.SetTextColor(Color.Black); TxtWebsiteText.SetHintTextColor(Color.Black); TxtWorkText.SetTextColor(Color.Black); TxtWorkText.SetHintTextColor(Color.Black); TxtFacebookText.SetTextColor(Color.Black); TxtFacebookText.SetHintTextColor(Color.Black); TxtGoogleText.SetTextColor(Color.Black); TxtGoogleText.SetHintTextColor(Color.Black); TxtTwitterText.SetTextColor(Color.Black); TxtTwitterText.SetHintTextColor(Color.Black); TxtVkText.SetTextColor(Color.Black); TxtVkText.SetHintTextColor(Color.Black); TxtInstagramText.SetTextColor(Color.Black); TxtInstagramText.SetHintTextColor(Color.Black); TxtYoutubeText.SetTextColor(Color.Black); TxtYoutubeText.SetHintTextColor(Color.Black); } FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtNameIcon, IonIconsFonts.Person); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtFacebookIcon, IonIconsFonts.SocialFacebook); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtGoogleIcon, IonIconsFonts.SocialGoogle); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtTwitterIcon, IonIconsFonts.SocialTwitter); FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeBrands, TxtVkIcon, FontAwesomeIcon.Vk); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtInstagramIcon, IonIconsFonts.SocialInstagram); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtYoutubeIcon, IonIconsFonts.SocialYoutube); TxtGenderText.SetFocusable(ViewFocusability.NotFocusable); } catch (Exception e) { Console.WriteLine(e); } }
private void BtnAddOnClick(object sender, EventArgs eventArgs) { try { if (Methods.CheckConnectivity()) { if (BtnAdd.Tag.ToString() == "Add") //(is_following == "0") >> Not Friend { BtnAdd.SetColor(Color.ParseColor(AppSettings.MainColor)); BtnAdd.SetImageResource(Resource.Drawable.ic_tick); BtnAdd.Tag = "friends"; Item.IsFollowing = "1"; } else if (BtnAdd.Tag.ToString() == "request") //(is_following == "2") >> Request { BtnAdd.SetColor(Color.ParseColor(AppSettings.MainColor)); BtnAdd.SetImageResource(Resource.Drawable.ic_tick); BtnAdd.Tag = "Add"; Item.IsFollowing = "2"; } else //(is_following == "1") >> Friend { BtnAdd.SetColor(Color.ParseColor("#8c8a8a")); BtnAdd.SetImageResource(Resource.Drawable.ic_add); BtnAdd.Tag = "Add"; var dbDatabase = new SqLiteDatabase(); dbDatabase.Delete_UsersContact(Userid); dbDatabase.Dispose(); Item.IsFollowing = "0"; } var local = ActivityContext.MAdapter?.UserList?.FirstOrDefault(a => a.UserId == Userid); if (local != null) { local.IsFollowing = Item.IsFollowing; ActivityContext.MAdapter?.NotifyItemChanged(ActivityContext.MAdapter.UserList.IndexOf(local)); } PollyController.RunRetryPolicyFunction(new List <Func <Task> > { () => RequestsAsync.Global.Follow_User(Userid) }); if (Item.IsFollowing == "1") { if (AppSettings.ConnectivitySystem == 1) { Toast.MakeText(ActivityContext, GetText(Resource.String.Lbl_Sent_successfully_followed), ToastLength.Short).Show(); } else { Toast.MakeText(ActivityContext, GetText(Resource.String.Lbl_Sent_successfully_FriendRequest), ToastLength.Short).Show(); } } else { if (AppSettings.ConnectivitySystem == 1) { Toast.MakeText(ActivityContext, GetText(Resource.String.Lbl_Sent_successfully_Unfollowed), ToastLength.Short).Show(); } else { Toast.MakeText(ActivityContext, GetText(Resource.String.Lbl_Sent_successfully_FriendRequestCancelled), ToastLength.Short).Show(); } } } else { Toast.MakeText(ActivityContext, GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show(); } } catch (Exception e) { Console.WriteLine(e); } }
private void InitComponent() { try { MediaLiner = (LinearLayout)FindViewById(Resource.Id.mediaLiner); MediaLiner.Visibility = ViewStates.Gone; MainLinear = (LinearLayout)FindViewById(Resource.Id.mainLinear); IconTitle = (TextView)FindViewById(Resource.Id.iconTitle); MRecycler = (RecyclerView)FindViewById(Resource.Id.recyler); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconTitle, IonIconsFonts.Document); TxtFullname = FindViewById <TextView>(Resource.Id.Txt_fullname); TxtUserName = FindViewById <TextView>(Resource.Id.username); TxtFollowers = FindViewById <TextView>(Resource.Id.Txt_flowersView); TxtFollowersCount = FindViewById <TextView>(Resource.Id.Txt_flowers_count); TxtFollowing = FindViewById <TextView>(Resource.Id.flowinglabelView); TxtFollowingCount = FindViewById <TextView>(Resource.Id.Txt_flowing_countView); TxtAbout = FindViewById <AutoLinkTextView>(Resource.Id.Txt_AboutUser); ImageUserProfile = FindViewById <ImageView>(Resource.Id.profile_image); ImageUserCover = FindViewById <ImageView>(Resource.Id.coverImageView); GenderLiner = FindViewById <LinearLayout>(Resource.Id.genderLiner); TxtGenderIcon = FindViewById <TextView>(Resource.Id.gender_icon); TxtGenderText = FindViewById <TextView>(Resource.Id.gender_text); LocationLiner = FindViewById <LinearLayout>(Resource.Id.locationLiner); TxtLocationIcon = FindViewById <TextView>(Resource.Id.location_icon); TxtLocationText = FindViewById <TextView>(Resource.Id.location_text); MobileLiner = FindViewById <LinearLayout>(Resource.Id.mobileLiner); TxtMobileIcon = FindViewById <TextView>(Resource.Id.mobile_icon); TxtMobileText = FindViewById <TextView>(Resource.Id.mobile_text); WebsiteLiner = FindViewById <LinearLayout>(Resource.Id.websiteLiner); TxtWebsiteIcon = FindViewById <TextView>(Resource.Id.website_icon); TxtWebsiteText = FindViewById <TextView>(Resource.Id.website_text); WorkLiner = FindViewById <LinearLayout>(Resource.Id.workLiner); TxtWorkIcon = FindViewById <TextView>(Resource.Id.work_icon); TxtWorkText = FindViewById <TextView>(Resource.Id.work_text); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtGenderIcon, IonIconsFonts.Male); TxtGenderIcon.SetTextColor(Color.ParseColor("#4693d8")); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtLocationIcon, IonIconsFonts.Location); TxtLocationIcon.SetTextColor(Color.ParseColor(AppSettings.MainColor)); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtMobileIcon, IonIconsFonts.AndroidCall); TxtMobileIcon.SetTextColor(Color.ParseColor("#fa6670")); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtWebsiteIcon, IonIconsFonts.AndroidGlobe); TxtWebsiteIcon.SetTextColor(Color.ParseColor("#6b38d1")); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, TxtWorkIcon, IonIconsFonts.Briefcase); TxtWorkIcon.SetTextColor(Color.ParseColor("#eca72c")); AddFriendOrFollowButton = FindViewById <CircleButton>(Resource.Id.follow_button); AddFriendOrFollowButton.Tag = "Add"; AddFriendOrFollowButton.SetColor(Color.ParseColor("#8c8a8a")); BtnFacebook = FindViewById <CircleButton>(Resource.Id.facebook_button); BtnInstegram = FindViewById <CircleButton>(Resource.Id.instegram_button); BtnTwitter = FindViewById <CircleButton>(Resource.Id.twitter_button); BtnGoogle = FindViewById <CircleButton>(Resource.Id.google_button); BtnVk = FindViewById <CircleButton>(Resource.Id.vk_button); BtnYoutube = FindViewById <CircleButton>(Resource.Id.youtube_button); GenderLiner.Visibility = ViewStates.Gone; LocationLiner.Visibility = ViewStates.Gone; MobileLiner.Visibility = ViewStates.Gone; WebsiteLiner.Visibility = ViewStates.Gone; WorkLiner.Visibility = ViewStates.Gone; } catch (Exception e) { Console.WriteLine(e); } }
private void InitComponent(View view) { try { ProfileImage = view.FindViewById <ImageView>(Resource.Id.Iconimage2); Username = view.FindViewById <TextView>(Resource.Id.username); WalletNumber = view.FindViewById <TextView>(Resource.Id.walletnumber); TxtUpgrade = view.FindViewById <TextView>(Resource.Id.upgradeText); XtBoostMe = view.FindViewById <TextView>(Resource.Id.tv_Boost); EditButton = view.FindViewById <CircleButton>(Resource.Id.EditButton); SettingsButton = view.FindViewById <CircleButton>(Resource.Id.SettingsButton); BoostButton = view.FindViewById <CircleButton>(Resource.Id.BoostButton); WalletButton = view.FindViewById <RelativeLayout>(Resource.Id.walletSection); PopularityButton = view.FindViewById <RelativeLayout>(Resource.Id.popularitySection); UpgradeButton = view.FindViewById <RelativeLayout>(Resource.Id.upgradeSection); FriendsButton = view.FindViewById <RelativeLayout>(Resource.Id.StFriendsLayout); FavoriteButton = view.FindViewById <RelativeLayout>(Resource.Id.StFavoriteLayout); InviteButton = view.FindViewById <RelativeLayout>(Resource.Id.StInviteFriendsLayout); BlogsButton = view.FindViewById <RelativeLayout>(Resource.Id.StBlogsLayout); HelpButton = view.FindViewById <RelativeLayout>(Resource.Id.StNeedHelpLayout); HeaderSection = view.FindViewById <LinearLayout>(Resource.Id.headerSection); MWaveLoadingView = (WaveLoadingView)view.FindViewById(Resource.Id.waveLoadingView); MWaveLoadingView.Visibility = ViewStates.Gone; BoostButton.Tag = "Off"; GlideImageLoader.LoadImage(Activity, UserDetails.Avatar, ProfileImage, ImageStyle.CircleCrop, ImagePlaceholders.Drawable); if (AppSettings.SetTabDarkTheme) { SettingsButton.SetColor(Color.Black); EditButton.SetColor(Color.Black); BoostButton.SetColor(Color.Black); } if (AppSettings.EnableAppFree) { WalletButton.Visibility = ViewStates.Invisible; UpgradeButton.Visibility = ViewStates.Invisible; } if (!AppSettings.PremiumSystemEnabled) { Activity.RunOnUiThread(() => { UpgradeButton.Visibility = ViewStates.Invisible; UpgradeButton.Enabled = false; }); } if (Build.VERSION.SdkInt < BuildVersionCodes.Lollipop) { return; } Activity.Window.ClearFlags(WindowManagerFlags.TranslucentStatus); Activity.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds); Activity.Window.SetStatusBarColor(Color.ParseColor(AppSettings.MainColor)); } catch (Exception e) { Console.WriteLine(e); } }