2
我想從解析到ImageView的文件。我試圖通過「getDataInBackgound」得到但是當我調用這個方法'UI被卡住了,我得到最後一張圖片。獲取Parsefile到ImageView
ParseFile image = tableParseObjects.getParseFile(PARSE_IMAGES);
image.getDataInBackground(new GetDataCallback() {
@Override
public void done(byte[] data, ParseException e) {
Bitmap bitpic = BitmapFactory.decodeByteArray(data, 0, data.length);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitpic.compress(Bitmap.CompressFormat.PNG, 100, stream);
vectorSample.setPic(bitpic);
}
});