Skip to content

How to set a progressloader for Images in ListView #48

Open
@protocol10

Description

@protocol10

I am trying to load images using URL in Listview and I am able to show a progressbar widget while loading the images.

But the problem is, the image is not displayed for the first list item even if it gets loaded in Background. i.e onCompletionListener for that item gets executed properly, but the images is not displayed.

If I scroll the list down and comeback upwards the image is displayed.

Is there any other way to show progress while loading Images in ListView or any general view.

This is my layout

    <com.loopj.android.image.SmartImageView
        android:id="@+id/img_view
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:adjustViewBounds="true"
        android:contentDescription="@string/description_img"
        android:scaleType="centerCrop"
        android:src="@drawable/room"
        android:visibility="invisible" />

    <ProgressBar
        android:id="@+id/img_loader"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center" />
</FrameLayout>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions