以下は私のレイアウトです:
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ProgressBar
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</FrameLayout>
URLリンクを指定して画像をダウンロードし、その画像をに表示しようとしていImageView
ます。イメージの準備が整う前に、 に がProgressBar
表示されますImageView
。これまでのところ、私のコードは画像をダウンロードして に表示できますImageView
。ダウンロードに時間がかかるため、画像が表示されるまでに明らかな遅延があります。誰か私にいくつかの提案をしてもらえますか? 私はアンドロイドが初めてで、これは宿題ではありません。