private void updateTitle(){
  if (menuDone != null && menuCamera != null) {
    if (isDisplayingFolderView()) {
      actionBar.setTitle(folderTitle);
      menuDone.setVisible(false);
    }
 else {
      if (selectedImages.size() == 0) {
        actionBar.setTitle(imageTitle);
        if (menuDone != null)         menuDone.setVisible(false);
      }
 else {
        if (mode == ImagePickerActivity.MODE_MULTIPLE) {
          if (limit == Constants.MAX_LIMIT)           actionBar.setTitle(String.format(getString(R.string.selected),selectedImages.size()));
 else           actionBar.setTitle(String.format(getString(R.string.selected_with_limit),selectedImages.size(),limit));
        }
        if (menuDone != null)         menuDone.setVisible(true);
      }
    }
  }
}

private void updateTitle ( ) { if ( menuDone != null && menuCamera != null ) { if ( isDisplayingFolderView ( ) ) { actionBar . setTitle ( folderTitle ) ; menuDone . setVisible ( false ) ; } else { if ( selectedImages . size ( ) == 0 ) { actionBar . setTitle ( imageTitle ) ; if ( menuDone != null ) menuDone . setVisible ( false ) ; } else { if ( mode == ImagePickerActivity . MODE_MULTIPLE ) { if ( limit == Constants . MAX_LIMIT ) actionBar . setTitle ( String . format ( getString ( R . string . selected ) , selectedImages . size ( ) ) ) ; else actionBar . setTitle ( String . format ( getString ( R . string . selected_with_limit ) , selectedImages . size ( ) , limit ) ) ; } if ( menuDone != null ) menuDone . setVisible ( true ) ; } } } }
update activity title if we ' re displaying folder , set folder title if we ' re displaying images , show number of selected images
