ParseFile imageFile = (ParseFile)object.get("image");
imageFile.getDataInBackground(new GetDataCallback() {
public void done(byte[] data, ParseException e) {
if (e == null) {
// data has the bytes for the image
Bitmap decodedByte = BitmapFactory.decodeByteArray(data, 0, data.length);
image.setImageBitmap(decodedByte);
} else {
// something went wrong
}
}
});
参考链接:
http://stackoverflow.com/questions/14503689/get-file-from-parseobject
http://stackoverflow.com/questions/19660170/how-to-display-image-in-imageview-from-byte-bitmapfactory-decodebytearray-ret