2013-07-05 46 views
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); 

} 

回答

0

...是的,我們可以!見allowed classes。但我現在不怎麼樣。我也對代碼snipplet感興趣。

相關問題