Android PhotoView使用步骤实例详解

  

Android PhotoView使用步骤实例详解

  

1,步骤一:在布局文件中的代码:

        & lt; uk.co.senab.photoview.PhotoView   android: id=癅 + id/img_showimgview”   android: layout_width=" match_parent "   android: layout_height=" match_parent "/比;   之前      

2,步骤二:进行找到控件的id

        photoview=(photoview) findViewById (R.id.img_showimgview);      

3步骤三:设置显示

         photoview.setImageBitmap(位);      

4步骤四:进行设置监听

        photoview.setOnPhotoTapListener (new>   img_get_photo.setDrawingCacheEnabled(真正的);   系缆柱=Bitmap.createBitmap (img_get_photo.getDrawingCache ());   img_get_photo.setDrawingCacheEnabled(假);   之前      

问题就出现在这里,此时获得的,是imageview的“影像”并不是imageview中加载的图片,通俗得说就是对imageview进行截屏处理,因为listview条目中是缩略图,自然放大的时候就会失真。

  

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

Android PhotoView使用步骤实例详解