]
?
위에 있는 이미지는 일반 디바이스로 직접(전원+홈) 스크린샷 찍은거고
아래 이미지는 소스로 화면을 캡쳐했습니다.
일반적으로 사용하는 아래 소스로요
public File screenshot(View view) throws Exception{ view.setDrawingCacheEnabled(true); Bitmap screenshot2 = view.getDrawingCache(); File f = null; try{ String dirpath = Environment.getExternalStorageDirectory().getAbsolutePath()+ "/BoomPhoto"; File directory_BoomPhoto = new File(dirpath); if(!directory_BoomPhoto.exists()){ directory_BoomPhoto.mkdir(); } f = new File(dirpath+"/"+System.currentTimeMillis()+"(1).png"); f.createNewFile(); FileOutputStream outStream = new FileOutputStream(f); screenshot2.compress(Bitmap.CompressFormat.PNG, 100, outStream); sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(f))); outStream.flush(); outStream.close(); }catch( IOException e){ e.printStackTrace(); } view.setDrawingCacheEnabled(false); return f; }
이걸로 스크린샷을 찍으니 원안에 이미지가 이상하게 나오네요
원 이미지는 커스텀한 이미지뷰 이구요 onDraw로 그리는....
커스텀 이미지뷰 안쓰고 그냥 이미지뷰로 찍으면 잘 나옵니다.
커스텀 이미지뷰를 쓴 이유는 동그랗게 나오게 하기 위해서 쓴 것입니다.
이거 캡쳐 할 수 있는 방법 없을까요??? 답변부탁드립니다...