private void maybeAttachFragment(View rootView,SimpleFragment fragment){
  SimpleFragmentContainerKey key=(SimpleFragmentContainerKey)fragment.getKey();
  if (rootView != null) {
    attachFragment(rootView,fragment);
    attachedKeys.add(key);
  }
 else {
    fragmentsPendingAttach.put(key,fragment);
  }
}

private void maybeAttachFragment ( View rootView , SimpleFragment fragment ) { SimpleFragmentContainerKey key = ( SimpleFragmentContainerKey ) fragment . getKey ( ) ; if ( rootView != null ) { attachFragment ( rootView , fragment ) ; attachedKeys . add ( key ) ; } else { fragmentsPendingAttach . put ( key , fragment ) ; } }
attaches the fragment to the rootview given it ' s path and adds it to the attached keys if successful . if the root view hasn ' t been set yet , this attachment will be delayed until the root view is set .
