Adding Fragments in Java

Added Fragments in MainActivity, created an object of the MainFragment class, also added a reference to the FragmentManager, added begin a transaction to add the Fragment, and finally we commit to the the FragmentTransaction...