我具有其中我然后图像和4个选项(A,B,C,d)如何使用通用图像加载器
我使用通用图像加载器显示文本列表中显示图像下载前一动画进展以处理图像,我的要求是我必须显示一个小的动画进度条在图像的下载后将出现的确切大小的地方,
可以任何身体,请告诉我如何做到这一点,我挣扎有了这个。慢慢学习android UI。请帮我
下面参考
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:textColor="#d9000000"
android:textSize="20sp"
android:textStyle="bold"
/>
<TextView
android:id="@+id/body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:lineSpacingMultiplier="1.4"
android:maxLines="4"
android:textColor="#d9000000"
android:textSize="16sp"
/>
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
/>
</LinearLayout>
的代码,并在列表适配器使用下面的代码上传图像
mDisplayImageOptions = new DisplayImageOptions.Builder()
.cacheInMemory(true)
.cacheOnDisk(true)
.build();
mImageLoader.displayImage(url, mImageView, mDisplayImageOptions);
我已经检查下面的链接,但没有工作
Show indeterminate ProgressBar while loading image with Universal Image Loader
我使用回调和它没有显示,有一种已经downvoted,废话计算器正在慢慢变得废话,因为很少有人喜欢downvote – Naga