本文整理匯總了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();
}