Esempio n. 1
0
 private void InitAdapter()
 {
     base.messagesAdapter = new MessagesListAdapter(base.senderId, base.imageLoader);
     base.messagesAdapter.EnableSelectionMode(this);
     base.messagesAdapter.SetLoadMoreListener(this);
     base.messagesAdapter.SetDateHeadersFormatter(this);
     messagesList.SetAdapter(base.messagesAdapter);
 }
        private void InitAdapter()
        {
            MessageHolders holdersConfig = new MessageHolders()
                                           .SetIncomingTextLayout(Resource.Layout.item_custom_incoming_text_message)
                                           .SetOutcomingTextLayout(Resource.Layout.item_custom_outcoming_text_message)
                                           .SetIncomingImageLayout(Resource.Layout.item_custom_incoming_image_message)
                                           .SetOutcomingImageLayout(Resource.Layout.item_custom_outcoming_image_message);

            base.messagesAdapter = new MessagesListAdapter(base.senderId, holdersConfig, base.imageLoader);
            base.messagesAdapter.SetOnMessageLongClickListener(this);
            base.messagesAdapter.SetOnMessageClickListener(this);
            base.messagesAdapter.SetLoadMoreListener(this);
            messagesList.SetAdapter(base.messagesAdapter);
        }
        private void InitAdapter()
        {
            MessageHolders holdersConfig = new MessageHolders()
                                           .SetIncomingTextConfig(
                Class.FromType(typeof(CustomIncomingTextMessageViewHolder)),
                Resource.Layout.item_custom_incoming_text_message)
                                           .SetOutcomingTextConfig(
                Class.FromType(typeof(CustomOutcomingTextMessageViewHolder)),
                Resource.Layout.item_custom_outcoming_text_message)
                                           .SetIncomingImageConfig(
                Class.FromType(typeof(CustomIncomingImageMessageViewHolder)),
                Resource.Layout.item_custom_incoming_image_message)
                                           .SetOutcomingImageConfig(
                Class.FromType(typeof(CustomOutcomingImageMessageViewHolder)),
                Resource.Layout.item_custom_outcoming_image_message);

            base.messagesAdapter = new MessagesListAdapter(base.senderId, holdersConfig, base.imageLoader);
            base.messagesAdapter.SetOnMessageLongClickListener(this);
            base.messagesAdapter.SetLoadMoreListener(this);
            messagesList.SetAdapter(base.messagesAdapter);
        }