I try to create a widget on Android, showing a dynamically generated image, bigger than the widget.
This can be done with a ListView, and the adapter is a RemoteViewsService where I build my bitmap. Then I create a RemoteViews, and I call setImageViewBitmap with my bitmap. It's working, the widget displays well my image width a vertical scroll (what I want !).
Widget => ListView => setRemoteAdapter(RemoteViewsService) => getViewAt() => RemoteViews => create a view and retrieve bitmap => setImageViewBitmap
When the widget is resized, I redraw the bitmap and do the job again (Image depends on widget size). And I see memory growing each time up to out of memory...
Thanks for your help.
Maybe it could be useful for someone.
Before :
Create view and retrieve the bitmap
Solution :
Create directly the Bitmap. setImageViewBitmap works without loosing memory :-)