Parcourir la source

蓝牙打印宽高设置

ChengJH il y a 1 an
Parent
commit
92fa573f5d

+ 1 - 1
app/src/main/AndroidManifest.xml

@@ -20,7 +20,7 @@
         android:name="com.uas.pda_smart_com.application.PdaApplication"
         android:allowBackup="true"
         android:icon="@mipmap/icon"
-        android:label="@string/my_app_name_test"
+        android:label="@string/my_app_name"
         android:theme="@style/AppTheme"
         android:usesCleartextTraffic="true"
         tools:replace="icon,label,theme">

+ 4 - 4
app/src/main/java/com/uas/pda_smart_com/util/PrintUtils.java

@@ -22,9 +22,9 @@ public class PrintUtils {
             }
 
             int offset = 6,
-                    h = 200,
-                    v = 200,
-                    height = 200,
+                    h = 400,
+                    v = 800,
+                    height = 400,
                     qty = 1;
 
             JSONArray templateArray = JSON.parseArray(printTemplate);
@@ -73,7 +73,7 @@ public class PrintUtils {
                                     printHelper = printHelper.printQr(printText)
                                             .setX(printX)
                                             .setY(printY)
-                                            .setTextSize(2)
+                                            .setTextSize(fontSize)
                                             .setModel(2)
                                             .build();
                                     break;