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 |
11798 |
||
2003-09-20 |
11346 |
||
2003-09-20 |
20442 |
||
지구인 |
2010-08-27 |
19283 |
|
지구인 |
2009-09-07 |
13587 |
|
2010-01-29 |
15556 |
||
2004-10-07 |
16659 |
||
2013-07-23 |
1724 |
||
지금이순감 |
2013-07-19 |
2348 |
|
hmily1314 |
2013-06-05 |
2044 |
|
2013-05-28 |
3086 |
||
2013-05-24 |
1477 |
||
2013-05-20 |
2029 |
||
2013-05-04 |
1812 |
||
2936 [웹 프로그래밍] 简单的游戏外挂 |
hmily1314 |
2013-04-28 |
2376 |
hmily1314 |
2013-04-22 |
2513 |
|
hmily1314 |
2013-04-14 |
1737 |
|
hmily1314 |
2013-04-14 |
1669 |
|
hmily1314 |
2013-04-14 |
2278 |
|
2931 [공개소스] 그누보드 4.36.20 |
2013-04-11 |
2365 |
|
2013-04-11 |
2226 |
||
2013-04-11 |
1460 |
||
2013-04-11 |
1500 |
||
2013-04-11 |
1606 |
||
2013-04-11 |
1416 |
||
2013-04-11 |
1535 |
||
진심은 |
2013-03-29 |
4125 |
|
진심은 |
2013-03-29 |
4142 |