Code example for FragmentActivity

0
        public static final int FRAGMENT_ID = 0xFACE;
 
        private Class<T> fragmentClass;
        private int fragmentId;
 
        protected TestFragmentActivity(Class<T> fragmentClass) {
            this.fragmentClass = fragmentClass;
        } 
 
        @Override 
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            if (getAutoCreateUI()) { 
                setContentToFragment(null); 
            } 
        } 
 
        protected boolean getAutoCreateUI() { 
            return true; 
        }