I’ve got activity that has to do many things before it is visible. In proccess of loading view I have to load up bitmap/drawable that consume some time and prevents from other actions that could be done in that time. So i decide to move it to another thread. I’ve used Async Task, but this is not solid way of loading things. There are situations where task starts 1-2 sec after my view is shown! Is there anothe way to load bitmap/drawable that will not consume so much time and will allow to assign it to ImageView?
Share
It is likely that you are still blocking your UI thread before executing the task. Use a logger to verify when your task is being executed.
If the task does take up a lot of time to execute then the bitmaps you are loading may be too large, in which case you should look at the down-sampling the images you are loading using the
inSampleSizeoption withBitmapFactory.