I am fetching a lot of thumbnails in my application from a remote server and lazy loading these in a list View. The image fetches run in a background AsynTask and when completed the fetched images are stored in a HashMap using SoftReferences. This works just fine but when the images in the cache gets GC'd the fetches have to be rerun.
I...
I have a GridView, in my activity, that displays about 30 thumbnails fetched from a remote server. I am doing 2-level caching for the images:
there is an in-memory cache(HashMap using softReferences)
Secondly, all the images fetched are written to Sdcard(so as to avoid refetches when in-memory bitmaps are GC'd).
From the getView of...
Does the 'instanceof' keyword bear with it a relatively heavier impact on the Android platform (and more speciffically the mobile phones running the Dalvik VM)?
Thank you.
...
Is someArray[index] a faster way to get to a value than someObject.field?
E.G.:
if(intArray[i] == 42) {//do stuff}
VS
if(someObject.x == 42) {//do stuff}
I will try to test it soon and post the results; just wondering if you all had any thoughts.
...
I want to check my program code for time consuming operations. I thought DDMS is the best tool to achieve that.
However, I cant see Threads, Heaps and so on. It tells my to select a client. But I dont know where other than the Devices Tab, which doesnt take effect.
What do I have to do? Is there maybe smth wrong with my ADB setup (But ...
Example:
That code is run each time, when the listAdapter requests a new row:
if (textViewTitle != null)
textViewTitle.setTypeface(Controller.getInstance().widgetSettings.getBoldTypeface());
vs.
if (textViewTitle != null
&& textViewTitle.getTypeface() != null
&& textViewTitle.getTypeface().equals(Controller.getIns...