I wanna start a new activity and sent a parametter to her. And according to what has been sent activity will behave in a way or another. (Sorry my bad english) The options depends of a button. If "option1" or "option2" is pressed, the SettingsActivity will come the same, except in a little details, so I have send a parameter to separate the two ways inside "SettingsActivity".
I have the next:
option1.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent myIntent = new Intent(view.getContext(), SettingsActivity.class);
startActivityForResult(myIntent, 0);
}
});
option2.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent myIntent = new Intent(view.getContext(), SettingsActivity.class);
startActivityForResult(myIntent, 0);
}
});