private void Initialize(JoinAdapterViewHolder holder, JoinRequestsObject item) { try { GlideImageLoader.LoadImage(ActivityContext, item.UserData.Avatar, holder.Image, ImageStyle.CircleCrop, ImagePlaceholders.Drawable); holder.Name.Text = Methods.FunString.SubStringCutOf(WoWonderTools.GetNameFinal(item.UserData), 25); if (item.UserData.Verified == "1") { holder.Name.SetCompoundDrawablesWithIntrinsicBounds(0, 0, Resource.Drawable.icon_checkmark_small_vector, 0); } holder.About.Text = Methods.Time.TimeAgo(Convert.ToInt32(item.UserData.LastseenUnixTime), false); } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
private void DestroyBasic() { try { MAdView?.Destroy(); MAdapter = null !; SwipeRefreshLayout = null !; MRecycler = null !; EmptyStateLayout = null !; Inflated = null !; MainScrollEvent = null !; GroupId = null !; ItemJoinRequests = null !; MAdView = null !; } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
private void DestroyBasic() { try { MAdView?.Destroy(); MAdapter = null; SwipeRefreshLayout = null; MRecycler = null; EmptyStateLayout = null; Inflated = null; MainScrollEvent = null; GroupId = null; ItemJoinRequests = null; MAdView = null; } catch (Exception e) { Console.WriteLine(e); } }
private void MAdapterOnItemClick(object sender, JoinAdapterClickEventArgs e) { try { JoinRequestsObject item = MAdapter.GetItem(e.Position); if (item != null) { ItemJoinRequests = item; var dialog = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialog.Title(Resource.String.Lbl_joinRequest); dialog.Content(GetText(Resource.String.Lbl_Do_you_want_approve_join)); dialog.PositiveText(GetText(Resource.String.Lbl_Accept)).OnPositive(this); dialog.NegativeText(GetText(Resource.String.Lbl_Delete)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.Build().Show(); } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }