当前位置: 首页>>代码示例>>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;未经允许,请勿转载。