本文实例为大家分享了android实现手机截屏并保存截图功能的具体代码,供大家参考,具体内容如下
一、准备一张图片
拷贝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。内容未经允许不得转载,或转载时需注明来源: 创新互联