0
有誰知道如何在RemoteViews中爲Widgets實現動態ListAdapter?甚至有可能嗎?如何在Android Widget的RemoteViews中添加ListAdapter
private static final String[] lists={"abc", "def", "ghi",
"jkl", "mno", "pqr",
"stu", "vwx", "xyz"};
@Override
public RemoteViews getViewAt(int position) {
RemoteViews row=new RemoteViews(ctxt.getPackageName(), R.layout.row);
row.setTextViewText(android.R.id.text1, lists[position]);
Intent i=new Intent();
Bundle extras=new Bundle();
extras.putString(WidgetProvider.EXTRA_WORD, lists[position]);
i.putExtras(extras);
row.setOnClickFillInIntent(android.R.id.text1, i);
return(row);
}