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" />