private void updateUiConfiguration(boolean aIsTakenImageDisplayed,int aImageOrigin){
  mIsTakenImageDisplayed=aIsTakenImageDisplayed;
  mTakenImageOrigin=aImageOrigin;
  if (!aIsTakenImageDisplayed) {
    mSelectedGalleryItemsList.clear();
  }
  if (aIsTakenImageDisplayed) {
    mImagePreviewLayout.setVisibility(View.VISIBLE);
    mPreviewScrollView.setVisibility(View.GONE);
  }
 else {
    mPreviewScrollView.setVisibility(View.VISIBLE);
    mImagePreviewLayout.setVisibility(View.GONE);
  }
}

private void updateUiConfiguration ( boolean aIsTakenImageDisplayed , int aImageOrigin ) { mIsTakenImageDisplayed = aIsTakenImageDisplayed ; mTakenImageOrigin = aImageOrigin ; if ( ! aIsTakenImageDisplayed ) { mSelectedGalleryItemsList . clear ( ) ; } if ( aIsTakenImageDisplayed ) { mImagePreviewLayout . setVisibility ( View . VISIBLE ) ; mPreviewScrollView . setVisibility ( View . GONE ) ; } else { mPreviewScrollView . setVisibility ( View . VISIBLE ) ; mImagePreviewLayout . setVisibility ( View . GONE ) ; } }
update the ui according to camera action . two uis are displayed : the camera real time preview ( default configuration ) or the taken picture . ( the taken picture comes from the camera or from the gallery ) when the taken image is displayed , only two buttons are displayed : " attach " the current image or " re take " ( cancel ) another image with the camera . we also have to distinguish the origin of the taken image : from the camera or from the gallery .
