On Fri, Jan 6, 2012 at 4:41 AM, raju <rajukc...@gmail.com> wrote:
> How is it possible to call startActivityForResult from non Activity
> class like in eg that extends LinearLayout.

You don't. Your custom View that extends LinearLayout should not be
starting an activity, let alone one for a result.

Your custom View should follow the listener pattern that all other Views use:

-- have an interface describing the event
-- have the activity supply an implementation of that interface using a setter
-- have the View call a method on that interface object when the event occurs
-- have the activity do something in that method, such as call
startActivityForResult()

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

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