本文整理汇总了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);
}
}
示例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;
}
示例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;
}
}
}
示例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();
}