1

I'm using fresco library to load images from web.Also fresco supports show loading bar to give user info how much downloaded is image.But default position of progress bar is bottom and i wanna move it to top.How can i do that?

I read somewhere i should create a class and extend it from frescoProgressBar but im newbie i couldnt do it my self can you give me an example

My image loading method:

public void loadimage(String url, SimpleDraweeView imageview){
    Uri uri=Uri.parse(url);
    ImageRequest request = ImageRequestBuilder.newBuilderWithSource(uri)
            .setProgressiveRenderingEnabled(true)
            .build();
    DraweeController controller = Fresco.newDraweeControllerBuilder()

            .setAutoPlayAnimations(true)
            .setImageRequest(request)
            .setOldController(imageview.getController())
            .build();
    imageview.setController(controller);
    imageview.getHierarchy().setProgressBarImage(new ProgressBarDrawable());


}
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
uzaysan
  • 583
  • 1
  • 4
  • 18

1 Answers1

0

You can use GenericDraweeHierarchy this class allows you to create your own drawable as progress and you can set the desired position.

I found this link but not sure this can help you or not.

https://github.com/facebook/fresco/issues/452