Code example for FragmentActivity

Methods: onRestart

0
    /** 
     * {@inheritDoc} 
     */ 
    @Override 
    protected void onRestart() { 
        super.onRestart(); 
 
        configureFragments(); 
    } 
 
    /** 
     * Handles the FragmentTransaction responsible for injecting the appropriate Fragments into the layout. 
     * If the device is in Landscape orientation, both Fragments are displayed side-by-side. If the device 
     * is in Portrait orientation, a single Fragment is displayed. 
     */ 
    private void configureFragments() { 
        FragmentTransaction fragTransaction = getSupportFragmentManager().beginTransaction();
        FragmentAlwaysThere fragAlwaysThere = new FragmentAlwaysThere();
 
        // Check to see if particular containers exists in the Layout 
        if(findViewById(R.id.frameLayout_fragLandscapeContainer) != null) {