コード例 #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.chat_message_item, parent, false);
            ChatListViewHolder viewHolder = new ChatListViewHolder(itemView);

            return(viewHolder);
        }
コード例 #2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            string             messageToSet = chatMessages[position];
            ChatListViewHolder holderCastedAsMineViewHolder = (ChatListViewHolder)holder;

            holderCastedAsMineViewHolder.MessageTextView.Text = messageToSet;
        }