안드로이드 개발 질문/답변
(글 수 45,052)
작업하는 해상도 환경이
Drawable-xhdpi 에 해당되는 이미지들을 가져옵니다.
이 떄 어플 icon의 크기는 제가 알고 있기로 96x96 입니다.
Drawable _drawable = pkgAppsList.get(position).loadIcon(pm);
_drawable.setBounds(0, 0, _drawable.getIntrinsicWidth(), _drawable.getIntrinsicHeight());
Bitmap b = Bitmap.createBitmap(Math.max(_drawable.getIntrinsicWidth(), 1),
Math.max(_drawable.getIntrinsicHeight(), 1),
Bitmap.Config.ARGB_8888);
_drawable.setBounds(0, 0, b.getWidth(), b.getHeight());
위와 같이 어플에 설치되어 있는 이미지를 가져와서
b.getWidth()를 찍어보니 48x48 밖에 안되더라구요..
그래서 96x96 이미지뷰에 넣어주니 당연히 해상도가 꺠져서 들어오구요..
제가 잘못한 부분이 있어서 이런건가요? 뭐가 문제일까요?ㅠㅠ
조언 부탁드립니다.