private void checkedChange(int id){
switch (id) {
case 0:
case R.id.averageUser:
// averageUser.setBackgroundResource(R.id.averageUser);
// doctor.setBackgroundResource(R.id.doctor);
vf.setDisplayedChild(0);
break;
case 1:
case R.id.doctor:
// averageUser.setBackgroundResource(R.id.doctor);
// doctor.setBackgroundResource(R.id.averageUser);
vf.setDisplayedChild(1);
break;
}
}
可以了,上面應該加個averageUser.setChecked(true);
下面加個doctor.setChecked(true);就可以了