Code example for FragmentActivity

Methods: startActivity

0
    public void startActivityFromFragment( 
        Fragment fragment,
        Intent intent,
        int requestCode)
    { 
        if (!useFrag) { startActivity(intent); }
        else if (fragment instanceof ContactsFragment) {
            launchDetailFragment(intent.getExtras());
        } 
    } 
 
    private void installDetailsFragment() { 
        FragmentManager fragMgr = getSupportFragmentManager();
 
        if (null != fragMgr.findFragmentByTag(FRAG_TAG)) { return; }
 
        FragmentTransaction xact = fragMgr.beginTransaction();
        xact.add(
            R.id.contact_detail, 
            ContactDetailFragment.newInstance(), 
            FRAG_TAG);