サーバーから画像を表示したいとします。
Android で行う予定の一般的なタスクは何ですか??
遅延読み込みを使用して、サーバーから画像を表示できます。https://github.com/thest1/LazyList . キャッシュを使用します。
Universal Image Loader を試すこともできます。https://github.com/nostra13/Android-Universal-Image-Loader . 画像を非同期に読み込みます。画像を SD カードにキャッシュします。
サーバーから画像を取得するには、AsyncTask を使用できます。http://developer.android.com/reference/android/os/AsyncTask.html。長時間実行する操作が必要な場合は、asynctask を使用しないでください。
バックグラウンド操作を長時間実行するには、サービスを使用します。http://developer.android.com/guide/components/services.html。
Robospice と呼ばれる AsyncTask の代替手段があります。https://github.com/octo-online/robospice .
あなたの場合、Universal Image Loader を使用してサーバーから画像を表示できます。
http リクエストを作成するには、Apache HTTP を使用できます。http://hc.apache.org/downloads.cgi。jar をダウンロードしてプロジェクトに追加します。
http://www.edumobile.org/android/android-beginner-tutorials/downloading-an-image-from-the-server-and-displaying-it-on-screen . http get リクエストを使用してサーバーから画像をダウンロードする例