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


Java AttachStatusEnum.fail方法代碼示例

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


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

示例1: refreshStatus

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
private void refreshStatus() {
    FileAttachment attachment = (FileAttachment) message.getAttachment();
    if (TextUtils.isEmpty(attachment.getPath()) && TextUtils.isEmpty(attachment.getThumbPath())) {
        if (message.getAttachStatus() == AttachStatusEnum.fail || message.getStatus() == MsgStatusEnum.fail) {
            alertButton.setVisibility(View.VISIBLE);
        } else {
            alertButton.setVisibility(View.GONE);
        }
    }

    if (message.getStatus() == MsgStatusEnum.sending
            || (isReceivedMessage() && message.getAttachStatus() == AttachStatusEnum.transferring)) {
        progressCover.setVisibility(View.VISIBLE);
        progressBar.setVisibility(View.VISIBLE);
        progressLabel.setVisibility(View.VISIBLE);
        progressLabel.setText(StringUtil.getPercentString(getMsgAdapter().getProgress(message)));
    } else {
        progressCover.setVisibility(View.GONE);
        progressBar.setVisibility(View.GONE);
        progressLabel.setVisibility(View.GONE);
    }
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:23,代碼來源:MsgViewHolderThumbBase.java

示例2: refreshStatus

import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum; //導入方法依賴的package包/類
private void refreshStatus() {
    FileAttachment attachment = (FileAttachment) message.getAttachment();
    if (TextUtils.isEmpty(attachment.getPath()) && TextUtils.isEmpty(attachment.getThumbPath())) {
        if (message.getAttachStatus() == AttachStatusEnum.fail || message.getStatus() == MsgStatusEnum.fail) {
            alertButton.setVisibility(View.VISIBLE);
        } else {
            alertButton.setVisibility(View.GONE);
        }
    }

    if (message.getStatus() == MsgStatusEnum.sending || message.getAttachStatus() == AttachStatusEnum.transferring) {
        progressCover.setVisibility(View.VISIBLE);
        progressBar.setVisibility(View.VISIBLE);
    } else {
        progressCover.setVisibility(View.GONE);
    }
    progressLabel.setText(StringUtil.getPercentString(getAdapter().getProgress(message)));
}
 
開發者ID:LegendKe,項目名稱:MyTravelingDiary,代碼行數:19,代碼來源:MsgViewHolderThumbBase.java

示例3: 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

示例4: 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

示例5: 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

示例6: onEvent

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

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

示例7: 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

示例8: 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:LegendKe,項目名稱:MyTravelingDiary,代碼行數:29,代碼來源:MsgViewHolderAudio.java

示例9: 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 (!NimUIKitImpl.getOptions().disableAudioPlayedStatusIcon
            && isReceivedMessage()
            && attachStatus == AttachStatusEnum.transferred
            && status != MsgStatusEnum.read) {
        unreadIndicator.setVisibility(View.VISIBLE);
    } else {
        unreadIndicator.setVisibility(View.GONE);
    }
}
 
開發者ID:netease-im,項目名稱:NIM_Android_UIKit,代碼行數:32,代碼來源:MsgViewHolderAudio.java


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