I go through the following android documentation: "App Widgets with Collections" to create a widget that shows a list of text. Everything works fine and it works just
I am used this way and work well.
Change textview to imageview in row.xml
public WidgetDisplay(Context ctxt, Intent intent)
{
this.ctxt=ctxt;
appWidgetId=intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
setImageinView(this.ctxt);
}
private void setImageinView(Context context) {
//read sd card and store bitmap in arrayListBitmap;
}
@Override
public RemoteViews getViewAt(int position) {
remoteView = new RemoteViews(ctxt.getPackageName(), R.layout.row);
remoteView.setImageViewBitmap(R.id.image_photo1,arrayListBitmap.get(i));
}
simple you have to read sd card store data in to arraylist.
set size to getCount().
now set image in your imageview.
If any query then welcome.