当前位置: 首页>>代码示例>>Java>>正文


Java RecallNotificationMessage类代码示例

本文整理汇总了Java中io.rong.message.RecallNotificationMessage的典型用法代码示例。如果您正苦于以下问题:Java RecallNotificationMessage类的具体用法?Java RecallNotificationMessage怎么用?Java RecallNotificationMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RecallNotificationMessage类属于io.rong.message包,在下文中一共展示了RecallNotificationMessage类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: convert

import io.rong.message.RecallNotificationMessage; //导入依赖的package包/类
@Override
public void convert(LQRViewHolderForRecyclerView helper, Message item, int position) {
    setTime(helper, item, position);
    setView(helper, item, position);
    if (!(item.getContent() instanceof GroupNotificationMessage) && !(item.getContent() instanceof RecallNotificationMessage) && (getItemViewType(position) != UNDEFINE_MSG)) {
        setAvatar(helper, item, position);
        setName(helper, item, position);
        setStatus(helper, item, position);
        setOnClick(helper, item, position);
    }
}
 
开发者ID:starryxp,项目名称:LQRWeChat-master,代码行数:12,代码来源:SessionAdapter.java

示例2: getItemViewType

import io.rong.message.RecallNotificationMessage; //导入依赖的package包/类
@Override
public int getItemViewType(int position) {
    Message msg = mData.get(position);
    boolean isSend = msg.getMessageDirection() == Message.MessageDirection.SEND ? true : false;

    MessageContent msgContent = msg.getContent();
    if (msgContent instanceof TextMessage) {
        return isSend ? SEND_TEXT : RECEIVE_TEXT;
    }
    if (msgContent instanceof ImageMessage) {
        return isSend ? SEND_IMAGE : RECEIVE_IMAGE;
    }
    if (msgContent instanceof FileMessage) {
        FileMessage fileMessage = (FileMessage) msgContent;
        if (MediaFileUtils.isImageFileType(fileMessage.getName())) {
            return isSend ? SEND_STICKER : RECEIVE_STICKER;
        } else if (MediaFileUtils.isVideoFileType(fileMessage.getName())) {
            return isSend ? SEND_VIDEO : RECEIVE_VIDEO;
        }
    }
    if (msgContent instanceof LocationMessage) {
        return isSend ? SEND_LOCATION : RECEIVE_LOCATION;
    }
    if (msgContent instanceof GroupNotificationMessage) {
        return RECEIVE_NOTIFICATION;
    }
    if (msgContent instanceof VoiceMessage) {
        return isSend ? SEND_VOICE : RECEIVE_VOICE;
    }
    if (msgContent instanceof RedPacketMessage) {
        return isSend ? SEND_RED_PACKET : RECEIVE_RED_PACKET;
    }
    if (msgContent instanceof RecallNotificationMessage) {
        return RECALL_NOTIFICATION;
    }
    return UNDEFINE_MSG;
}
 
开发者ID:starryxp,项目名称:LQRWeChat-master,代码行数:38,代码来源:SessionAdapter.java

示例3: recallMessageFromListener

import io.rong.message.RecallNotificationMessage; //导入依赖的package包/类
public void recallMessageFromListener(int messageId, RecallNotificationMessage recallNotificationMessage) {
    for (int i = 0; i < mData.size(); i++) {
        Message message = mData.get(i);
        if (message.getMessageId() == messageId) {
            recallMessageAndInsertMessage(recallNotificationMessage, i);
            break;
        }
    }
}
 
开发者ID:starryxp,项目名称:LQRWeChat-master,代码行数:10,代码来源:SessionAtPresenter.java

示例4: recallMessageAndInsertMessage

import io.rong.message.RecallNotificationMessage; //导入依赖的package包/类
private void recallMessageAndInsertMessage(RecallNotificationMessage recallNotificationMessage, int position) {
    RongIMClient.getInstance().insertMessage(mConversationType, mSessionId, UserCache.getId(), recallNotificationMessage);
    mData.remove(position);
    mData.add(Message.obtain(mSessionId, mConversationType, recallNotificationMessage));
    mAdapter.notifyDataSetChangedWrapper();
}
 
开发者ID:starryxp,项目名称:LQRWeChat-master,代码行数:7,代码来源:SessionAtPresenter.java


注:本文中的io.rong.message.RecallNotificationMessage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。