示例#1
0
 // Create new views (invoked by the layout manager)
 public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
 {
     try
     {
         //Setup your layout here >> BlockedUsers_view
         View itemView = LayoutInflater.From(parent.Context)
                         .Inflate(Resource.Layout.BlockedUsers_view, parent, false);
         var vh = new BlockedUsers_AdapterViewHolder(itemView, OnClick, OnLongClick);
         return(vh);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         return(null);
     }
 }
示例#2
0
        public void Initialize(BlockedUsers_AdapterViewHolder holder, GetBlockedUsersObject.BlockedUsers users)
        {
            try
            {
                ImageCacheLoader.LoadImage(users.avatar, holder.ImageAvatar, false, true);


                string name = IMethods.Fun_String.DecodeString(users.name);
                holder.Txt_Username.Text = name;

                string lastSeen = Activity_Context.GetText(Resource.String.Lbl_Last_seen);
                var    time     = IMethods.ITime.TimeAgo(int.Parse(users.lastseen_unix_time));
                holder.Txt_Lastseen.Text = lastSeen + " " + time;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }