當前位置: 首頁>>代碼示例>>Java>>正文


Java AttachStatusEnum.transferred方法代碼示例

本文整理匯總了Java中com.netease.nimlib.sdk.msg.constant.AttachStatusEnum.transferred方法的典型用法代碼示例。如果您正苦於以下問題:Java AttachStatusEnum.transferred方法的具體用法?Java AttachStatusEnum.transferred怎麽用?Java AttachStatusEnum.transferred使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.netease.nimlib.sdk.msg.constant.AttachStatusEnum的用法示例。


在下文中一共展示了AttachStatusEnum.transferred方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: longClickItemVoidToText

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
private void longClickItemVoidToText(final IMMessage item, CustomAlertDialog alertDialog, MsgTypeEnum msgType) {
    if (msgType != MsgTypeEnum.audio) return;

    if (item.getDirect() == MsgDirectionEnum.In
            && item.getAttachStatus() != AttachStatusEnum.transferred)
        return;
    if (item.getDirect() == MsgDirectionEnum.Out
            && item.getAttachStatus() != AttachStatusEnum.transferred)
        return;

    alertDialog.addItem(container.activity.getString(R.string.voice_to_text), new CustomAlertDialog.onSeparateItemClickListener() {

        @Override
        public void onClick() {
            onVoiceToText(item);
        }
    });
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:19,代碼來源:MessageListPanelEx.java

示例2: bindContentView

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
protected void bindContentView() {
    FileAttachment msgAttachment = (FileAttachment) message.getAttachment();
    String path = msgAttachment.getPath();
    String thumbPath = msgAttachment.getThumbPath();
    if (!TextUtils.isEmpty(thumbPath)) {
        loadThumbnailImage(thumbPath, false);
    } else if (!TextUtils.isEmpty(path)) {
        loadThumbnailImage(thumbFromSourceFile(path), true);
    } else {
        loadThumbnailImage(null, false);
        if (message.getAttachStatus() == AttachStatusEnum.transferred
                || message.getAttachStatus() == AttachStatusEnum.def) {
            downloadAttachment();
        }
    }

    refreshStatus();
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:20,代碼來源:MsgViewHolderThumbBase.java

示例3: onItemClick

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
protected void onItemClick() {
    if (audioControl != null) {
        if (message.getDirect() == MsgDirectionEnum.In && message.getAttachStatus() != AttachStatusEnum.transferred) {
            return;
        }

        if (message.getStatus() != MsgStatusEnum.read) {
            // 將未讀標識去掉,更新數據庫
            unreadIndicator.setVisibility(View.GONE);
        }

        initPlayAnim(); // 設置語音播放動畫

        audioControl.startPlayAudioDelay(CLICK_TO_PLAY_AUDIO_DELAY, message, onPlayListener);

        audioControl.setPlayNext(true, adapter, message);
    }
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:20,代碼來源:MsgViewHolderAudio.java

示例4: bindContentView

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
protected void bindContentView() {
    FileAttachment msgAttachment = (FileAttachment) message.getAttachment();
    String path = msgAttachment.getPath();
    String thumbPath = msgAttachment.getThumbPath();
    if (!TextUtils.isEmpty(thumbPath)) {
        loadThumbnailImage(thumbPath);
    } else if (!TextUtils.isEmpty(path)) {
        loadThumbnailImage(thumbFromSourceFile(path));
    } else {
        loadThumbnailImage(null);
        if (message.getAttachStatus() == AttachStatusEnum.transferred
                || message.getAttachStatus() == AttachStatusEnum.def) {
            downloadAttachment();
        }
    }

    refreshStatus();
}
 
開發者ID:LegendKe,項目名稱:MyTravelingDiary,代碼行數:20,代碼來源:MsgViewHolderThumbBase.java

示例5: onItemClick

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
protected void onItemClick() {
    if (audioControl != null) {
        if (message.getDirect() == MsgDirectionEnum.In && message.getAttachStatus() != AttachStatusEnum.transferred) {
            return;
        }

        if (message.getStatus() != MsgStatusEnum.read) {
            // 將未讀標識去掉,更新數據庫
            unreadIndicator.setVisibility(View.GONE);
        }

        audioControl.startPlayAudioDelay(CLICK_TO_PLAY_AUDIO_DELAY, message, onPlayListener);
        audioControl.setPlayNext(true, adapter, message);
    }
}
 
開發者ID:LegendKe,項目名稱:MyTravelingDiary,代碼行數:17,代碼來源:MsgViewHolderAudio.java

示例6: bindContentView

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
protected void bindContentView() {
    FileAttachment msgAttachment = (FileAttachment) message.getAttachment();
    String path = msgAttachment.getPath();
    String thumbPath = msgAttachment.getThumbPath();
    if (!TextUtils.isEmpty(thumbPath)) {
        loadThumbnailImage(thumbPath, false, msgAttachment.getExtension());
    } else if (!TextUtils.isEmpty(path)) {
        loadThumbnailImage(thumbFromSourceFile(path), true, msgAttachment.getExtension());
    } else {
        loadThumbnailImage(null, false, msgAttachment.getExtension());
        if (message.getAttachStatus() == AttachStatusEnum.transferred
                || message.getAttachStatus() == AttachStatusEnum.def) {
            downloadAttachment();
        }
    }

    refreshStatus();
}
 
開發者ID:netease-im,項目名稱:NIM_Android_UIKit,代碼行數:20,代碼來源:MsgViewHolderThumbBase.java

示例7: onItemClick

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
protected void onItemClick() {
    if (audioControl != null) {
        if (message.getDirect() == MsgDirectionEnum.In && message.getAttachStatus() != AttachStatusEnum.transferred) {
            return;
        }

        if (message.getStatus() != MsgStatusEnum.read) {
            // 將未讀標識去掉,更新數據庫
            unreadIndicator.setVisibility(View.GONE);
        }

        initPlayAnim(); // 設置語音播放動畫

        audioControl.startPlayAudioDelay(CLICK_TO_PLAY_AUDIO_DELAY, message, onPlayListener);

        audioControl.setPlayNext(!NimUIKitImpl.getOptions().disableAutoPlayNextAudio, adapter, message);
    }
}
 
開發者ID:netease-im,項目名稱:NIM_Android_UIKit,代碼行數:20,代碼來源:MsgViewHolderAudio.java

示例8: onTouch

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
public boolean onTouch(View v, MotionEvent event) {
    switch (event.getAction()) {
        case MotionEvent.ACTION_MOVE:
            v.getParent().requestDisallowInterceptTouchEvent(true);
            break;
        case MotionEvent.ACTION_UP:
        case MotionEvent.ACTION_CANCEL:
            v.getParent().requestDisallowInterceptTouchEvent(false);

            WatchSnapChatPictureActivity.destroy();

            // 刪除這條消息,當然你也可以將其標記為已讀,同時刪除附件內容,然後不讓再查看
            if (isLongClick && message.getAttachStatus() == AttachStatusEnum.transferred) {
                // 物理刪除
                NIMClient.getService(MsgService.class).deleteChattingHistory(message);
                AttachmentStore.delete(((SnapChatAttachment) message.getAttachment()).getPath());
                AttachmentStore.delete(((SnapChatAttachment) message.getAttachment()).getThumbPath());

                getMsgAdapter().deleteItem(message, true);
                isLongClick = false;
            }
            break;
    }

    return false;
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:28,代碼來源:MsgViewHolderSnapChat.java

示例9: isOriginImageHasDownloaded

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
private boolean isOriginImageHasDownloaded(final IMMessage message) {
    if (message.getAttachStatus() == AttachStatusEnum.transferred &&
            !TextUtils.isEmpty(((SnapChatAttachment) message.getAttachment()).getPath())) {
        return true;
    }

    return false;
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:9,代碼來源:WatchSnapChatPictureActivity.java

示例10: onEvent

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
public void onEvent(IMMessage msg) {
    if (!msg.isTheSame(message) || isDestroyedCompatible()) {
        return;
    }
    if (msg.getAttachStatus() == AttachStatusEnum.transferred && isOriginImageHasDownloaded(msg)) {
        onDownloadSuccess(msg);
    } else if (msg.getAttachStatus() == AttachStatusEnum.fail) {
        onDownloadFailed();
    }
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:12,代碼來源:WatchSnapChatPictureActivity.java

示例11: onEvent

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
public void onEvent(IMMessage msg) {
    if (!msg.isTheSame(message) || isDestroyedCompatible()) {
        return;
    }

    if (msg.getAttachStatus() == AttachStatusEnum.transferred && isOriginDataHasDownloaded(msg)) {
        DialogMaker.dismissProgressDialog();
        onDownloadSuccess();
    } else if (msg.getAttachStatus() == AttachStatusEnum.fail) {
        DialogMaker.dismissProgressDialog();
        Toast.makeText(FileDownloadActivity.this, "download failed", Toast.LENGTH_SHORT).show();
        onDownloadFailed();
    }
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:16,代碼來源:FileDownloadActivity.java

示例12: refreshStatus

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
private void refreshStatus() {// 消息狀態
    AudioAttachment attachment = (AudioAttachment) message.getAttachment();
    MsgStatusEnum status = message.getStatus();
    AttachStatusEnum attachStatus = message.getAttachStatus();

    // alert button
    if (TextUtils.isEmpty(attachment.getPath())) {
        if (attachStatus == AttachStatusEnum.fail || status == MsgStatusEnum.fail) {
            alertButton.setVisibility(View.VISIBLE);
        } else {
            alertButton.setVisibility(View.GONE);
        }
    }

    // progress bar indicator
    if (status == MsgStatusEnum.sending || attachStatus == AttachStatusEnum.transferring) {
        progressBar.setVisibility(View.VISIBLE);
    } else {
        progressBar.setVisibility(View.GONE);
    }

    // unread indicator
    if (isReceivedMessage() && attachStatus == AttachStatusEnum.transferred && status != MsgStatusEnum.read) {
        unreadIndicator.setVisibility(View.VISIBLE);
    } else {
        unreadIndicator.setVisibility(View.GONE);
    }
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:29,代碼來源:MsgViewHolderAudio.java

示例13: isOriginImageHasDownloaded

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
private boolean isOriginImageHasDownloaded(final IMMessage message) {
    if (message.getAttachStatus() == AttachStatusEnum.transferred &&
            !TextUtils.isEmpty(((ImageAttachment) message.getAttachment()).getPath())) {
        return true;
    }

    return false;
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:9,代碼來源:WatchMessagePictureActivity.java

示例14: onEvent

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
@Override
public void onEvent(IMMessage msg) {
    if (!msg.isTheSame(message) || isDestroyedCompatible()) {
        return;
    }

    if (msg.getAttachStatus() == AttachStatusEnum.transferred && isVideoHasDownloaded(msg)) {
        onDownloadSuccess(msg);
    } else if (msg.getAttachStatus() == AttachStatusEnum.fail) {
        onDownloadFailed();
    }
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:13,代碼來源:WatchVideoActivity.java

示例15: isVideoHasDownloaded

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
private boolean isVideoHasDownloaded(final IMMessage message) {
    if (message.getAttachStatus() == AttachStatusEnum.transferred &&
            !TextUtils.isEmpty(((VideoAttachment) message.getAttachment()).getPath())) {
        return true;
    }

    return false;
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:9,代碼來源:WatchVideoActivity.java


注:本文中的com.netease.nimlib.sdk.msg.constant.AttachStatusEnum.transferred方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。