3

Hypothetical question: Let's say I want to decode a Bitmap from file/stream/anything using BitmapFactory. Is it possible to get the decoding progress (as integer)? I want to put the progress in a ProgressBar. Or is it even possible but not using BitmapFactory?

Thanks!

1 Answers1

1

Lets say for using BitmapFactory's method which android provides You can't. Because it calls some native functions to decode images.

And if you want to go into deep, Just go through the code of android.graphics.BitmapFactory and android.graphics.BitmapFactory_Delegate class and look at how they implemented the code of decoding image and implement same in your case then you can do it after modified some code. (I don't know how much it helps).

user370305
  • 108,599
  • 23
  • 164
  • 151