getSupportFragmentManager().beginTransaction().
replace(R.id.fragment,new Fragment1()).commit();
raaio.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup radioGroup, int i) { switch (i){ case R.id.btn1: getSupportFragmentManager().beginTransaction().replace(R.id.fragment,new Fragment1()).commit(); break; case R.id.btn2: getSupportFragmentManager().beginTransaction().replace(R.id.fragment,new Fragment2()).commit(); break; case R.id.btn3: getSupportFragmentManager().beginTransaction().replace(R.id.fragment,new Fragment3()).commit(); break; case R.id.btn4: getSupportFragmentManager().beginTransaction().replace(R.id.fragment,new Fragment4()).commit(); break; } } });