Re: [android-developers] Re: startActivivityForResult and onResult From a view

2010-07-19 Thread TreKing
On Sat, Jul 17, 2010 at 3:00 PM, Kumar Bibek coomar@gmail.com wrote:

 What do you mean by a view?


Based on the posted code, I'm guessing he has a custom view which he's
getting his context (activity) from and calling startActivityForResult from.

On Sat, Jul 17, 2010 at 2:42 AM, Ramya S ramya.sriga...@gmail.com wrote:

 Is there anyway that I can receive the result on my view?


No, nor should you be calling startActivity from a View, you should be
calling it from the parent activity of that view and handling the result
there as well. If your view is what cares about the result, delegate the
result to the view from the activity (which should know about the View).

-
TreKing http://sites.google.com/site/rezmobileapps/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] Re: startActivivityForResult and onResult From a view

2010-07-17 Thread Kumar Bibek
What do you mean by a view? You are starting the new activity from
your base activity's context. So, you will be receiving the result in
your base actvity.

Thanks and Regards,
Kumar Bibek
http://tech-droid.blogspot.com

On Jul 17, 12:42 pm, Ramya S ramya.sriga...@gmail.com wrote:
 I started an Activity from my view with startActivityForResult using

 ((Activity)getContext()).startActivityForResult(intent, xxx);

 but I don't receive the result in onActivityResult  in the view (As
 expected)

 But I receive it in the activity of the view.

 Is there anyway that I can receive the result on my view? I need the
 result in my view

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