I need to implement a circular progress bar that will be displayed and updated, and Fresco loads the image. The class should extend from Drawable, as required by the Fresco setProgressBarImage () method.
My class uses Fresco to load an image, as shown 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 progress panel with a circular one. And Fresco does not provide a circular progress bar.
Anyone have an implementation idea for this?
source
share