I have created an xml file called editor.xml which contains a FrameLayout. In my main activity I am trying to add my custom fragment to my FrameLayout.
The error I r
You forgot to commit() your transaction.
commit()
add commit() like this
getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, firstFrag).commit();
You also forgot to call the addtoBackStack() method, otherwise your app closes when you hit the back button.
addtoBackStack()