카카오톡이나, 틱톡의 프로필 사진처럼,

사진을 불러와서 이미지뷰의 사이즈 비율로 줄이고

나머지 잉여부분은 버리고 가운데에 표현하는 겁니다.


문제는

VM Memory 부분을 생각해서 sample 을 4 이상으로 줘야하고,

또 작은 이미지를 가져오면, 이미지 뷰 보다 작게 들어 가버립니다.

//갤러리에서 Bitmap 가져오는 부분은 이렇습니다.  

Bitmap bitmap = null;
BitmapFactory.Options option = new BitmapFactory.Options();
option.inSampleSize = 4;
option.inPurgeable = true;
option.inDither = true;
Bitmap src = BitmapFactory.decodeFile(getPathFromUri(uri), option);
bitmap = Bitmap.createScaledBitmap(src, src.getWidth(), src.getHeight(), true);


//이미지뷰 XML입니다.

  <ImageView 
     android:id="@+id/iv"
      android:layout_width="80dip"
      android:layout_height="90dip"
      android:layout_margin="2dip"
      android:scaleType="center"
      android:adjustViewBounds="false" />