I have a list in which I am displaying text then image and 4 options (A, B ,C , D)
I am using Universal Image loader to handle images, My requirement is I have to display an small animated progress bar on the place of exact size of image which is going to appear after download,
Can Any body please suggest me how to achieve this, I am struggling with this. Learning android UI slowly. Please help me
below is the code for reference
<?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>
and Using below code in list adapter to upload image
mDisplayImageOptions = new DisplayImageOptions.Builder()
.cacheInMemory(true)
.cacheOnDisk(true)
.build();
mImageLoader.displayImage(url, mImageView, mDisplayImageOptions);
I have checked below links but did not work
Show indeterminate ProgressBar while loading image with Universal Image Loader