0
A
回答
0
做这样
ParseQuery<ParseObject> queryPhoto = ParseQuery.getQuery("photo");
queryPhoto.whereEqualTo("trade_id",trade_id);
queryPhoto.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> listPhoto, ParseException e) {
// TODO Auto-generated method stub
if(e == null){
for (ParseObject photo : listPhoto){
ParseFile parseFile = (ParseFile)photo.get("imageFile");
final String imageName =photo.getString("imageName");
if (parseFile != null) {
parseFile.getDataInBackground(new GetDataCallback() {
@Override
public void done(byte[] data, ParseException e) {
// TODO Auto-generated method stub
if (data != null && e == null) {
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0,data.length);
if(imageName.equals("image1"))
imageVIew1.setImageBitmap(bitmap);
else if(imageName.equals("image2"))
imageVIew2.setImageBitmap(bitmap);
else if(imageName.equals("image3"))
imageVIew3.setImageBitmap(bitmap);
else if(imageName.equals("image4"))
imageVIew4.setImageBitmap(bitmap); }
}
});
}
}
}
}
});
0
@kishore jethava is also right but you can also get url from parse then load that url into imageview with the help of any library like Glide or Picassio or even you can download the image manually from the provided url.
ParseQuery<ParseObject> queryPhoto = ParseQuery.getQuery("photo");
queryPhoto.whereEqualTo("trade_id",trade_id);
queryPhoto.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> listPhoto, ParseException e) {
// TODO Auto-generated method stub
if(e == null){
for (ParseObject photo : listPhoto){
ParseFile parseFile = photo.getParseFile("imageFile");
if(parseFile!=null)
{
final String imageULr=parseFile.getUrl();
Glide.with(context).load(imageULr).into(imageView);
}
}
}
}
}
});
+0
我应该怎么做,如果我有4图像,我想将它设置为4 imageview? –
+0
它只加载一个图像@@我有4图像相同trade_id @@ –
相关问题
- 1. 解析 - 将图像加载到GridView中
- 2. 如何将图像从解析到UIImage加载到UITableViewCell Swift中
- 3. 将图像从解析图像加载到图像视图
- 4. 解析PFQueryTableViewConntroller不加载图像
- 5. PFQueryTableViewController解析。不加载图像
- 6. 从解析下载图像
- 7. 从解析下载图像
- 8. 将图像从解析加载到图像视图
- 9. 在UITableVIew加载之前从解析中检索图像?
- 10. 如何从JSON解析得到的URL中将图像加载到imageview中?
- 11. 如何在FULL图像加载时进行图像加载? jquery
- 12. 如何在加载大图像时显示加载图像?
- 13. 如何在d3中加载图表后隐藏加载图像?
- 14. 如何在Codeigniter中加载图像?
- 15. 如何在javafx中加载图像
- 16. 如何在Android中加载图像?
- 17. 如何在ios中预加载图像
- 18. 如何在J2ME中加载图像?
- 19. 如何在libGDX中加载图像?
- 20. 如何在android webview中加载图像?
- 21. 如何在apex.execute中加载图像
- 22. 如何在textview中加载图像?
- 23. 如何在opengl中加载图像
- 24. 如何在JPanel中加载图像?
- 25. 如何在PHP中加载图像
- 26. 如何在PhotoView中加载URL图像
- 27. 如何在android中加载图像
- 28. 如何在Java中加载大图像
- 29. 如何在飞镖中加载图像
- 30. 如何在Java中加载DICOM图像?
,但我有4 ImageView的,你的代码只加1的ImageView :( –
你可以imageName –
检查,我想将它保存到位 –