Browse files

Fix initial set of doubleTapZoom value.

  • Loading branch information...
1 parent fb338bc commit c2eb5a1766b45226004612835d1f32c9ce0d666a @goncalossilva goncalossilva committed Apr 15, 2012
View
4 main/src/com/polites/android/GestureImageView.java
@@ -41,7 +41,7 @@
private float scale = 1.0f;
private float maxScale = 5.0f;
private float minScale = 0.75f;
- private float doubleTapScale = maxScale/2;
+ private float doubleTapScale = maxScale/2.0f;
private float rotation = 0.0f;
@@ -77,7 +77,7 @@ public GestureImageView(Context context, AttributeSet attrs) {
setImageResource(attrs.getAttributeResourceValue(GLOBAL_NS, "src", -1), true);
setMinScale(attrs.getAttributeFloatValue(LOCAL_NS, "min-scale", minScale));
setMaxScale(attrs.getAttributeFloatValue(LOCAL_NS, "max-scale", maxScale));
- setMaxScale(attrs.getAttributeFloatValue(LOCAL_NS, "double-tap-scale", doubleTapScale));
+ setDoubleTapScale(attrs.getAttributeFloatValue(LOCAL_NS, "double-tap-scale", doubleTapScale));
setStrict(attrs.getAttributeBooleanValue(LOCAL_NS, "strict", strict));
setRecycle(attrs.getAttributeBooleanValue(LOCAL_NS, "recycle", recycle));
}
View
2 main/src/com/polites/android/GestureImageViewTouchListener.java
@@ -31,7 +31,7 @@
private float maxScale = 5.0f;
private float minScale = 0.75f;
- private float doubleTapScale = maxScale/2;
+ private float doubleTapScale = maxScale/2.0f;
private float centerX = 0;
private float centerY = 0;

0 comments on commit c2eb5a1

Please sign in to comment.