瀏覽代碼

touchimageview: Variable declaration should be separate.

Declaring multiple variable on one line is difficult to read.
ardevd 7 年之前
父節點
當前提交
5ecbd68667
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/main/java/com/ortiz/touch/TouchImageView.java

+ 4 - 2
src/main/java/com/ortiz/touch/TouchImageView.java

@@ -61,7 +61,8 @@ public class TouchImageView extends AppCompatImageView {
     // MTRANS_X and MTRANS_Y are the other values used. prevMatrix is the matrix
     // MTRANS_X and MTRANS_Y are the other values used. prevMatrix is the matrix
     // saved prior to the screen rotating.
     // saved prior to the screen rotating.
     //
     //
-	private Matrix matrix, prevMatrix;
+	private Matrix matrix;
+    private Matrix prevMatrix;
 
 
     private enum State { NONE, DRAG, ZOOM, FLING, ANIMATE_ZOOM }
     private enum State { NONE, DRAG, ZOOM, FLING, ANIMATE_ZOOM }
     private State state;
     private State state;
@@ -477,7 +478,8 @@ public class TouchImageView extends AppCompatImageView {
     }
     }
 
 
     private float getFixTrans(float trans, float viewSize, float contentSize) {
     private float getFixTrans(float trans, float viewSize, float contentSize) {
-        float minTrans, maxTrans;
+        float minTrans;
+        float maxTrans;
 
 
         if (contentSize <= viewSize) {
         if (contentSize <= viewSize) {
             minTrans = 0;
             minTrans = 0;