width="728" height="90" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" id="aswift_0" name="aswift_0" style="left: 0px; position: absolute; top: 0px;">android开发中通过View的getDrawingCache方法可以达到截屏的目的,只是缺少状态栏!
原始界面 截屏得到的图片 代码实现 1. 添加权限(AndroidManifest.xml文件里)
2. 添加1个Button(activity_main.xml文件)
|
width="728" height="90" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" id="aswift_0" name="aswift_0" style="left: 0px; position: absolute; top: 0px;">
android开发中通过View的getDrawingCache方法可以达到截屏的目的,只是缺少状态栏! 原始界面
截屏得到的图片
代码实现 1. 添加权限(AndroidManifest.xml文件里)
2. 添加1个Button(activity_main.xml文件)
|