1/1
//layout을 view로 전환
View view = getLayoutInflater().inflate(R.layout.main, null); //view에서 캐쉬를 연다 view.setDrawingCacheEnabled(true); //measure와layout을 정의하여야만 저장할수 있다.
//View크기 view.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); //view 위치와 크기
view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight()); try{ //view에서 bitmap을 얻어온다
Bitmap bitmap = view.getDrawingCache(); //FileOututStream을 만든다
FileOutputStream fos = new FileOutputStream("/sdcard/test.png"); //png형식으로 저장한다
bitmap.compress(CompressFormat.PNG, 100, fos); fos.close(); }catch (Exception e) { }
제목 | 글쓴이 | 날짜 | 조회 |
---|---|---|---|
2003-09-20 |
11757 |
||
2003-09-20 |
11294 |
||
2003-09-20 |
20361 |
||
지구인 |
2010-08-27 |
19223 |
|
지구인 |
2009-09-07 |
13523 |
|
2010-01-29 |
15499 |
||
2004-10-07 |
16607 |
||
2013-07-23 |
1718 |
||
지금이순감 |
2013-07-19 |
2341 |
|
hmily1314 |
2013-06-05 |
2039 |
|
2013-05-28 |
3080 |
||
2013-05-24 |
1474 |
||
2013-05-20 |
2025 |
||
2013-05-04 |
1808 |
||
2936 [웹 프로그래밍] 简单的游戏外挂 |
hmily1314 |
2013-04-28 |
2371 |
hmily1314 |
2013-04-22 |
2512 |
|
hmily1314 |
2013-04-14 |
1735 |
|
hmily1314 |
2013-04-14 |
1668 |
|
hmily1314 |
2013-04-14 |
2274 |
|
2931 [공개소스] 그누보드 4.36.20 |
2013-04-11 |
2363 |
|
2013-04-11 |
2224 |
||
2013-04-11 |
1456 |
||
2013-04-11 |
1496 |
||
2013-04-11 |
1602 |
||
2013-04-11 |
1415 |
||
2013-04-11 |
1530 |
||
진심은 |
2013-03-29 |
4123 |
|
진심은 |
2013-03-29 |
4139 |