I need to implement a circular progress bar to be displayed and updated while Fresco downloads the image. The class must extend from Drawable as required by Fresco's method setProgressBarImage().
My class is using Fresco to load the image like the snippet below:
SimpleDraweeView simpleDraweeView = (SimpleDraweeView) view.findViewById(R.id.image);
simpleDraweeView.getHierarchy().setProgressBarImage(new ProgressBarDrawable());
simpleDraweeView.setImageURI(message.getMessageImage().getImageFileUriForList());
And the XML for the 'image' SimpleDraweeView is as follows:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/image"
android:layout_width="192dp"
android:layout_height="200dp"
android:layout_margin="7dp"
android:layout_gravity="center"
fresco:actualImageScaleType="fitCenter"
tools:background="@drawable/gallery_attach_dialog" />
The problem is that I need to replace this standard horizontal progressbar by a circular one. And Fresco doesn't provide a circular progress bar drawable.
Do anyone has an implementation idea for this?