Closed Logan676 closed 9 years ago
Hi, yes this is possible. Check out this page in the wiki: https://github.com/mrwonderman/android-square-progressbar/wiki/Usage. If you need some help, you can post the code here or you can send me an email (yannick@signer.pro). Cheers Yannick
Thanks for you reply. I want to show progressbar when loading icons, but the icon file type is not an primitive int type, it`s an drawable or bitmap. So how could I handle that. you can see the code segment below. Viewholder class
private class Viewholder {
TextView title, subtitle;
ImageView icon, action;
SquareProgressBar squareProgressBar;
public Viewholder(TextView title, TextView subtitle, ImageView icon, ImageView action) {
super();
this.icon = icon;
this.action = action;
this.title = title;
this.subtitle = subtitle;
}
}
the code to start show progressbar
Plz note that the viewHolder.icon
is not compatible with the setImage
method.
viewHolder.squareProgressBar.setImage(viewHolder.icon);
// viewHolder.squareProgressBar.setProgress(percent);
As you might saw, this was implemented with the 1.4.1 update. You can use setImageBitmap(Bitmap bitmap)
method on the square progressbar to set a bitmap.
I have a listview showing a list of files, when use click download all files, I want to use this progressbar to show downloading progress, is it possible for that?