Code example for FragmentActivity

Methods: setContentView, setProgressBarIndeterminateVisibility

0
    super.setContentView(view);
    onSetContentView(); 
  } 
 
  @Override public void setContentView(View view, ViewGroup.LayoutParams params) {
    super.setContentView(view, params);
    onSetContentView(); 
  } 
 
  private void onSetContentView() { 
    setProgressBarIndeterminateVisibility(false); 
    mSetContentViewAlreadyCalled = true;
  } 
 
  /** 
   * Helper method that allows to initialize and add a fragment to activities that usually have 
   * just one single fragment. Fragment is added using its class.getName() as tag. 
   * 
   * @param containerId resource id of the fragment container (must be created through android 
   * resources) 
   * @param fragmentClass the class of the fragment to setup