Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void setBitMapToImageField(Bitmap bitmap, ZCRecordValue recValue,
- RelativeLayout layoutForImageAndFileUpload,
- LinearLayout linLayoutGalleryCamera,
- LinearLayout containerAfterFileUpload, View v,
- LinearLayout containerAfterFileUploadPortrait, LinearLayout conatinerFieldValuesFormFileUpload) {
- // TODO Auto-generated method stub
- float imgWidth = bitmap.getWidth();
- float imgHeight = bitmap.getHeight();
- if( (imgWidth/imgHeight) > 2.7){
- recValue.setFileUploaded(true);
- recValue.setFileValue(bitmap);
- layoutForImageAndFileUpload.setTag(bitmap);
- linLayoutGalleryCamera.setVisibility(View.GONE);
- containerAfterFileUpload.setVisibility(View.VISIBLE);
- ((ImageView) v.findViewById(R.id.imageViewAfterFileUpload)).setImageBitmap(bitmap);
- }else{
- recValue.setFileUploaded(true);
- recValue.setFileValue(bitmap);
- layoutForImageAndFileUpload.setTag(bitmap);
- linLayoutGalleryCamera.setVisibility(View.GONE);
- containerAfterFileUpload.setVisibility(View.GONE);
- containerAfterFileUploadPortrait.setVisibility(View.VISIBLE);
- conatinerFieldValuesFormFileUpload.setBackgroundDrawable(null);
- ((ImageView) v.findViewById(R.id.imageViewAfterFileUploadPortrait)).setImageBitmap(bitmap);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement