當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。