Photoview Fit Screen Height Maintain Aspect Ratio
I cant scaletype for my PhotoView that lets me pan side to side on an image while being full-screen, without cropping the sides using Photo.ScaleType.CENTER_CROP. How would I go ab
Solution 1:
you can use a this ImageViewZoom.
if you don't want to use lib see the codes and try to scale canvas
Solution 2:
I fixed it by using a PhotoViewAttacher like this:
ImageViewimageView= (ImageView) findViewById(R.id.preview);
PhotoViewAttacherphotoViewAttacher=newPhotoViewAttacher(imageView);
photoViewAttacher.setScaleType(ImageView.ScaleType.CENTER_CROP)
and then using an ImageView (id.preview) with the ScaleType in the XML set as Matrix. (otherwise it wont work)
Post a Comment for "Photoview Fit Screen Height Maintain Aspect Ratio"