Lets say that i am having main activity as
public class home_activity extends ActionBarActivity {
EditText t1;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.home_layout);
t1=(EditText)findViewById(R.id.status);
t1.setText("single");
}
}
Now i have another activity that contain radio group. In that radio group contains 3 radio button single, married,divorce. If there is change using in radio group the t1 should be changed.The second activity as follow.
public class another_activity extends ActionBarActivity {
RadioGroup g1;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.another_layout);
g1=(RadioGroup)findViewById(R.id.radiogroup);
g1.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
//here what should i do to get result when user checks married or divorce radio button in another activity
}
});
}
}