フラグメントを使用した viewPager アクティビティがあります。asyncTask を開始して 6 つのサムネイルに関する情報をダウンロードし、postExecute で情報とビットマップ オブジェクト null を使用して画像クラスの 6 つのオブジェクトを作成します。オブジェクトが作成されると、画像がダウンロードされます。コンストラクタ:
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();
}
フラグメントには、6 つのサムネイルを含む gridView があります。デフォルトの画像をそれまたはprogressDialogに設定できますが、画像をダウンロードした後に変更するにはどうすればよいですか? リスナーをセットアップしますか? PSアダプタについてはよくわかりませんが、問題があるかもしれません。