It's also not very good to keep view references in the application because
of their different lifetimes.

A view is basically only good for as long as its Activity. The application
object lives as long as the process, that is, much longer.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
27.12.2010 1:18 пользователь "jotobjects" <[email protected]> написал:
>
>
> On Dec 21, 2:30 pm, Tobiah <[email protected]> wrote:
>> Can one Activity manipulate the Views of another?
>> Even with a class that is external to the Activity,
>> it seems that I need to pass a pointer to the View
>> in question around.  I have a subclass of Application
>> that I could use to keep the View pointers in.  Will
>> that work?  Does it sound necessary?
>
> The other suggestions given in this post are better than your original
> concept for several reasons. For one thing a View is a heavy weight
> object for keeping in memory just to accomplish inter-Activity
> communication. In general you want to update the Model, not the
> View. When the Activity is re-started again it can update the View.
> For another thing, depending on the launchMode, you might have more
> than one instance of the this Activity (and thus its View).
>
>>
>> Thanks,
>>
>> Tobiah
>
> --
> 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]<android-developers%[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