Ver Fonte

大小调整

詹子聪 há 5 anos atrás
pai
commit
773a48f669

+ 2 - 2
app/build.gradle

@@ -7,8 +7,8 @@ android {
         applicationId "com.miekir.ocr"
         minSdkVersion versions.minSdk
         targetSdkVersion versions.targetSdk
-        versionCode 16
-        versionName "1.0.16"
+        versionCode 17
+        versionName "1.0.17"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
 

+ 5 - 4
app/src/main/java/com/miekir/ocr/widget/CropView.java

@@ -117,18 +117,19 @@ public class CropView extends View {
         switch (scanType) {
             case SCAN_TYPE_POSTAL:
                 // 邮箱
-                coverWidth = (int) (getWidth()*0.815);
+                coverWidth = (int) (getWidth()*0.82);
                 // 最小高度不能小于图片的高度
 //                coverHeight = Math.max(minHeight, (int)(getWidth()*0.3));
-                coverHeight = SizeUtils.dp2px(65);
+                coverHeight = SizeUtils.dp2px(74);
                 sX = (getWidth()*1.0f-coverWidth)/2;
                 sY = getWidth()*0.177f;
                 mFrameRectF = new RectF(sX, sY, sX + coverWidth, sY + coverHeight);
                 break;
             case SCAN_TYPE_ADDRESS:
             case SCAN_TYPE_NAME:
-                coverWidth = (int) (getWidth()*0.75);
-                coverHeight = (int) (getWidth()*0.58);
+                // 宽400,高300,padding 50 + 50
+                coverWidth = (int) (getWidth()*0.78);
+                coverHeight = (int) (getWidth()*0.48);
                 sX = (getWidth()*1.0f-coverWidth)/2;
                 sY = (getHeight()*1.0f-coverHeight)/2;
                 mFrameRectF = new RectF(sX, sY, sX + coverWidth, sY + coverHeight);