0

In my android app, i am capturing image using custom camera. I am able to set camera preview with proper resolution in fullscreen. When i try to set captured image to imageview using setImageBitmap, its not looking proper. Either it looks shrinked or stretched.I want captured image to cover entire screen like Snapchat application. I try to set android:scaleType="centerCrop" but that doensn't work for all devices. Please help me to solve this problem.

Thank you.

Here is my imageview code :

<ImageView
            android:id="@+id/pictuer_img"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop" />
spazm
  • 4,399
  • 31
  • 30
Zankhna
  • 4,570
  • 9
  • 62
  • 103

1 Answers1

0

This is how i make BitMap,

BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize=8;
Bitmap bmp = BitmapFactory.decodeStream(inputStream,null,options);
Zumry Mohamed
  • 9,318
  • 5
  • 46
  • 51