2013年10月7日
摘要: public class ScreenShot { // 获取指定Activity的截屏,保存到png文件 public static Bitmap takeScreenShot(Activity activity) { // View是你需要截图的View View view = activity.getWindow().getDecorView(); view.setDrawingCacheEnabled(true); view.buildDrawingCache(); Bitmap b1 = view.getDrawingCache(); // 获取状态栏高度 Rect f... 阅读全文
posted @ 2013-10-07 14:56 lee0oo0 阅读(7763) 评论(0) 推荐(0) 编辑