Code example for FragmentActivity

Methods: setContentView

0
            setContentView(layout);
        } 
 
        void setContentToLayout(int i, int fragmentId) {
            this.fragmentId = fragmentId;
            setContentView(i);
        } 
 
        T createFragment() { 
            try { 
                return fragmentClass.newInstance();
            } catch (IllegalAccessException e) {
                fail("could not create fragment"); 
            } catch (InstantiationException e) {
                fail("could not create fragment"); 
            } 
            return null; 
        } 
 
        T getFragment() { 
            @SuppressWarnings("unchecked")