首页 > 移动平台 > 详细

Android PhotoView单点/多点触摸进行图片缩放

时间:2014-01-17 15:18:29      阅读:743      评论:0      收藏:0      [点我收藏+]
项目地址:https://github.com/chrisbanes/PhotoView

效果图:
bubuko.com,布布扣


代码示范:
ImageView
mImageView; PhotoViewAttacher mAttacher; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Any implementation of ImageView can be used! mImageView = (ImageView) findViewById(R.id.iv_photo); // Set the Drawable displayed Drawable bitmap = getResources().getDrawable(R.drawable.wallpaper); mImageView.setImageDrawable(bitmap); // Attach a PhotoViewAttacher, which takes care of all of the zooming functionality. mAttacher = new PhotoViewAttacher(mImageView); } // If you later call mImageView.setImageDrawable/setImageBitmap/setImageResource/etc then you just need to call attacher.update();

Android PhotoView单点/多点触摸进行图片缩放

原文:http://www.cnblogs.com/weixiao870428/p/3524029.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!