hi,
   Have you try to create a singleton model for ArrayAdapter? All your 
ArrayAdapters in different activities can share the same model.  
Kai,

On Jan 11, 2012, at 4:19 PM, galapogos wrote:

> Hi,
> 
> How can I use an ArrayAdapter from another activity? I tried doing the
> following in MyListActivity.onCreate():
> setListAdapter(SomeOtherActivity.myAdapter);
> where myAdapter is defined and initialized in SomeOtherActivity.
> However, I get an empty list, even though I verified that
> SomeOtherActivity.myAdapter is fully populated via a call to
> SomeOtherActivity.myAdapter.getCount();
> 
> If I define and initialize my own adapter in MyListActivity with
> setListAdapter(myLocalAdapter), it works. Once I switch it to
> setListAdapter(SomeOtherActivity.myAdapter), I get an empty list.
> 
> Help please? Thanks.
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to