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