Solved the problem by importing
FragmentActivity
and having my main function extend it
import android.support.v4.app.FragmentActivity;
.
.
.
public class MainActivity extends FragmentActivity
I think android studio was extending the default Activity instead of the FragmentActivity.
I also changed
FragmentManager frgManager = getFragmentManager();
to
FragmentManager frgManager = getSupportFragmentManager();