Переглянути джерело

1、连接上S81x才能点击启动TCP;2、启动TCP传输的时候,屏蔽其他项的按钮功能,关闭TCP传输时再开启;3、将数据缓冲区数组加长到8K,让GT7系列也可以传输;4、不限制芯片的PID,限制VID即可;5、优化主界面的布局;6、更改APK名字和图片

robbin 4 роки тому
батько
коміт
8f27b7139f
27 змінених файлів з 326 додано та 853 видалено
  1. 54 17
      app/src/main/java/com/example/administrator/wingcool_gt9_apk/GT9MainActivity.java
  2. 22 69
      app/src/main/res/layout-hdpi/activity_gt9_main.xml
  3. 22 69
      app/src/main/res/layout-land-hdpi/activity_gt9_main.xml
  4. 22 69
      app/src/main/res/layout-land-mdpi/activity_gt9_main.xml
  5. 22 69
      app/src/main/res/layout-land-xhdpi/activity_gt9_main.xml
  6. 22 69
      app/src/main/res/layout-land-xxhdpi/activity_gt9_main.xml
  7. 22 69
      app/src/main/res/layout-land-xxxhdpi/activity_gt9_main.xml
  8. 22 69
      app/src/main/res/layout-land/activity_gt9_main.xml
  9. 22 69
      app/src/main/res/layout-mdpi/activity_gt9_main.xml
  10. 22 69
      app/src/main/res/layout-xhdpi/activity_gt9_main.xml
  11. 22 69
      app/src/main/res/layout-xxhdpi/activity_gt9_main.xml
  12. 22 69
      app/src/main/res/layout-xxxhdpi/activity_gt9_main.xml
  13. 22 69
      app/src/main/res/layout/activity_gt9_main.xml
  14. 2 2
      app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  15. 2 2
      app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  16. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher.png
  17. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  18. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher.png
  19. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  20. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher.png
  21. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  22. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  23. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  24. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  25. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  26. 2 2
      app/src/main/res/values-en/strings.xml
  27. 2 2
      app/src/main/res/values/strings.xml

+ 54 - 17
app/src/main/java/com/example/administrator/wingcool_gt9_apk/GT9MainActivity.java

@@ -93,8 +93,14 @@ public class GT9MainActivity extends AppCompatActivity
     private Context mShowID;
     private Button btnExit;
 
+    private Button btnConfigSetting;
+    private Button btnFWUpdate;
     private Button btnDataAnalysis;
-    private Context mDataAnalysisContext;
+    private Button btnNoiseAnalysis;
+    private Button btnDemoTools;
+    private Button btnIICOperation;
+    private Button btnTestOperation;
+    private Button btnContactUs;
 
     public static List<Activity> activityList = new LinkedList();
 
@@ -122,6 +128,7 @@ public class GT9MainActivity extends AppCompatActivity
                     //String avalue = "S818 is connected";
 
                     mShow.setText(R.string.connected);//????????
+                    bt_tcpstart.setEnabled(true);
                     break;
                 case CONNECTED_FAILED://??????????????????
                     //String bvalue = "S818 is disconnected";
@@ -226,10 +233,6 @@ public class GT9MainActivity extends AppCompatActivity
             }
         });
 
-        bt_tcpstart = findViewById(R.id.bt_tcpstart);
-
-        bt_tcpstart.setOnClickListener(this);
-
         init();//
     }
 
@@ -377,11 +380,21 @@ public class GT9MainActivity extends AppCompatActivity
 
         mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
 
-        btnExit = (Button) findViewById(R.id.Exit);
+        bt_tcpstart = findViewById(R.id.bt_tcpstart);
+        bt_tcpstart.setOnClickListener(this);
+        bt_tcpstart.setEnabled(false);
+
+        btnConfigSetting = findViewById(R.id.ConfigSetting);
+        btnFWUpdate = findViewById(R.id.FWUpdate);
+        btnDataAnalysis = findViewById(R.id.DataAnalysis);
+        btnNoiseAnalysis = findViewById(R.id.NoiseAnalysis);
+        btnDemoTools = findViewById(R.id.DemoTools);
+        btnIICOperation = findViewById(R.id.IICOperation);
+        btnTestOperation = findViewById(R.id.TestOperation);
+        btnContactUs = findViewById(R.id.ContactUs);
+
+        btnExit = findViewById(R.id.Exit);
         btnExit.setOnClickListener(this);
