I have an adapter class :
public class AdapterAllAddress extends BaseExpandableListAdapter {
private Context context;
public AdapterAllAddress(Context context,
ArrayList<AllAddressesGroup> groups) {
// TODO Auto-generated constructor stub
this.context = context;
}
}
I want to call startActivityForResult
when a button click , I know I can call startActivity
like this:
context.startActivity()
but i am looking for activity with results, how please ?
yourButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent(context, YourNewActivity.class);
((Activity) context).startActivityForResult(intent, resultCode);
}
});