Re: [android-developers] Observing a Singleton List from an Activity

2011-10-12 Thread TreKing
On Wed, Oct 12, 2011 at 6:09 AM, Boozel  wrote:

> Any ideas where i can find some example code of this?


Google "Observer pattern example java" ?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Observing a Singleton List from an Activity

2011-10-12 Thread Boozel
Any ideas where i can find some example code of this?

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

Re: [android-developers] Observing a Singleton List from an Activity

2011-10-11 Thread TreKing
On Tue, Oct 11, 2011 at 2:20 PM, Boozel  wrote:
>
> If So how do i get my main activity to observe my singleton list
> that extends Observable?
>

If you already extend Observable then it follows you would need an Oberver,
which in this case would be your Activity, from what you described.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Observing a Singleton List from an Activity

2011-10-11 Thread Boozel
Hi

I have two activities, a service and a singleton list. The service is 
responsible for fetching all the data via async tasks called in my main 
activity. The other activity can add items to the list but when a new item 
is added the data service needs to fetch data for it.

The task to fetch data is in my main activity because it is bound to the 
service already.

i want the main activity to observe the list so that when the other activity 
adds an item to the list it can run the async task to fetch data for that 
item.
Is this the correct way to do this?
If So how do i get my main activity to observe my singleton list 
that extends Observable?

Any help would be great.
Thanks in advance

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