Relative Content

Tag Archive for javaandroidmultithreadingasynchronousbitmap

How to decode bitmaps Asynchronously in java?

In my app, I am trying to decode bitmaps Asynchronously, therefore I am using CompletableFuture.runAsync(() -> {}); method to run it Asynchronously, but it seems bitmap decoding is still not running Asynchronously because I am having a lagging in my UIs every time I run my app (I am running spinKitLayout to indicate the user, process is still going on, but spinKitLayout is the one which is lagging in my main thread), I don’t understand why it is still having a lag although I am running it Asynchronously. I am still a newbie to Asynchronous programming, Can anyone point me out where the problem is in my code and what can be the possible solution to this?