You have to be careful with statics, as they have a longer life span
than your activity.

If you store your activity or something that refer to your activity in
a static variable, and your activity is destroyed and recreated, you
may end up keeping the old activity in the memory. You should be ok,
though, if you guarantee the static value is always erased when your
activity is destroyed.

I prefer to use the "Getvalues" method.

Artak

On Sun, Nov 21, 2010 at 12:49 AM, Ajay.kakumanu <ajaykj...@gmail.com> wrote:
> we can share the values from to Activity class to another class in
> diffrent ways
> by using static memebers we can share the values.
> another way is expose one method like Getvalues() in Activity class
> which conatins fresh values of variables
> and we can call this method from View class by creating object of
> Activity class using this object we can call
> ....etc
>
>
> On Nov 21, 5:46 am, hari <hari.zla...@gmail.com> wrote:
>> Hi guys,
>>
>> I have a need where i must pass some values from an Activity to
>> another file which extends View class (instead of Activity) .... Its
>> not the normal passing of values from one activity to another...
>>
>> In my Activity,i will pass some co-ordinate values to the class that
>> extends View... In this class,i will draw an image and place points
>> over the image on the required co-ordinates... But , the problem is ,i
>> cant send values using Intent ...
>>
>> Is there any way to do this?? Pls reply ASAP....
>>
>> Thanks
>
> --
> 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

-- 
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

Reply via email to