-
-        mDataAnalysisContext = GT9MainActivity.this;
-        btnDataAnalysis = (Button) findViewById(R.id.DataAnalysis);
     }
 
 
@@ -401,6 +414,15 @@ public class GT9MainActivity extends AppCompatActivity
 
                     bt_tcpstart.setText("TCP停止");
 
+                    btnConfigSetting.setEnabled(false);
+                    btnFWUpdate.setEnabled(false);
+                    btnDataAnalysis.setEnabled(false);
+                    btnNoiseAnalysis.setEnabled(false);
+                    btnDemoTools.setEnabled(false);
+                    btnIICOperation.setEnabled(false);
+                    btnTestOperation.setEnabled(false);
+                    btnContactUs.setEnabled(false);
+
                     //bt_tcpstart.setBackgroundColor(getResources().getColor(R.color.colorAccent1));
 
                     new Thread(new Runnable() {
@@ -419,7 +441,7 @@ public class GT9MainActivity extends AppCompatActivity
                                     inputStream = socket.getInputStream();
                                     outputStream = socket.getOutputStream();
                                     byte[] headbytes = new byte[8];
-                                    byte[] databytes = new byte[1024 * 6];
+                                    byte[] databytes = new byte[1024 * 8];
                                     int len;
                                     int datalen = 0;
                                     int framelen = 0;
@@ -504,6 +526,15 @@ public class GT9MainActivity extends AppCompatActivity
                         e.printStackTrace();
                     }
 
+                    btnConfigSetting.setEnabled(true);
+                    btnFWUpdate.setEnabled(true);
+                    btnDataAnalysis.setEnabled(true);
+                    btnNoiseAnalysis.setEnabled(true);
+                    btnDemoTools.setEnabled(true);
+                    btnIICOperation.setEnabled(true);
+                    btnTestOperation.setEnabled(true);
+                    btnContactUs.setEnabled(true);
+
                 }
 
                 break;
