Search code examples
android-studiooptimizationandroid-recyclerviewimage-scaling

Images slowing down application


In my application i have sqlite database which stores paths to images which are later displayed as items in recyclerview in different tabs in tablayout. For example in tab vegetables there are images of vegetables ect. This images slow down application strongly, tabs are loading 5-10 seconds sometimes crashing. I've tried changing images to nodpi, it helped a little bit but not much. If I'm using vector images it works perfectly. What can i do ?


Solution

  • So problem in my case was using unformated images via function image.background = I've changed it to image.setImageUri and let android studio do mipmaps of my images.