Android replace fragment doesn't hide underlying fragment

view story

http://stackoverflow.com – I have the following problem: My app consists of several fragments that are dynammicly added. There is one fragment with a push button and an textedit (called 'fragA'). If I click the push button I want to show an different fragment with some text (called 'fragB'). I do this with the following code (in fragA class): btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Fragment howFragment = new HowFragment(); FragmentTransaction transaction = null; transaction = getFragmentManager().beginTransact (HowTos)