hablema
hablema

Reputation: 550

TouchImageView Scaletype centerCrop ??

I have an imageview where i have implemented the TouchImageView class for zoom functionality. But i'm not able to set the scaletype. I want the initial scaletype to be centercrop but i dosen't work.

When i try

img.setScaleType(ScaleType.CENTER_CROP);

the zoom functionality stops working and the image becomes center-cropped. I want both to work together.

How can i make the initial image to be center cropped that is being selected from my SDcard into an imageview with zoom functionality.

Upvotes: 2

Views: 825

Answers (2)

ricsh
ricsh

Reputation: 63

Has anyone tried this patch and the getZoomedImageFromSource() with scaleType centre crop

the bitmap it returns does not match the zoomed image.

Upvotes: 0

hablema
hablema

Reputation: 550

The patch for supporting scale types other than FIT_START and FIT_XY have been made. If anyone needs help with this please refer to this :

https://github.com/MikeOrtiz/TouchImageView/commit/475b552b468c1da10d6802cefaa00cf5e39b27d1

Upvotes: 0

Related Questions