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 |
11959 |
||
2003-09-20 |
11510 |
||
2003-09-20 |
20649 |
||
지구인 |
2010-08-27 |
19437 |
|
지구인 |
2009-09-07 |
13755 |
|
2010-01-29 |
15712 |
||
2004-10-07 |
16806 |
||
2013-07-23 |
1729 |
||
지금이순감 |
2013-07-19 |
2351 |
|
hmily1314 |
2013-06-05 |
2048 |
|
2013-05-28 |
3089 |
||
2013-05-24 |
1482 |
||
2013-05-20 |
2030 |
||
2013-05-04 |
1815 |
||
2936 [웹 프로그래밍] 简单的游戏外挂 |
hmily1314 |
2013-04-28 |
2379 |
hmily1314 |
2013-04-22 |
2518 |
|
hmily1314 |
2013-04-14 |
1740 |
|
hmily1314 |
2013-04-14 |
1672 |
|
hmily1314 |
2013-04-14 |
2280 |
|
2931 [공개소스] 그누보드 4.36.20 |
2013-04-11 |
2367 |
|
2013-04-11 |
2229 |
||
2013-04-11 |
1462 |
||
2013-04-11 |
1505 |
||
2013-04-11 |
1610 |
||
2013-04-11 |
1418 |
||
2013-04-11 |
1538 |
||
진심은 |
2013-03-29 |
4127 |
|
진심은 |
2013-03-29 |
4144 |