Change Fragment Codes to Activity Codes

Iam using Navigation Drawer, I need the Frame Layout filled by Activity's Layout. I want to convert this fragment codes to activity codes: MainActivity.java

if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container,
                    new MessageActivity()).commit();
            navigationView.setCheckedItem(R.id.nav_message);
        }

fragment_container is my Frame Layout, fragment_container is in the activity_main.xml:

<FrameLayout
            android:id="@+id/fragment_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

Could you please show me the Activity Codes?