Browse Source

蓝牙打印条码默认尺寸修改

ChengJH 1 year ago
parent
commit
96c3c7bf77

+ 4 - 2
app/src/main/res/layout/popwin_whbatch_breakpackage.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-   android:layout_width="match_parent"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
     android:layout_height="match_parent">
 
     <RelativeLayout
@@ -60,7 +61,8 @@
                 android:id="@+id/btn_print"
                 android:layout_toLeftOf="@id/btn_dialog_confirm_ok"
                 style="@style/PopwinCancleButtonStyle"
-                android:text="@string/text_btn_print"/>
+                android:text="@string/text_btn_print"
+                tools:ignore="NotSibling" />
         </RelativeLayout>
     </RelativeLayout>
 </RelativeLayout>

+ 17 - 3
build.gradle

@@ -2,7 +2,10 @@
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
 
 buildscript {
+//    ext.kotlin_version = '1.2.30'
     repositories {
+        maven { url "https://jitpack.io" }
+        mavenCentral()
         google()
         jcenter()
         maven {
@@ -11,10 +14,15 @@ buildscript {
         }
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.1.3'
+        classpath 'com.android.tools.build:gradle:3.6.4'
+        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
         classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
         classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
-//        classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.13'
+
+
+
+
+//        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
 
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
@@ -23,13 +31,19 @@ buildscript {
 
 allprojects {
     repositories {
+        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
+        maven { url "https://jitpack.io" }
+        mavenCentral()
         google()
         jcenter()
         maven {
             url 'https://maven.google.com/'
             name 'Google'
         }
-        maven { url "https://jitpack.io" }
+
     }
 }
 

+ 3 - 2
gradle/wrapper/gradle-wrapper.properties

@@ -1,5 +1,6 @@
+#Fri Aug 02 09:12:31 CST 2024
 distributionBase=GRADLE_USER_HOME
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
-zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME

+ 1 - 1
pda_libs/bluetooth/src/main/java/com/uas/bluetooth/PrintHelper.java

@@ -122,7 +122,7 @@ public class PrintHelper {
     public static class BarCodeBuilder extends Builder<BarCodeBuilder> {
         private String barCodeType = HPRTPrinterHelper.code128;//打印类型
         private String orientation = HPRTPrinterHelper.BARCODE;//条形码方向
-        private int width = 1;//宽度 窄条的单位宽度
+        private double width = 0.8;//宽度 窄条的单位宽度
         private int ratio = 0;//宽条与窄条的比率0 = 1.5 :1 20 = 2.0:1 26 = 2.6:1 1 = 2.0 :1 21 = 2.1:1 27 = 2.7:1 2 = 2.5 :1 22 = 2.2:1 28 = 2.8:1 3 = 3.0 :1 23 = 2.3:1 29 = 2.9:1 4 = 3.5 :1 24 = 2.4:1 30 = 3.0:1
         private int height = 80;//条码的单位高度
         private int codeTextFont = 1;//注释条码时要使用的字体号。 (当isReader)

+ 1 - 1
pda_libs/pulltoreflashlibrary/src/main/AndroidManifest.xml

@@ -4,7 +4,7 @@
     android:versionCode="2110"
     android:versionName="2.1.1" >
 
-    <uses-sdk android:minSdkVersion="12" />
+
 
     <application />