private void LoadDataUser() { try { CollapsingToolbar.Title = DeepSoundTools.GetNameFinal(DataUser); GlideImageLoader.LoadImage(Activity, DataUser.Avatar, ImageAvatar, ImageStyle.CircleCrop, ImagePlaceholders.Drawable); GlideImageLoader.LoadImage(Activity, DataUser.Cover, ImageCover, ImageStyle.CenterCrop, ImagePlaceholders.Drawable); TxtUserName.Text = DeepSoundTools.GetNameFinal(DataUser); TextSanitizer aboutSanitizer = new TextSanitizer(TxtAbout, Activity); aboutSanitizer.Load(DeepSoundTools.GetAboutFinal(DataUser)); IconPro.Visibility = DataUser.IsPro == 1 ? ViewStates.Visible : ViewStates.Gone; IconVerified.Visibility = DataUser.Verified == 1 ? ViewStates.Visible : ViewStates.Gone; if (DataUser.IsFollowing) // My Friend { BtnFollow.SetColor(Color.ParseColor(AppSettings.MainColor)); BtnFollow.SetImageResource(Resource.Drawable.ic_tick); BtnFollow.Tag = "friends"; } else //Not Friend { BtnFollow.SetColor(Color.ParseColor("#444444")); BtnFollow.SetImageResource(Resource.Drawable.ic_add); BtnFollow.Tag = "Add"; } } catch (Exception e) { Console.WriteLine(e); } }
private void LoadDataUser() { try { var dataUser = ListUtils.MyUserInfoList.FirstOrDefault(a => a.Id == UserDetails.UserId); if (dataUser != null) { CollapsingToolbar.Title = DeepSoundTools.GetNameFinal(dataUser); GlideImageLoader.LoadImage(Activity, dataUser.Avatar, ImageAvatar, ImageStyle.CenterCrop, ImagePlaceholders.Drawable); GlideImageLoader.LoadImage(Activity, dataUser.Cover, ImageCover, ImageStyle.CenterCrop, ImagePlaceholders.Drawable); TxtFullName.Text = DeepSoundTools.GetNameFinal(dataUser); TxtUserName.Text = "@" + dataUser.Username; TextSanitizer aboutSanitizer = new TextSanitizer(TxtAbout, Activity); aboutSanitizer.Load(DeepSoundTools.GetAboutFinal(dataUser)); //var readMoreOption = new XTextViewAdvanced.Builder(Activity) // .SetTextLength(200, XTextViewAdvanced.TypeCharacter) // .SetMoreLabel(Context.GetText(Resource.String.Lbl_ReadMore)) // .SetLessLabel(Context.GetText(Resource.String.Lbl_ReadLess)) // .SetMoreLabelColor(Color.ParseColor(AppSettings.MainColor)) // .SetLessLabelColor(Color.ParseColor(AppSettings.MainColor)) // .SetLabelUnderLine(true) // .SetAutoLink(true) // .Build(); //readMoreOption.AddReadMoreTo(TxtAbout, new Java.Lang.String(IMethods.FunString.DecodeString(DeepSoundTools.GetAboutFinal(dataUser)))); IconPro.Visibility = dataUser.IsPro == 1 ? ViewStates.Visible : ViewStates.Gone; IconVerified.Visibility = dataUser.Verified == 1 ? ViewStates.Visible : ViewStates.Gone; } } catch (Exception e) { Console.WriteLine(e); } }