android实现手机截屏并保存截图功能-创新互联

本文实例为大家分享了android实现手机截屏并保存截图功能的具体代码,供大家参考,具体内容如下

十载的曲水网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都全网营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整曲水建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。成都创新互联从事“曲水网站设计”,“曲水网站推广”以来,每个客户项目都认真落实执行。

一、准备一张图片

拷贝screenshot_panel.9.png放在目录drawable-xhdpi下

二、activity_main.xml

代码如下:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" >
 
  <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/hello_world" />
  
  <Button
    android:id="@+id/main_btn"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="Shot"
    android:layout_alignParentBottom="true"/>
 
</RelativeLayout>

名称栏目:android实现手机截屏并保存截图功能-创新互联
当前路径:https://www.cdcxhl.com/article10/dsiggo.html

成都网站建设公司_创新互联,为您提供商城网站面包屑导航关键词优化定制开发网站维护网站建设

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

绵阳服务器托管