EaseChatRowImage这个类中:protected void onSetUpView() {
imgBody = (EMImageMessageBody) message.getBody();
// 接收方向的消息
if (message.direct() == EMMessage.Direct.RECEIVE) {
if (imgBody.thumbnailDownloadStatus() == EMFileMessageBody.EMDownloadStatus.DOWNLOADING ||
imgBody.thumbnailDownloadStatus() == EMFileMessageBody.EMDownloadStatus.PENDING) {
imageView.setImageResource(R.drawable.ease_default_image);
setMessageReceiveCallback();
} else {
progressBar.setVisibility(View.GONE);
percentageView.setVisibility(View.GONE);
imageView.setImageResource(R.drawable.ease_default_image);
String thumbPath = imgBody.thumbnailLocalPath();
if (!new File(thumbPath).exists()) {
// 兼容旧版SDK收到的thumbnail
thumbPath = EaseImageUtils.getThumbnailImagePath(imgBody.getLocalUrl());
}
showImageView(thumbPath, imageView, imgBody.getLocalUrl(), message);
}
return;
}
String filePath = imgBody.getLocalUrl();
String thumbPath = EaseImageUtils.getThumbnailImagePath(imgBody.getLocalUrl());
showImageView(thumbPath, imageView, filePath, message);
handleSendMessage();
}