hi Eric Chan onActivityResult not be called
I remove super.onActivityResult(requestCode, resultCode, data); but problem still exist On 3月27日, 下午3时03分, Eric Chan <[email protected]> wrote: > Remove or put super.onActivityResult(requestCode, resultCode, data); > after add > if (resultCode == RESULT_OK) > > int Result_ok =0 > > Best Regards > > Eric Chan > > On Fri, Mar 27, 2009 at 1:27 PM, [email protected] < > > > > [email protected]> wrote: > > > I want to start a new activity in a sub class of LinearLayout when > > it was clicked and then using onActivityResult to receive result when > > the new activity finished, just like this > > > --------------------------------------------------------------------------- > > ---------------------------------------- > > public class LinearLayoutA extends LinearLayout { > > ..... > > @Override > > protected void onFinishInflate() { > > super.onFinishInflate(); > > > this.setOnClickListener(new OnClickListener() { > > public void onClick(View v) { > > Intent intent = new Intent(getContext(), > > SomeActivity.class); > > getContext().startActivity(intent) ; > > // can't use getContext(). > > startActivityForResult here > > } > > }); > > } > > } > > > --------------------------------------------------------------------------- > > ---------------------------------------- > > > public class ActivityA extends Activity { > > ...... > > @Override > > protected void onActivityResult(int requestCode, int resultCode, > > Intent data) { > > super.onActivityResult(requestCode, resultCode, data); > > if (rdata!= null) { > > ...... > > > } > > } > > > } > > > --------------------------------------------------------------------------- > > ---------------------------------------- > > but , onActivityResult never br called. why? > > what should i do ? > > any one can help me ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

