I have problem with my widget related to performance and memory:
Issue:
My widget has a very complex, nested layout (Bitmap, layout …), so to avoid inflating each time update, I plan to use SoftReference to hold the reference object of RemoteViews for the next update.
Question:
So, I’m concerned about Performance(battery-usage) vs Memory in this scenario
Does anyone have experience with this situation?
I’d appreciate any advice that can be provided.
Thanks for your help.
P.S. I’ve also read the following, but it did not provide enough information: Performance RemoteViews in Android
That won’t be any more efficient than inflating from a layout resource.
Just optimize your stuff. See for example http://developer.android.com/training/improving-layouts/optimizing-layout.html and many other online resources.