0
我有一個viewPager活動與片段。它啓動asyncTask來下載關於六個縮略圖的信息,並在postExecute上創建我的圖像類的六個對象,其中包含信息和位圖對象null。當對象被創建時,它下載圖像。構造函數:動態更改ImageView中的圖像
public MyImage(String name, String owner, String time, String date,
String total_rate, String votes, String description) {
//this.thumbnail = BitmapFactory.
Log.d(TAG, "Created image object");
this.name = name;
this.owner = owner;
this.time = time;
this.date = date;
this.total_rate = Double.valueOf(total_rate);
this.votes = votes;
this.description = description;
downloadThumbnail();
}
該片段有一個gridView,其中有六個縮略圖。我可以爲其設置默認圖像或progressDialog,但在下載圖像後如何更改它?設置一個監聽器?附:我對適配器瞭解不多,可能存在問題。