本文整理汇总了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);
}
});
}
示例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();
}
示例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);
}
}
示例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();
}
示例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);
}
}
示例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();
}
示例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);
}
}
示例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;
}
示例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;
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
示例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;
}
示例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();
}
}
示例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;
}