app/src/main/java/com/abhijith/nanodegree/geonotes/View/MainActivity.java
/**
     * Method to push any fragment into given id.
     *
     * @param fragment An instance of Fragment to show into the given id.
     */
Method to push any fragment into given id.
@param fragment An instance of Fragment to show into the given id.
Method to push any fragment into given id . @param fragment An instance of Fragment to show into the given id .
protected boolean pushFragment(Fragment fragment) {
        if (fragment != null) {
            getSupportFragmentManager()
                    .beginTransaction()
                    .replace(R.id.rootLayout, fragment)
                    .addToBackStack(null)
                    .commit();
            return true;
        }
        return false;
    }
protected boolean pushFragment ( Fragment fragment ) { if ( fragment != null ) { getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( R . id . rootLayout , fragment ) . addToBackStack ( null ) . commit ( ) ; return true ; } return false ; }
Method to push any fragment into given id.
Method to push any fragment into given id .