davidtiagoconceicao
davidtiagoconceicao

Reputation: 71

TouchImageView - Is image scaled?

I am using TouchImageView from Mike Ortiz project on github (https://github.com/MikeOrtiz/TouchImageView) and is working fine. Now I want to check if the image have a zoom in at a moment. Explaining: I have to block some options if the user made zoom in the image and enable those options again only when the user returns to the original zoom. Is there anyway to do that? Some idea about what attribute should I check? I am trying to do it using saveScale and mode, but is not working.

Upvotes: 0

Views: 649

Answers (1)

Mario Velasco
Mario Velasco

Reputation: 3456

As simple as this:

public boolean isZoomedOut () {
    return (saveScale == minScale);
}

The variable saveScale will say you the scale at any moment (between 1x and 3x by default)

P.D.: for new users with "new problems" with this class, look at: https://github.com/MikeOrtiz/TouchImageView/issues

You may find the solution there.

Upvotes: 1

Related Questions