Search in sources :

Example 1 with EaseChatRowPresenter

use of com.hyphenate.easeui.widget.presenter.EaseChatRowPresenter in project SmartCampus by Vegen.

the class EaseMessageAdapter method getView.

@SuppressLint("NewApi")
public View getView(final int position, View convertView, ViewGroup parent) {
    EMMessage message = getItem(position);
    EaseChatRowPresenter presenter = null;
    if (convertView == null) {
        presenter = createChatRowPresenter(message, position);
        convertView = presenter.createChatRow(context, message, position, this);
        convertView.setTag(presenter);
    } else {
        presenter = (EaseChatRowPresenter) convertView.getTag();
    }
    presenter.setup(message, position, itemClickListener, itemStyle);
    return convertView;
}
Also used : EaseChatRowPresenter(com.hyphenate.easeui.widget.presenter.EaseChatRowPresenter) EMMessage(com.hyphenate.chat.EMMessage) SuppressLint(android.annotation.SuppressLint)

Aggregations

SuppressLint (android.annotation.SuppressLint)1 EMMessage (com.hyphenate.chat.EMMessage)1 EaseChatRowPresenter (com.hyphenate.easeui.widget.presenter.EaseChatRowPresenter)1