RadioGroup radioGroup = (RadioGroup) findViewById(R.id.radioGroup1);
radioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {
public void onCheckedChanged(RadioGroup group, int checkedId) {
// checkedId is the RadioButton selected
switch (checkedId) {
case R.id.radioButtonUS:
Toast.makeText(getApplicationContext(), "hello", Toast.LENGTH_LONG).show();
Distance.setHint("Miles");
break;
case R.id.radioButtonMetric:
Toast.makeText(getApplicationContext(), "hello", Toast.LENGTH_LONG).show();
Distance.setHint("Kilometers");
break;
}
}
});