The issue is causing the app to screen freeze a bit.
I am using loaders to populate the listView which contains imageView and textView.
When the loaders parse the JSON and extract the image URL to object aswell as the title, populating the listView begins.
I did a little of searching inside the code what might cause the problems of skipping frames and i figured out when i populate pictures to listView the lagg comes.
So i'll be posting the code which I use to present pictures to app and if someone can tell me if it can be better and why actually my code is bad?
ImageView album = (ImageView) listItemView.findViewById(R.id.albumID);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
try {
Bitmap bitmap = BitmapFactory.decodeStream((InputStream) new URL(currentSong.getImage_url()).getContent());
album.setImageBitmap(bitmap);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}