@@ -539,10 +570,11 @@ public class GT9MainActivity extends AppCompatActivity
                         if (deviceList != null) {
 
                             for (UsbDevice usbDevice : deviceList.values()) {
-                                int productId = usbDevice.getProductId();
+                                //int productId = usbDevice.getProductId();
                                 int vendorId = usbDevice.getVendorId();
-                                if ((productId == 0x0818 && vendorId == 0x27C0)
-                                        ||(productId == 0x0001 && vendorId == 0x222A))   //奕力的PID和VID
+                                if (( vendorId == 0x27C0)
+                                        ||(vendorId == 0x222A)    //奕力的VID
+                                        ||(vendorId == 0x056A))   //8191主动笔和Wacom主动笔
                                 {
                                     isS818Device = true;
                                     if (mUsbManager.hasPermission(usbDevice)) {
@@ -590,8 +622,13 @@ public class GT9MainActivity extends AppCompatActivity
         Collection<UsbDevice> values = deviceList.values();
         if (!values.isEmpty()) {
             for (UsbDevice usbDevice : values) {
-                int productId = usbDevice.getProductId();
-                if (productId == 0x0818 || productId == 0x0001 ) {  //0x0001是奕力的PID
+                //int productId = usbDevice.getProductId();
+                int vendorId = usbDevice.getVendorId();
+                //if (productId == 0x0818 || productId == 0x0001 )
+                if (( vendorId == 0x27C0)
+                        ||(vendorId == 0x222A)    //奕力的VID
+                        ||(vendorId == 0x056A))   //8191主动笔和Wacom主动笔
+                {  //0x0001是奕力的PID
 
                     if (mUsbManager.hasPermission(usbDevice)) {
 
@@ -655,9 +692,9 @@ public class GT9MainActivity extends AppCompatActivity
                     }
                 }
             }
-        } else {
+        } //else {
             // finish();
-        }
+        //}
     }
 
     @Override

+ 22 - 69
app/src/main/res/layout-hdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-land-hdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-land-mdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-land-xhdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-land-xxhdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-land-xxxhdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-land/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-mdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-xhdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-xxhdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout-xxxhdpi/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 22 - 69
app/src/main/res/layout/activity_gt9_main.xml

@@ -175,18 +175,14 @@
 
             <Button
                 android:id="@+id/bt_tcpstart"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="8dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="TCP启动"
-                android:textColor="#FFFFf0"
                 android:textAllCaps="false"
+                android:textColor="#FFFFf0"
                 android:textSize="30dp"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -196,15 +192,10 @@
                 app:layout_constraintVertical_bias="0.196" />
 
             <Button
-                android:id="@+id/readtext"
-                android:layout_width="match_parent"
+                android:id="@+id/ConfigSetting"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ConfigSetting"
                 android:text="@string/configsetting"
@@ -220,14 +211,9 @@
 
             <Button
                 android:id="@+id/FWUpdate"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="FirmwareUpdate"
                 android:text="@string/firmwareupdata"
@@ -243,14 +229,9 @@
 
             <Button
                 android:id="@+id/DataAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DataAnalysis"
                 android:text="@string/dataanalysis"
@@ -266,14 +247,9 @@
 
             <Button
                 android:id="@+id/NoiseAnalysis"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="NoiseAnalysis"
                 android:text="@string/noiseanalysis"
@@ -289,14 +265,9 @@
 
             <Button
                 android:id="@+id/DemoTools"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="DemoTools"
                 android:text="@string/demotools"
@@ -312,14 +283,9 @@
 
             <Button
                 android:id="@+id/IICOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="IICOperation"
                 android:text="@string/ramoperation"
@@ -335,14 +301,9 @@
 
             <Button
                 android:id="@+id/TestOperation"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="TestOperation"
                 android:text="@string/testoperation"
@@ -358,14 +319,9 @@
 
             <Button
                 android:id="@+id/ContactUs"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
-                android:layout_marginBottom="0dp"
+                android:layout_gravity="center"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:onClick="ContactUs"
                 android:text="@string/contactus"
@@ -381,13 +337,10 @@
 
             <Button
                 android:id="@+id/Exit"
-                android:layout_width="match_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginStart="8dp"
-                android:layout_marginLeft="8dp"
+                android:layout_gravity="center"
                 android:layout_marginTop="0dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginRight="8dp"
                 android:layout_marginBottom="8dp"
                 android:background="@drawable/bg_mainactivity_buttonframe_line"
                 android:text="@string/exit"

+ 2 - 2
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+    <background android:drawable="@drawable/ic_launcher_background_2021051701" />
+    <foreground android:drawable="@drawable/ic_launcher_background_2021051701" />
 </adaptive-icon>

+ 2 - 2
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+    <background android:drawable="@drawable/ic_launcher_background_2021051701" />
+    <foreground android:drawable="@drawable/ic_launcher_background_2021051701" />
 </adaptive-icon>

BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 2 - 2
app/src/main/res/values-en/strings.xml

@@ -79,9 +79,9 @@
     <string name="companyaddr">Address:Room 2008, Chuangxingda Business Building, No.36 Liuxian 3rd Road, Baoan District, Shenzhen</string>
     <string name="telephonenum">Telephone:186 8896 1937</string>
     <string name="emailaddr">Email:max@wingcool.cn</string>
-    <string name="version">APK Version:v0.0.0.2_20210430-Internal Version</string>
+    <string name="version">APK Version:v0.0.0.2_20210514-Internal Version</string>
 
-    <string name="app_name">WingCool(GT9)</string>
+    <string name="app_name">WingCoolAPK</string>
     <string name="input_num_character">0123456789ABCDEFabcdef</string>
     <string name="input_num">0123456789</string>
     <string name="databuttonsize">18p</string>

+ 2 - 2
app/src/main/res/values/strings.xml

@@ -78,9 +78,9 @@
     <string name="companyaddr">地址:深圳市宝安区留仙三路 36 号创兴达商务大厦 2008 室</string>
     <string name="telephonenum">电话:186 8896 1937</string>
     <string name="emailaddr">邮箱:max@wingcool.cn</string>
-    <string name="version">APK版本:v0.0.0.2_20210430-内部版本</string>
+    <string name="version">APK版本:v0.0.0.2_20210514-内部版本</string>
 
-    <string name="app_name">WingCool(GT9)</string>
+    <string name="app_name">WingCoolAPK</string>
     <string name="input_num_character">0123456789ABCDEFabcdef</string>
     <string name="input_num">0123456789</string>
     <string name="databuttonsize">18p</string>