The problem is, it is probably more complicated to make your example work than it is to make the real program work. But what I was trying to explain in my previous post is that you pass things like the string back and forth between activites the same way we have been all along, with the extras in intents. I would assume you send back the result of your spinner selection the same way. To do that in your example here we would need to intercept the back button. Is that what you need?
Because here is how you do that:
- Code: Select all
@Override
public void onBackPressed() {
String sToSend = txtValue.getText().toString();
Intent in = new Intent();
in.putExtra("value", sToSend);
Settings.this.setResult(RESULT_OK, in);
finish();
return;
}//onbackpressed
You would need to send this back to the choose activity at least to store it until you push the other button and send it on to the main activity.
Hope this helps.
Phyll




