Exemple #1
0
        public void Initialize(InviteFriends_AdapterViewHolder holder, IMethods.PhoneContactManager.UserContact users)
        {
            try
            {
                if (Settings.FlowDirection_RightToLeft)
                {
                    holder.RelativeLayout_main.LayoutDirection = LayoutDirection.Rtl;
                    holder.Txt_name.TextDirection   = TextDirection.Rtl;
                    holder.Txt_number.TextDirection = TextDirection.Rtl;
                }

                string name = IMethods.Fun_String.DecodeString(IMethods.Fun_String.DecodeStringWithEnter(mUsersPhoneContacts[_position].UserDisplayName));

                holder.Txt_name.Text   = name;
                holder.Txt_number.Text = mUsersPhoneContacts[_position].PhoneNumber;

                var ImageTrancform = ImageService.Instance.LoadCompiledResource("no_profile_image.png");
                ImageTrancform.LoadingPlaceholder("no_profile_image.png", ImageSource.CompiledResource);
                ImageTrancform.ErrorPlaceholder("no_profile_image.png", ImageSource.CompiledResource);
                ImageTrancform.TransformPlaceholders(true);
                ImageTrancform.Transform(new CircleTransformation(5, "#ffffff"));

                ImageTrancform.Into(holder.ImageAvatar);
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
            }
        }
Exemple #2
0
 // Create new views (invoked by the layout manager)
 public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
 {
     try
     {
         //Setup your layout here >> Invite_Friends_view
         var itemView = LayoutInflater.From(parent.Context)
                        .Inflate(Resource.Layout.Invite_Friends_view, parent, false);
         var vh = new InviteFriends_AdapterViewHolder(itemView, OnClick, OnLongClick);
         return(vh);
     }
     catch (Exception exception)
     {
         Crashes.TrackError(exception);
         return(null);
     }
 }