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 holders = new MessageHolders() .RegisterContentType( (sbyte)CONTENT_TYPE_VOICE, Class.FromType(typeof(IncomingVoiceMessageViewHolder)), Resource.Layout.item_custom_incoming_voice_message, Class.FromType(typeof(OutcomingVoiceMessageViewHolder)), Resource.Layout.item_custom_outcoming_voice_message, this); messagesAdapter = new MessagesListAdapter(base.senderId, holders, base.imageLoader); base.messagesAdapter.EnableSelectionMode(this); base.messagesAdapter.SetLoadMoreListener(this); 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); }