本文实例为大家分享了PhotoView实现图片双击放大单击退出的具体代码,供大家参考,具体内容如下
实现思路
1.复制PhotoView 到libs下,然后进行添加小奶瓶
2.布局xml文件,添加PhotoView控件,src加载一张图片,就已经实现了放大缩小
3.Photoview设置点击事件,实现单击退出Activity
导jar包
compile files('libs/uk-co-senab-photoview.jar')
进行布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent"> <uk.co.senab.photoview.PhotoView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/pv" android:src="@drawable/ic_emptya"/> </RelativeLayout>
网站标题:Android使用PhotoView实现图片双击放大单击退出效果-创新互联
URL网址:https://www.cdcxhl.com/article28/hpocp.html
成都网站建设公司_创新互联,为您提供网站排名、全网营销推广、做网站、静态网站、网站内链、网站制作
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联