浏览代码

1.语言优化

Administrator 4 年之前
父节点
当前提交
9958a22482

+ 2 - 0
app/src/androidTest/java/com/sunzee/ExampleInstrumentedTest.java

@@ -7,4 +7,6 @@ package com.sunzee;
  */
 public class ExampleInstrumentedTest {
 
+
+
 }

+ 18 - 0
app/src/main/java/com/sunzee/model/HoleInformation.java

@@ -12,9 +12,19 @@ public class HoleInformation {
     private int state;
     /**
      * 改变状态的时间是什么时候
+     * 廁所中時間
      */
     private long timeDuration;
 
+
+
+    /**
+     *  改变状态的时间是什么时候
+     * 出了廁所的時間
+     */
+    private long outTimeDuration;
+
+
     public HoleInformation(int state, long timeDuration) {
         this.state = state;
         this.timeDuration = timeDuration;
@@ -36,6 +46,14 @@ public class HoleInformation {
         this.timeDuration = timeDuration;
     }
 
+    public long getOutTimeDuration() {
+        return outTimeDuration;
+    }
+
+    public void setOutTimeDuration(long outTimeDuration) {
+        this.outTimeDuration = outTimeDuration;
+    }
+
     @Override
     public String toString() {
         return "HoleInformation{" +

+ 74 - 18
app/src/main/java/com/sunzee/service/MyService.java

@@ -1,5 +1,6 @@
 package com.sunzee.service;
 
+import android.annotation.SuppressLint;
 import android.app.AlarmManager;
 import android.app.Notification;
 import android.app.NotificationManager;
@@ -15,6 +16,8 @@ import android.os.IBinder;
 import android.os.SystemClock;
 import android.support.annotation.Nullable;
 import android.support.annotation.RequiresApi;
+import android.telephony.TelephonyManager;
+import android.telephony.gsm.GsmCellLocation;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.WindowManager;
@@ -89,17 +92,20 @@ import okhttp3.RequestBody;
 
 public class MyService extends Service {
     private static final String TAG = "MyService";
-    private ThreadPoolMyservice mThreadPoolMyservice = new ThreadPoolMyservice();
+    private ThreadPoolMyservice mThreadPoolMyservice = new ThreadPoolMyservice();//读取一些需要一直读取,或者属于myservice的地址
     private boolean isRead = true;
     private boolean isRegularCleaning = false;
     private ThreadPoolAdvanceParameter mPoolAdvanceParameter = new ThreadPoolAdvanceParameter();
     private final static int TOTAL_SUM = 6;
 
     //存储两个数据:是否上过厕所,一开始上厕所的时间是什么时候
-    private static List<HoleInformation> sHoleInformationList = new CopyOnWriteArrayList<>();
+    //CopyOnWriteArrayList并不是完全意义上的线程安全,如果涉及到remove操作,一定要谨慎处理。
+    //写操作是加锁,读操作是不加锁的。多读少写时使用
+    private static List<HoleInformation> sHoleInformationList = new LinkedList<>();
     private static LinkedList<Integer> sCleaningLocationList = new LinkedList<>();//存储要清洗的位置。
 
     private static List<Integer> sToiletList = new CopyOnWriteArrayList<>();//存储是否上过厕所 0表示上过,1表示没有。2表示没有状态。
+    private static volatile boolean isCleanOK = false;
 
     @Nullable
     @Override
@@ -182,6 +188,7 @@ public class MyService extends Service {
         if (isRead) {
             isRead = !isRead;
             mThreadPoolMyservice.stopReadM600();
+            mThreadPoolMyservice.stopReadD2();
             mThreadPoolMyservice.startALLRead();
         }
         //startRead();
@@ -929,7 +936,9 @@ public class MyService extends Service {
                     mThreadPoolMyservice.startSetM8();
                 } else if (messageEvent.getName().equals("DD120")) {
                     mThreadPoolMyservice.stopWriteDD120();
-                    Log.d(TAG, "DD120event: ");
+                    Log.d(TAG, "addCleanTime120event: 廁所位置寫入成功");
+                    mThreadPoolMyservice.stopSetM8();
+                    mThreadPoolMyservice.startSetM8();
                 } else if (messageEvent.getName().equals("M17")) {
                     mThreadPoolMyservice.stopSetM17();
                     if (isRegularCleaning) {
@@ -938,7 +947,9 @@ public class MyService extends Service {
                         mThreadPoolMyservice.startSetM8();
                     }
                 } else if (messageEvent.getName().equals("M8")) {
+                    isCleanOK = true;
                     mThreadPoolMyservice.stopSetM8();
+                    Log.d(TAG, "addCleanTime120event: 開始清洗");
                 }
                 mPoolAdvanceParameter.stopAll();
                 mPoolAdvanceParameter.startALLRead();
@@ -979,19 +990,40 @@ public class MyService extends Service {
                         } catch (Exception e) {
                             e.printStackTrace();
                         }
-                    } else if (name.equals("X20")) {
+                    } else if (name.equals("X12")) {
                         String results = HexadecimalUtil.hexStringToByte(AsciiUtils.asciiByteArray2HexStr(responseFrame.getData()));
                         String s1 = HexadecimalUtil.flipString(results, 6).substring(0, TOTAL_SUM);//6个厕所蹲位
-                        List<String> list = Arrays.asList(s1.split(""));
-                        ArrayList<String> result = new ArrayList(list);
+                        List<String> lis = Arrays.asList(s1.split(""));//第0位会是空字符串
+                        ArrayList<String> result = new ArrayList(lis);//
                         result.remove(0);
                         if ("0".equals(result.get(0))) {
                             //是否加入清洗
-                            isClean(0);
+                            synchronized (sCleaningLocationList) {//多线程操作需要加上同步锁
+                                isClean(0);
+                            }
                         } else if ("1".equals(result.get(0))) {
                             //记录
-                            addCleanTime(0);
+                            synchronized (sCleaningLocationList) {//多线程操作需要加上同步锁
+                                addCleanTime(0);
+                            }
+                        }
+                    } else if (name.equals("D2")) {
+                        String data = String.valueOf(HexadecimalUtil.hex2dec(HexadecimalUtil.flipString(AsciiUtils.asciiByteArray2HexStr(responseFrame.getData())).get(0)));
+                        Log.d(TAG, "addCleanTimeD2event: "+data);
+                        switch (data) {
+                            case "1": //清洗完毕----清洗過程中還是清洗完畢
+                                /*if (isCleanOK) {
+                                    synchronized (sCleaningLocationList) {//多线程操作需要加上同步锁
+                                        isCleanOK = false;
+                                        sCleaningLocationList.removeFirst();
+                                        if (sCleaningLocationList.size() != 0) {
+                                            cleanPositionNumX20(sCleaningLocationList.getFirst());
+                                        }
+                                    }
+                                }*/
+                                break;
                         }
+
                     } else {
                         //通过校验
                         Log.d(TAG, "event: " + name);
@@ -1013,9 +1045,17 @@ public class MyService extends Service {
          *     存储当前的时间,到指定的集合中【标志位,0time】
          */
         HoleInformation holeInformation = sHoleInformationList.get(number);
-        if (holeInformation.getState() != 1) {
+        if (holeInformation.getState() != 1&&holeInformation.getState() != 3) {
             holeInformation.setState(1);//上厕所
             holeInformation.setTimeDuration(System.currentTimeMillis());//存储他上厕所的时间
+        }else if(holeInformation.getState() == 1){
+            if (System.currentTimeMillis() - holeInformation.getTimeDuration() > 20000) {
+                //將其標誌位上過廁所。
+                holeInformation.setState(3);
+                Log.d(TAG, "addCleanTime: 上厕所超过20秒");
+            }else{
+                Log.d(TAG, "addCleanTime: 上厕所没超过20秒");
+            }
         }
     }
 
@@ -1035,27 +1075,43 @@ public class MyService extends Service {
         HoleInformation holeInformation = sHoleInformationList.get(number);
         Log.d(TAG, "x20event: " + holeInformation.toString());
         int state = holeInformation.getState();
-        if (state != 0) {
-            if (state == 1) {
+    //    if (state != 0) {
+            if (state == 3) {
+                holeInformation.setState(4);
+                holeInformation.setOutTimeDuration(System.currentTimeMillis());//存储他上厕所的时间
+            }else if(holeInformation.getState()==4){
                 Log.d(TAG, "厕所event: " + holeInformation.getTimeDuration());
                 Log.d(TAG, "厕所event: " + System.currentTimeMillis());
                 if (System.currentTimeMillis() - holeInformation.getTimeDuration() > 20000) {
+                    //上廁所超過20秒,那麼將狀態改為上廁所狀態。
                     if (sCleaningLocationList.size() == 0) {
                         //开始清洗厕所。[往尾部添加]
-                        sCleaningLocationList.addLast(0);//如果里面已经有了,那么就需要在加入,并且添加
-                        cleanPositionNumX20(number);
+                        if (!sCleaningLocationList.contains(number)) {
+                            sCleaningLocationList.addLast(number);//如果里面已经有了,那么就需要在加入,并且添加
+                            cleanPositionNumX20(number);
+                            Log.d(TAG, "addCleanTimeisClean: "+"開始清洗");
+                        }
                     } else {
-                        //todo 这里存在一个问题,就是如果刚好,没有清洗,并且长度大于0呢?
+                        //todo 这里存在一个问题,就是如果刚好,没有清洗,并且长度大于0呢?存在多线程安全问题
                         //那么我们就需要判断是否在清洗,通过一个标志位。清洗中,清洗完毕
-                        sCleaningLocationList.addLast(0);
+                        sCleaningLocationList.addLast(number);
+                        Log.d(TAG, "addCleanTime: 清洗集合個數大於0:");
                     }
                     holeInformation.setState(0);//改为2或者0都可以。
+                    Log.d(TAG, "addCleanTime: 出廁所使用超過5秒");
                 } else {
-                    Log.d(TAG, "厕所没有超过20秒: ");
-                    holeInformation.setState(2);//为什么不是1,如果是1,那么
+                    Log.d(TAG, "addCleanTime出厕所没有超过5秒: ");
+                    //   holeInformation.setState(2);//为什么不是1,如果是1,那么
+                }
+            }else if (holeInformation.getState()==1){
+                if (holeInformation.getState()!=2) {
+                    holeInformation.setState(2);
+                    Log.d(TAG, "addCleanTime重置狀態");
                 }
             }
-        }
+      /*  }else{
+            Log.d(TAG, "isClean: 不清洗廁所!");
+        }*/
     }
 
     private void cleanPositionNumX20(int data) {

+ 14 - 8
app/src/main/java/com/sunzee/thread/myservice/MyserviceTask.java

@@ -1,7 +1,5 @@
 package com.sunzee.thread.myservice;
 
-import android.util.Log;
-
 import com.hboxs.serialport.SerialPortManager;
 import com.hboxs.serialport.SerialPortSendQueue;
 import com.hboxs.serialport.frame.ReadCommandFrame;
@@ -10,7 +8,7 @@ import com.hboxs.serialport.frame.SetCommandFrame;
 import com.hboxs.serialport.frame.WriteCommandFrame;
 import com.hboxs.serialport.util.HexUtils;
 
-import static com.sunzee.thread.myservice.MyserviceThreadType.runX20;
+import static com.sunzee.thread.myservice.MyserviceThreadType.runX12;
 
 /**
  * 长时间或者推送要执行的任务
@@ -107,24 +105,32 @@ public class MyserviceTask implements Runnable {
             case MyserviceThreadType.runDD120:
                 runWriteDD120();
                 break;
-            case runX20:
-                runX20();
-
+            case runX12:
+                runX12();
+                break;
+            case MyserviceThreadType.runD2:
+                runD2();
                 break;
 
 
         }
     }
 
+    private void runD2() {
+        if (getIsRun()) {
+            SerialPortSendQueue.sendCommand(new ReadCommandFrame("D2", 2), 1002, "D2");
+        }
+    }
+
     private void runWriteDD120() {
         if (getIsRun()) {
             SerialPortSendQueue.sendCommand(new WriteCommandFrame(address, HexUtils.hexStr2BinStr(data)), 120, "D"+address);
         }
     }
 
-    private void runX20() {
+    private void runX12() {
         if (getIsRun()) {
-            SerialPortSendQueue.sendCommand(new ReadCommandFrame("X20", 4), 20, "X20");
+            SerialPortSendQueue.sendCommand(new ReadCommandFrame("X12", 2), 12, "X12");
         }
     }
 

+ 3 - 1
app/src/main/java/com/sunzee/thread/myservice/MyserviceThreadType.java

@@ -9,6 +9,8 @@ public interface MyserviceThreadType {
     int runSet = 1;
     int runWrite = 2;
     int runD120 = 120;
-    int runX20 = 20;
+    int runX12 = 12;
     int runDD120 = 121;
+
+    int runD2= 22;
 }

+ 15 - 9
app/src/main/java/com/sunzee/thread/myservice/ThreadPoolMyservice.java

@@ -1,9 +1,5 @@
 package com.sunzee.thread.myservice;
 
-import com.sunzee.service.MyService;
-import com.sunzee.thread.homepage.HomepageTask;
-import com.sunzee.thread.homepage.HomepageThreadType;
-
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.ThreadPoolExecutor;
@@ -18,11 +14,13 @@ public class ThreadPoolMyservice {
     private ScheduledFuture<?>
             mScheduledFutureM600, mScheduledFutureM8, mScheduledFutureM17,
             mScheduledFutureSet, mScheduledFutureRst, mScheduledFutureWrite,
-            mScheduledFutureD120, mScheduledFutureX20,mScheduledFutureDD120;
+            mScheduledFutureD120, mScheduledFutureX12,mScheduledFutureDD120,
+            mScheduledFutureD2;
     private MyserviceTask
             mTaskRunM600, MTaskRunM8, MTaskRunM17,
             mTaskRunMRst, mTaskRunMSet, mTaskRunWrite,
-            mTaskRunD120, mTaskRunnX20,mTaskRunDD120;
+            mTaskRunD120, mTaskRunnX12,mTaskRunDD120,
+            mTaskRunD2;
 
     public ThreadPoolMyservice() {
         scheduled = new ScheduledThreadPoolExecutor(6);
@@ -34,8 +32,15 @@ public class ThreadPoolMyservice {
         mTaskRunM600 = new MyserviceTask(MyserviceThreadType.runM600);
         mScheduledFutureM600 = scheduled.scheduleAtFixedRate(mTaskRunM600, 0, 1000, TimeUnit.MILLISECONDS);
 
-        mTaskRunnX20 = new MyserviceTask(MyserviceThreadType.runX20);
-        mScheduledFutureX20 = scheduled.scheduleAtFixedRate(mTaskRunnX20, 0, 1000, TimeUnit.MILLISECONDS);
+        mTaskRunnX12 = new MyserviceTask(MyserviceThreadType.runX12);
+        mScheduledFutureX12 = scheduled.scheduleAtFixedRate(mTaskRunnX12, 0, 1000, TimeUnit.MILLISECONDS);
+
+        mTaskRunD2 = new MyserviceTask(MyserviceThreadType.runD2);
+        mScheduledFutureD2 = scheduled.scheduleAtFixedRate(mTaskRunD2, 0, 1000, TimeUnit.MILLISECONDS);
+    }
+
+    public void stopReadD2() {
+        stopRead(mTaskRunD2, mScheduledFutureD2);
     }
 
     public void startSetM8() {
@@ -72,7 +77,7 @@ public class ThreadPoolMyservice {
     }
 
     public void stopReadX20() {
-        stopRead(mTaskRunnX20, mScheduledFutureX20);
+        stopRead(mTaskRunnX12, mScheduledFutureX12);
     }
 
     public void startSet(String address) {
@@ -130,6 +135,7 @@ public class ThreadPoolMyservice {
         stopWriteD120();
         stopWriteDD120();
         stopReadX20();
+        stopReadD2();
     }
 
 

+ 10 - 0
app/src/main/java/com/sunzee/ui/activity/HomeActivity.java

@@ -1,5 +1,7 @@
 package com.sunzee.ui.activity;
 
+import android.annotation.SuppressLint;
+import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
@@ -13,6 +15,8 @@ import android.support.annotation.RequiresApi;
 import android.support.design.widget.NavigationView;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
+import android.telephony.TelephonyManager;
+import android.telephony.gsm.GsmCellLocation;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.MenuItem;
@@ -107,6 +111,12 @@ public class HomeActivity extends MvpActivity<HomePresenter> implements HomeView
         DownPresenter downPresenter = DownPresenter.getInstance();
         downPresenter.setProgressUpdate(this);
         mPreventSpeedClickUtil = new PreventSpeedClickUtil();
+        TelephonyManager mTelNet = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
+        @SuppressLint("MissingPermission") GsmCellLocation location = (GsmCellLocation) mTelNet.getCellLocation();
+        if (location == null) {
+            Log.d(TAG, "获取基站信息失败: ");
+        }
+
     }
 
     private void initEvent() {

+ 18 - 1
app/src/main/java/com/sunzee/ui/fragment/LanguageSetFragment.java

@@ -1,8 +1,11 @@
 package com.sunzee.ui.fragment;
 
+import android.content.res.Configuration;
+import android.content.res.Resources;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
+import android.util.DisplayMetrics;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -12,6 +15,8 @@ import com.sunzee.base.MvpFragment;
 import com.sunzee.mvp.languageset.LanguageSetPresenter;
 import com.sunzee.mvp.languageset.LanguageSetView;
 
+import java.util.Locale;
+
 /**
  * 语言设置界面 fragment
  */
@@ -21,12 +26,13 @@ public class LanguageSetFragment extends MvpFragment<LanguageSetPresenter> imple
     @Override
     public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
         View inflate = inflater.inflate(R.layout.fragment_language, container, false);
+        set("en");
         return inflate;
     }
 
     @Override
     protected LanguageSetPresenter createPresenter() {
-        return null;
+        return new LanguageSetPresenter(this);
     }
 
     @Override
@@ -38,4 +44,15 @@ public class LanguageSetFragment extends MvpFragment<LanguageSetPresenter> imple
     public void hideLoading() {
 
     }
+
+
+    private void set(String lauType) {
+        // 本地语言设置
+        Locale myLocale = new Locale(lauType);
+        Resources res = getResources();
+        DisplayMetrics dm = res.getDisplayMetrics();
+        Configuration conf = res.getConfiguration();
+        conf.locale = myLocale;
+        res.updateConfiguration(conf, dm);
+    }
 }

+ 0 - 467
app/src/main/res/layout/fragment_home.xml

@@ -1,467 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/shallowblue"
-    android:orientation="vertical"
-    android:paddingLeft="@dimen/dp_10"
-    android:paddingRight="@dimen/dp_10">
-
-    <LinearLayout
-        android:id="@+id/linearLayout3"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="12dp"
-        android:gravity="center"
-        app:layout_constraintBottom_toTopOf="@+id/linearLayout4"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent">
-
-        <LinearLayout
-            android:id="@+id/start_number_clean"
-            android:layout_width="0dp"
-            android:layout_height="@dimen/dp_55"
-            android:layout_marginRight="@dimen/dp_7"
-            android:layout_weight="1"
-            android:background="@drawable/shape_home_bottom1_rectangle"
-            android:orientation="vertical"
-            android:padding="@dimen/dp_7">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="@dimen/dp_2"
-                android:text="@string/total_cleaning_times_today"
-                android:textColor="@color/white"
-                android:textSize="@dimen/sp_7" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="767W"
-                android:textColor="@color/white"
-                android:textSize="@dimen/dp_14" />
-
-        </LinearLayout>
-
-        <RelativeLayout
-            android:layout_width="0dp"
-            android:layout_height="@dimen/dp_55"
-            android:layout_margin="@dimen/dp_5"
-            android:layout_weight="1"
-            android:background="@drawable/shape_home_bottom2_rectangle"
-            android:orientation="vertical"
-            android:padding="@dimen/dp_7">
-
-            <TextView
-                android:id="@+id/tv_sum_title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/random_cleaning_times_today"
-                android:textColor="#939494"
-                android:textSize="@dimen/sp_7" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_13"
-                android:text="767W"
-                android:textColor="@color/logo_blue"
-                android:textSize="@dimen/dp_14" />
-
-            <ImageView
-                android:layout_width="@dimen/dp_35"
-                android:layout_height="@dimen/dp_35"
-                android:layout_alignParentRight="true"
-                android:layout_marginTop="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_5"
-                android:src="@drawable/random" />
-        </RelativeLayout>
-
-        <RelativeLayout
-            android:layout_width="0dp"
-            android:layout_height="@dimen/dp_55"
-            android:layout_margin="@dimen/dp_5"
-            android:layout_weight="1"
-            android:background="@drawable/shape_home_bottom1_rectangle"
-            android:orientation="vertical"
-            android:padding="@dimen/dp_7">
-
-            <TextView
-                android:id="@+id/tv_random_title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/regular_cleaning_times_today"
-                android:textColor="@color/white"
-                android:textSize="@dimen/sp_7" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_13"
-                android:text="767W"
-                android:textColor="@color/white"
-                android:textSize="@dimen/dp_14" />
-
-            <ImageView
-                android:layout_width="@dimen/dp_35"
-                android:layout_height="@dimen/dp_35"
-                android:layout_alignParentRight="true"
-                android:layout_marginTop="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_5"
-                android:src="@drawable/timing" />
-        </RelativeLayout>
-
-        <RelativeLayout
-            android:layout_width="0dp"
-            android:layout_height="@dimen/dp_55"
-            android:layout_marginLeft="@dimen/dp_5"
-            android:layout_marginTop="@dimen/dp_5"
-            android:layout_marginBottom="@dimen/dp_5"
-            android:layout_weight="1"
-            android:background="@drawable/shape_home_bottom2_rectangle"
-            android:orientation="vertical"
-            android:padding="@dimen/dp_7">
-
-            <TextView
-                android:id="@+id/tv_data_title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="@dimen/dp_2"
-                android:text="2020-04-20"
-                android:textColor="@color/gray"
-                android:textSize="@dimen/sp_7" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_13"
-                android:text="10:35"
-                android:textColor="@color/logo_blue"
-                android:textSize="@dimen/dp_14" />
-
-            <ImageView
-                android:layout_width="@dimen/dp_35"
-                android:layout_height="@dimen/dp_35"
-                android:layout_alignParentRight="true"
-                android:layout_marginTop="@dimen/dp_10"
-                android:layout_marginRight="@dimen/dp_5"
-                android:src="@drawable/time" />
-        </RelativeLayout>
-    </LinearLayout>
-
-    <LinearLayout
-
-        android:id="@+id/linearLayout4"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:layout_marginBottom="13dp"
-        android:background="@drawable/shape_home_malfunction_rectangle"
-        android:padding="@dimen/dp_5"
-        app:layout_constraintBottom_toTopOf="@+id/linearLayout"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/fault_today"
-            android:textColor="@color/logo_blue"
-            android:textSize="@dimen/sp_7" />
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:gravity="right"
-            android:textSize="@dimen/sp_9">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_8"
-                android:text="@string/untreated"
-                android:textSize="@dimen/sp_6" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_5"
-                android:layout_marginRight="@dimen/dp_5"
-                android:text="24"
-                android:textColor="@color/bright_blue"
-                android:textSize="@dimen/sp_10" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/a"
-                android:textSize="@dimen/sp_6" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_8"
-                android:text="@string/fault_today"
-                android:textSize="@dimen/sp_6" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_5"
-                android:layout_marginRight="@dimen/dp_5"
-                android:text="12"
-                android:textColor="@color/orange"
-                android:textSize="@dimen/sp_10" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/a"
-                android:textSize="@dimen/sp_6" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_8"
-                android:text="@string/complete"
-                android:textSize="@dimen/sp_6" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_5"
-                android:layout_marginRight="@dimen/dp_5"
-                android:text="12"
-                android:textColor="#385AA8"
-                android:textSize="@dimen/sp_10" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/a"
-                android:textSize="@dimen/sp_6" />
-        </LinearLayout>
-
-
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/linearLayout"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/linearLayout4">
-
-        <LinearLayout
-            android:layout_width="@dimen/dp_140"
-            android:layout_height="@dimen/dp_80"
-            android:layout_marginTop="@dimen/dp_5"
-            android:layout_marginRight="@dimen/dp_5"
-            android:layout_marginBottom="@dimen/dp_5"
-            android:background="@drawable/shape_home_bottom2_rectangle"
-            android:orientation="vertical"
-            android:padding="@dimen/dp_7">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginRight="@dimen/dp_40"
-                android:text="@string/flow_people_today"
-                android:textColor="#3E5DA8"
-                android:textSize="@dimen/sp_7" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:gravity="center"
-                android:orientation="vertical">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/dp_10"
-                    android:text="7677W"
-                    android:textColor="@color/orange"
-                    android:textSize="@dimen/dp_16" />
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/dp_5"
-                    android:text="@string/traffic_was"
-                    android:textSize="@dimen/sp_6" />
-            </LinearLayout>
-        </LinearLayout>
-
-        <LinearLayout
-            android:layout_width="@dimen/dp_200"
-            android:layout_height="@dimen/dp_80"
-            android:layout_margin="@dimen/dp_5"
-            android:background="@drawable/shape_home_bottom2_rectangle"
-            android:orientation="vertical"
-            android:padding="@dimen/dp_7">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginRight="@dimen/dp_70"
-                android:text="@string/cleaning_method"
-                android:textColor="#3E5DA8"
-                android:textSize="@dimen/sp_7" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:gravity="center">
-
-                <RelativeLayout
-                    android:id="@+id/rl_clear"
-                    android:layout_width="@dimen/dp_80"
-                    android:layout_height="match_parent"
-                    android:layout_margin="@dimen/dp_5"
-                    android:background="@drawable/shape_clearblue_rectangle">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:padding="@dimen/dp_5"
-                        android:text="@string/start_cleaning"
-                        android:textColor="@color/white"
-                        android:textSize="@dimen/dp_8" />
-
-                    <ImageView
-                        android:layout_width="@dimen/dp_40"
-                        android:layout_height="@dimen/dp_40"
-                        android:layout_alignParentRight="true"
-                        android:layout_alignParentBottom="true"
-                        android:src="@drawable/timing2" />
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:layout_width="@dimen/dp_80"
-                    android:layout_height="match_parent"
-                    android:layout_margin="@dimen/dp_5"
-                    android:background="@drawable/shape_clearorgle_rectangle">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:padding="@dimen/dp_5"
-                        android:text="@string/regular_cleaning"
-                        android:textColor="@color/white"
-                        android:textSize="@dimen/dp_8" />
-
-                    <ImageView
-                        android:layout_width="@dimen/dp_40"
-                        android:layout_height="@dimen/dp_40"
-                        android:layout_alignParentRight="true"
-                        android:layout_alignParentBottom="true"
-                        android:src="@drawable/time2" />
-                </RelativeLayout>
-            </LinearLayout>
-
-
-        </LinearLayout>
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_80"
-            android:layout_marginLeft="@dimen/dp_5"
-            android:layout_marginTop="@dimen/dp_5"
-            android:layout_marginBottom="@dimen/dp_5"
-            android:background="@drawable/shape_home_bottom2_rectangle"
-            android:orientation="vertical"
-            android:padding="@dimen/dp_7">
-
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginRight="@dimen/dp_70"
-                android:text="@string/environmental_testing"
-                android:textColor="#3E5DA8"
-                android:textSize="@dimen/sp_7" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/sp_8"
-                android:gravity="center">
-
-                <TextView
-                    android:layout_width="@dimen/dp_28"
-                    android:layout_height="@dimen/dp_28"
-                    android:layout_marginRight="@dimen/dp_28"
-                    android:background="@drawable/shape_hollow_circle_wendu"
-                    android:gravity="center"
-                    android:text="40°"
-                    android:textColor="#ffd95e"
-                    android:textSize="@dimen/sp_8" />
-
-                <TextView
-                    android:layout_width="@dimen/dp_28"
-                    android:layout_height="@dimen/dp_28"
-                    android:layout_marginRight="@dimen/dp_28"
-                    android:background="@drawable/shape_hollow_circle_shidu"
-                    android:gravity="center"
-                    android:text="40°"
-                    android:textColor="#437dff"
-                    android:textSize="@dimen/sp_8" />
-
-                <TextView
-                    android:layout_width="@dimen/dp_28"
-                    android:layout_height="@dimen/dp_28"
-                    android:layout_marginLeft="@dimen/dp_5"
-                    android:layout_marginRight="@dimen/dp_5"
-                    android:background="@drawable/shape_hollow_circle_huanjing"
-                    android:gravity="center"
-                    android:text="40°"
-                    android:textColor="#57f3ff"
-                    android:textSize="@dimen/sp_8" />
-
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_marginTop="@dimen/sp_8"
-                android:gravity="center">
-
-                <TextView
-                    android:layout_width="@dimen/dp_28"
-                    android:layout_height="@dimen/dp_28"
-                    android:layout_marginRight="@dimen/dp_30"
-                    android:gravity="center"
-                    android:text="@string/temperature"
-                    android:textColor="@color/logo_blue"
-                    android:textSize="@dimen/sp_6" />
-
-                <TextView
-                    android:layout_width="@dimen/dp_28"
-                    android:layout_height="@dimen/dp_28"
-                    android:layout_marginRight="@dimen/dp_30"
-                    android:gravity="center"
-                    android:text="@string/humidity"
-                    android:textColor="@color/logo_blue"
-                    android:textSize="@dimen/sp_6" />
-
-                <TextView
-                    android:layout_width="@dimen/dp_40"
-                    android:layout_height="@dimen/dp_28"
-                    android:gravity="center"
-                    android:text="@string/environmental_comfort_index"
-                    android:textColor="@color/logo_blue"
-                    android:textSize="@dimen/sp_6" />
-
-            </LinearLayout>
-        </LinearLayout>
-    </LinearLayout>
-
-
-</android.support.constraint.ConstraintLayout>

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

@@ -0,0 +1,462 @@
+<resources>
+
+    <string name="app_name">CleanMachine</string>
+    <string name="action_settings">Settings</string>
+
+    <string name="net_error"> The network is not strong </string>
+    <string name="title">Cleaning robot</string>
+    <string name="text0">Button 1</string>
+    <string name="text1">Test mail interface</string>
+    <string name="text2">getOrderStatus</string>
+    <string name="start_time"> start time</string>
+    <string name="end_start"> end time</string>
+    <string name="hours"> hours</string>
+    <string name="day">Day</string>
+    <string name="month"> month</string>
+    <string name="year">year</string>
+    <string name="screening"> screening</string>
+    <string name="Input_time"> please enter the time and date</string>
+    <string name="show_material"> view materials</string>
+    <string name="debug"> debugging page</string>
+    <string name="alarm_record"> alarm record</string>
+    <string name="general_parameter"> general parameters</string>
+    <string name="advance_parameter"> advanced parameters</string>
+    <string name="network_selection"> network selection</string>
+    <string name="bright"> brightness </string>
+    <string name="volume"> volume</string>
+    <string name="modify"> confirm the modification</string>
+    <string name="contact">Machine contact person</string>
+    <string name="contact1">Contact person</string>
+    <string name="black">Return to the client</string>
+    <string name="input_confirm_password"> please enter the confirm password</string>
+    <string name="input_new_password"> please enter a new password</string>
+    <string name="input_older_password"> please enter the old password</string>
+    <string name="older_password"> old password:</string>
+    <string name="confirm_password"> Confirm password:</string>
+    <string name="new_password"> new password:</string>
+    <string name="environmental_comfort_index"> environmental comfort index </string>
+    <string name="humidity"> humidity </string>
+    <string name="temperature">temperature</string>
+    <string name="environmental_testing"> environmental testing </string>
+    <string name="regular_cleaning"> regular cleaning </string>
+    <string name="start_cleaning"> start cleaning </string>
+    <string name="cleaning_method"> cleaning method</string>
+    <string name="traffic_was"> People flow </string>
+    <string name="update"> update</string>
+    <string name="flow_people_today"> flow of people today</string>
+    <string name="temperature_humidity"> temperature and humidity</string>
+    <string name="a"> a</string>
+    <string name="complete"> processed</string>
+    <string name="enter_password"> please enter the password</string>
+    <string name="input_use_name"> please enter the user name</string>
+    <string name="fault_today"> today’s fault </string>
+    <string name="vsersion"> version number 1.0.0</string>
+    <string name="is_update"> check for updates</string>
+    <string name="connect_server"> connection server</string>
+    <string name="time"> time</string>
+    <string name="error_events"> error event</string>
+    <string name="note"> Remarks</string>
+    <string name="total_cleaning_times_today">total cleaning times today</string>
+    <string name="random_cleaning_times_today"> random cleaning times today </string>
+    <string name="regular_cleaning_times_today"> the number of regular cleaning times today</string>
+    <string name="contact_phone_number"> contact number</string>
+    <string name="enter_contact_number"> please enter the contact number</string>
+    <string name="untreated">Untreated</string>
+    <string name="managemen_system"> connection management system</string>
+    <string name="server_id"> please enter the management system id</string>
+
+    <string name="warring_msg"> alarm prompt </string>
+    <string name="warring_content"> machine failure: please contact fuselage maintenance</string>
+    <string name="warring_content1"> Machine failure: please contact the fuselage maintenance staff Tel: </string>
+
+    <string name="hint_pas"> please enter the password</string>
+    <string name="login"> login</string>
+    <string name="back_to_user"> return to the client </string>
+
+    <string name="system_setting"> system settings</string>
+    <string name="check_update"> check for updates</string>
+    <string name="change_price"> commodity price adjustment</string>
+    <string name="reset_pass"> reset password </string>
+    <string name="language_setting"> language settings</string>
+    <string name="pay_type"> payment method</string>
+    <string name="data_statistics"> data statistics </string>
+    <string name="other"> other</string>
+    <string name="parameter_adjustment"> parameter adjustment</string>
+    <string name="check_thing"> view materials</string>
+    <string name="ad_man"> advertising management </string>
+    <string name="check_in"> maintenance personnel sign in</string>
+    <string name="maintain_state_upload"> maintenance report </string>
+    <string name="connected_server"> has been connected to the management system</string>
+    <string name="server_name">aaa1234567bb</string>
+    <string name="disconnect_server"> out of the system</string>
+
+    <string name="confirm_reminder"> confirmation reminder</string>
+    <string name="confirm_content"> Are you sure to apply for leaving the system? </string>
+    <string name="guang_ji"> Turn on/off prompt </string>
+    <string name="guang_ji1">Whether to boot immediately? </string>
+    <string name="guan_ji_now"> Shut down immediately</string>
+    <string name="open_now"> Turn on immediately</string>
+    <string name="confirm"> OK</string>
+    <string name="cancel"> cancel</string>
+
+    <string name="apply_connect"> apply for remote connection system </string>
+    <string name="apply_now"> apply now</string>
+
+    <string name="net_choose"> network selection </string>
+    <string name="net_4g">4G</string>
+    <string name="net_wifi">WIFI</string>
+    <string name="screen_light"> screen brightness </string>
+    <string name="vioce"> system volume </string>
+    <string name="robot_contacts"> machine contacts </string>
+    <string name="contacts"> Contacts</string>
+    <string name="way_contacts"> contact information</string>
+    <string name="update_success"> update successfully</string>
+
+    <string name="old_pas"> old password:</string>
+    <string name="new_pas"> new password:</string>
+    <string name="confirm_pas"> confirm password:</string>
+    <string name="old_pas_hint"> please enter the old password</string>
+    <string name="new_pas_hint"> please enter a new password</string>
+    <string name="confirm_pas_hint"> please enter the confirm password</string>
+    <string name="confirm_revision"> confirm modification </string>
+    <string name="modified_success"> modified successfully </string>
+    <string name="modified_failed"> modification failed </string>
+
+
+    <string name="par_currency"> general parameters</string>
+    <string name="par_advanced"> advanced parameters</string>
+    <string name="hint_compensate"> please enter the parameters</string>
+    <string name="x">x</string>
+    <string name="y">y</string>
+    <string name="z">z</string>
+
+    <string name="second">seconds</string>
+    <string name="chinese">Chinese</string>
+    <string name="english">English</string>
+    <string name="reset"> OK to modify </string>
+
+
+
+    <string name="operate"> operation</string>
+    <string name="upload_now"> report immediately</string>
+
+    <string name="none"> None</string>
+
+    <string name="address"> address</string>
+    <string name="content"> content</string>
+    <string name="state"> state</string>
+    <string name="undefined">undefined</string>
+
+    <string name="x_check_lose_step"> Lost step detection </string>
+    <string name="x_check_stove_turn"> furnace head rotation detection </string>
+
+
+    <string name="y_air_pump"> air pump</string>
+    <string name="y_water_pump"> water pump </string>
+    <string name="y_heating_mg"> electromagnetic heating </string>
+    <string name="y_fan_exhaust"> exhaust fan</string>
+    <string name="y_tick_motor"> the stick motor </string>
+    <!-- <string name="y_tick_motor"></string>-->
+    <string name="y_humidifier"> humidifier</string>
+    <string name="y_fan_dissipate_heat"> Coil cooling fan </string>
+
+    <string name="door_2"></string>
+    <string name="air_pump_start"> air pump start </string>
+    <string name="clear"> cleaning</string>
+    <string name="stove_fan"> Coil cooling fan </string>
+    <string name="fan_exhaust"> exhaust fan </string>
+
+    <string name="add"> add</string>
+    <string name="clean"> clear </string>
+    <string name="clean_already"> has been cleared </string>
+    <string name="add_already"> has been added</string>
+
+    <string name="order_statistics"> order statistics </string>
+    <string name="type_contrast"> fancy statistics </string>
+
+    <string name="order_count"> data statistics/order statistics</string>
+    <string name="fancy_count"> data statistics/fancy statistics </string>
+    <string name="time_start"> start time</string>
+    <string name="time_chose_start"> choose the start time </string>
+    <string name="time_end"> end time</string>
+    <string name="time_chose_end"> choose the end time </string>
+    <string name="contract"> contrast</string>
+    <string name="unit"> unit</string>
+    <string name="fancy"> flower type</string>
+    <string name="all"> all</string>
+    <string name="screen"> screening</string>
+    <string name="hour">hour</string>
+    <string name="small"> Huatang cotton small </string>
+    <string name="big">white cotton big</string>
+
+    <string name="error_thing"> error event</string>
+    <string name="remark"> Remarks</string>
+
+    <string name="img">Picture</string>
+    <string name="video">Video</string>
+    <string name="type"> type</string>
+    <string name="play_time"> play time</string>
+    <string name="create_time"> creation time</string>
+    <string name="ad_1"> Cotton candy advertising </string>
+    <string name="ad_2"> The right publicity advertisement </string>
+    <string name="choose_1">Select display</string>
+    <string name="choose_2"> currently displayed</string>
+    <string name="ad_content"> Are you sure to select the ad for display</string>
+
+    <string name="get_data"> is getting data...</string>
+    <string name="get_update"> The update is successful, data is being obtained...</string>
+
+    <string name="warring_forward_obstaclesM600">No.1 There are obstacles to advancement</string>
+    <string name="warring_falling_blockM601">No.2 There are obstacles to falling </string>
+    <string name="warring_x_axis_stepM602"> No.3 X axis lost step </string>
+    <string name="warring_y_axis_stepM603">No.4 Y-axis lost step</string>
+    <string name="iox2">Z-axis in-situ sensor</string>
+    <string name="iox3">Y-axis in-situ sensor</string>
+    <string name="iox4">X-axis in-situ sensor</string>
+    <string name="iox5">A-axis level in place</string>
+    <string name="iox7"> Forward induction (E-axis in-situ sensor) </string>
+    <string name="iox10"> Decline induction</string>
+    <string name="iox11"> Emergency stop NC</string>
+    <string name="iox12"> leave blank for standby</string>
+    <string name="iox13"> leave blank for standby</string>
+    <string name="iox14"> leave blank for standby</string>
+    <string name="iox15"> leave blank for standby</string>
+    <string name="iox16"> leave blank for standby</string>
+    <string name="iox17"> leave blank for standby</string>
+    <string name="iox20"> Squatting 1 human body sensor </string>
+    <string name="iox21"> Squat 2 human body sensor </string>
+    <string name="iox22"> Squat 3 human body sensor </string>
+    <string name="iox23"> Squat 4 human body sensor </string>
+    <string name="iox24"> squatting position 5 human body sensor </string>
+    <string name="iox25"> Squat 6 human body sensor </string>
+    <string name="iox26"> leave blank for standby</string>
+    <string name="iox27"> leave blank for standby</string>
+
+
+    <string name="ioy0">X-axis PLS pulse </string>
+    <string name="ioy1">Y-axis PLS pulse </string>
+    <string name="ioy2"> E axis PLS pulse </string>
+    <string name="ioy3">A axis PLS pulse </string>
+    <string name="ioy4"> X-axis DIR direction</string>
+    <string name="ioy5">Y-axis DIR direction</string>
+    <string name="ioy6">E axis DIR direction</string>
+    <string name="ioy7"> A axis PLS direction</string>
+    <string name="ioy10">Z-axis forward rotation (elongation)</string>
+    <string name="ioy11">Z-axis reversal (recovery)</string>
+    <string name="ioy12"> Clean and disinfect water pump spray </string>
+    <string name="ioy13"> start the spray pump</string>
+    <string name="ioy14"> Clean toilet spirit</string>
+    <string name="ioy15">Steam-water conversion solenoid valve</string>
+    <string name="ioy16"> Disinfectant</string>
+    <string name="ioy17"> indicator light</string>
+    <string name="ioy20"> Squat 1 work light </string>
+    <string name="ioy21"> Squat 2 working light </string>
+    <string name="ioy22"> squatting 3 working lights </string>
+    <string name="ioy23"> squatting 4 working lights </string>
+    <string name="ioy24"> squatting position 5 work lights </string>
+    <string name="ioy25"> squatting 6 working lights </string>
+
+
+    <string name="describe">description</string>
+
+    <string name="update_price_success"> price adjustment is successful</string>
+    <string name="update_price_failed"> price adjustment failed</string>
+    <string name="heart_success"> Heartbeat success </string>
+    <string name="heart_failed"> heartbeat failure </string>
+
+    <string name="reminder"> Warm reminder</string>
+    <string name="eq_no_pay"> The device has not yet set the payment method</string>
+    <string name="set_pay"> Please set the payment method</string>
+    <string name="ple_connect"> Please connect to the server first, and then operate</string>
+    <string name="no_cid"> failed to obtain the device id, please make sure you have connected to the network</string>
+    <string name="sync"> Is it synchronized?</string>
+    <string name="sync1"> The content to be synchronized is as follows:</string>
+    <string name="sync_now"> is synchronizing</string>
+
+    <string name="synchronizing"> In synchronization...</string>
+    <string name="sync_success"> (synchronization success)</string>
+    <string name="no_sync"> (not synchronized)</string>
+    <string name="sync_content"> is synchronizing content:</string>
+    <string name="sync_product"> product data</string>
+    <string name="sync_pas">admin/guest password</string>
+
+
+    <string name="already_connect"> The device has been connected</string>
+    <string name="connecting"> application for connection</string>
+    <string name="connecting1">In the equipment application, please wait for the background consent</string>
+    <string name="rejected"> The device has been rejected, please reconnect</string>
+    <string name="rejected1"> The equipment application is approved and the connection is successful</string>
+    <string name="connect_success"> successfully connected</string>
+    <string name="empty_password"> password cannot be empty </string>
+    <string name="empty_account_pas"> account password cannot be empty </string>
+    <string name="already_have"> the device already exists, whether to synchronize the content used</string>
+
+
+    <string name="minute"> minutes</string>
+
+
+    <string name="select_date"> select date</string>
+    <string name="current_date"> current date</string>
+    <string name="select_time"> select time</string>
+    <string name="current_time"> current time</string>
+    <string name="qsrlxfs"> Please enter contact information</string>
+    <string name="qsrlxr"> Please enter a contact person</string>
+    <string name="mmbyz"> The two passwords are inconsistent, please re-enter</string>
+    <string name="no_data"> Please select the time to obtain the data</string>
+    <string name="no_data_time"> There is no data for this time period, please select the time again</string>
+    <string name="no_select_time"> selected time cannot be empty</string>
+    <string name="select_right_time"> Please choose the correct time</string>
+
+    <string name="qdsy"> sure to use</string>
+    <string name="qxsy"> cancel use</string>
+    <string name="qxxs"> cancel the display </string>
+    <string name="qxxs_content"> whether to cancel the display of the advertisement</string>
+
+    <string name="have_update_content1"> found a new version v</string>
+    <string name="have_update_content2"> Whether to update immediately? </string>
+    <string name="update_now"> update immediately </string>
+    <string name="version_name"> version number:</string>
+    <string name="no_update"> The current version is the latest version</string>
+    <string name="download_now"> is downloading...</string>
+
+
+    <string name="coin_warring1"> If you have any questions, please contact the customer service staff phone</string>
+    <string name="open_operate"> Please start the operation again </string>
+    <string name="coin_success"> coin insertion is successful</string>
+    <string name="choose_time"> please enter the time</string>
+
+    <string name="year_input">Please enter the year</string>
+    <string name="month_input">Please enter the month</string>
+    <string name="day_input"> Please enter the number of days</string>
+    <string name="hour_input">Please enter the hour</string>
+
+    <string name="ringht_month_input"> please enter the correct month</string>
+    <string name="ringht_day_input"> Please enter the correct number of days</string>
+    <string name="ringht_hour_input"> Please enter the correct hour</string>
+
+    <string name="ljlj"> Connect immediately</string>
+    <string name="unsav_wifi"> whether to cancel saving the WiFi password</string>
+    <string name="unsav_wifi1"> cancel save</string>
+    <!--The production failed, please contact the customer service staff phone: -->
+
+
+    <string name="current_time1"> current time:</string>
+    <string name="equipment_no"> equipment number:</string>
+
+    <string name="coin_pay"> coin payment</string>
+
+    <string name="order_online_sta"> data statistics / online order query </string>
+    <string name="order_underline_sta"> data statistics / offline order query </string>
+    <string name="synchroniz_fail"> advertisement download failed, please check whether the background advertisement data is wrong</string>
+    <string name="warring_khmkmcs"> customer door opening timeout </string>
+    <string name="warring_ztxhcs"> do sugar cycle timeout </string>
+
+    <string name="order_coin_statistics"> coin order statistics </string>
+    <string name="order_no_pay_statistics"> No need to pay order statistics </string>
+
+    <string name="order_online"> online order query</string>
+    <string name="order_underline"> offline order query</string>
+
+
+    <string name="zfcg"> payment is successful</string>
+    <string name="qxzwjbf"> Please select the file to play</string>
+    <string name="zzz"> in production</string>
+    <string name="ljsb"> connection failed, please make sure to connect to the system id</string>
+    <string name="wifimmcw"> wifi password error</string>
+    <string name="wifi_connection_successful"> wifi connection is successful</string>
+    <string name="glyid"> input management id can not be empty </string>
+    <string name="bzc"> temporarily does not support this function</string>
+    <string name="shibai"> failed to switch 4g</string>
+    <string name="tian"> time cannot exceed two days</string>
+    <string name="yue"> time cannot exceed one month</string>
+    <string name="xgwc"> Modification is complete</string>
+    <string name="kssj"> The start time cannot be greater than the end time or the time cannot be the same </string>
+    <string name="adlcg"> admin login successfully </string>
+    <string name="gdlcg"> guest login successfully </string>
+    <string name="yues"> time cannot exceed 12 months</string>
+    <string name="sjcw"> time error </string>
+    <string name="nian"> time cannot exceed 10 years</string>
+    <string name="kjcg"> Shutdown success </string>
+    <string name="gjcg"> boot successfully </string>
+    <string name="idsb">id acquisition failed, please check the network</string>
+    <string name="yjcsh"> The equipment has been initialized</string>
+    <string name="dlsb"> login failed</string>
+    <string name="shuru"> enter the password after seconds </string>
+    <string name="pelase"> please here</string>
+
+
+    <string name="order_no"> order number</string>
+    <string name="order_input"> please enter the order number</string>
+    <string name="order_state"> order status</string>
+    <string name="order_name"> product name</string>
+    <string name="no_pay"> not paid</string>
+    <string name="already_pay"> has been paid</string>
+    <string name="refund_ing"> Refunding</string>
+    <string name="already_refund"> ​​has been refunded</string>
+    <string name="loading_all"> all loading is complete</string>
+    <string name="loading"> is being loaded</string>
+    <string name="price"> price</string>
+    <string name="wechat_pay"> WeChat payment</string>
+    <string name="alipay_pay"> Alipay payment</string>
+    <string name="order_pay_timer"> order payment time </string>
+    <string name="order_create_timer"> order creation time </string>
+    <string name="no">Serial number</string>
+    <string name="cgjc"> The stick check is prohibited </string>
+    <string name="zdcg"> automatic stick out</string>
+
+    <string name="exit_app"> Do you want to exit this App? </string>
+    <string name="reset_system"> Do you want to restart the system? </string>
+    <string name="show"> display pattern </string>
+    <string name="not_null"> input data can not be empty </string>
+    <string name="advance_parameter_1">X-axis zero return speed</string>
+    <string name="advance_parameter_2"> X axis crawling speed </string>
+    <string name="advance_parameter_3">Y-axis zero return speed</string>
+    <string name="advance_parameter_4"> Y axis crawling speed </string>
+    <string name="advance_parameter_5"> E-axis zero return speed </string>
+    <string name="advance_parameter_6"> E axis crawling speed </string>
+    <string name="advance_parameter_7"> X axis acceleration </string>
+    <string name="advance_parameter_8"> X axis deceleration </string>
+    <string name="advance_parameter_9"> Y axis acceleration</string>
+    <string name="advance_parameter_10"> Y axis deceleration </string>
+    <string name="advance_parameter_11"> E axis acceleration </string>
+    <string name="advance_parameter_12"> E axis deceleration </string>
+    <string name="advance_parameter_13"> the third stop time of the burner </string>
+    <string name="advance_parameter_14"> furnace head first section temperature (%) </string>
+    <string name="advance_parameter_15"> The second section temperature of the furnace head (%) </string>
+    <string name="advance_parameter_16">X-axis zero compensation</string>
+    <string name="advance_parameter_17">Y axis zero compensation</string>
+    <string name="advance_parameter_18">Z-axis zero compensation</string>
+    <string name="advance_parameter_25"> add water to the water tank</string>
+    <string name="advance_parameter_26"> the multiplier of the number of coins</string>
+    <string name="edit_no_null"> input box cannot be empty</string>
+    <string name="pro_motioncode"> online/discount code payment</string>
+    <string name="role"> Authority management </string>
+    <string name="y_stick_motor"> stick motor </string>
+    <string name="y_humidifier_water_pump"> humidifier water pump </string>
+    <string name="service_contact">Service Contact:</string>
+    <string name="service_line">Service complaint hotline:</string>
+    <string name="y_dir_x"> X axis DIR</string>
+    <string name="humidifier_water_leve_detection"> humidifier water level detection </string>
+    <string name="signal_strength"> Hello, the current machine signal is weak, does not support buying cotton candy! Thank you! </string>
+    <string name="no_continuous_oepn_close_chance"> Please switch the machine after %1$d seconds! </string>
+    <string name="mdbxinyongka"> MDB credit card</string>
+    <string name="coin_pulse"> the number of coins pulse divided by x value </string>
+    <string name="oldpas"> The original password is incorrect </string>
+    <string name="all_clean"> All squatting positions are clean </string>
+    <string name="debug_1">A-axis forward rotation (horizontal trend)</string>
+    <string name="debug_2"> A-axis reversal (vertical trend) </string>
+    <string name="debug_3"> Start the spray pump</string>
+    <string name="debug_4"> Air pump start </string>
+    <string name="debug_5"> Clean and disinfect water spray pump </string>
+    <string name="debug_6">Clean the toilet spirit + water </string>
+    <string name="debug_7"> Disinfectant + water </string>
+    <string name="start_cleaning_content"> whether to start cleaning? </string>
+    <string name="hole_lamp1"> squat 1 work lamp</string>
+    <string name="hole_lamp2"> squat 2 working lamp</string>
+    <string name="hole_lamp3"> squatting 3 working lights </string>
+    <string name="hole_lamp4"> squat 4 work lights </string>
+    <string name="hole_lamp5"> squatting position 5 work lights </string>
+    <string name="hole_lamp6"> squatting 6 working lights </string>
+    <string name="ioy27">Z axis solenoid valve</string>
+
+</resources>

+ 5 - 146
app/src/main/res/values/strings.xml

@@ -69,16 +69,6 @@
     <string name="warring_content">机器故障:请联系机身维护</string>
     <string name="warring_content1">机器故障:请联系机身维护人员电话:</string>
 
-    <string name="wendu">柜内温度</string>
-    <string name="shidu">柜内湿度</string>
-    <string name="lutou">炉头温度</string>
-    <string name="zhuansu">炉头转速</string>
-
-    <string name="pay_choose">选择支付方式</string>
-    <string name="welcome">欢迎!</string>
-
-    <string name="user_login">用户登录</string>
-    <string name="hint_account">请输入账号</string>
     <string name="hint_pas">请输入密码</string>
     <string name="login">登录</string>
     <string name="back_to_user">返回用户端</string>
@@ -133,141 +123,25 @@
     <string name="modified_failed">修改失败</string>
 
 
-    <string name="par_dianji">电机参数</string>
     <string name="par_currency">通用参数</string>
     <string name="par_advanced">进阶参数</string>
-    <string name="compensate_origin">原点位置补偿</string>
-    <string name="compensate_man_take">人取位置补偿</string>
-    <string name="compensate_shutdown">关机位置补偿</string>
     <string name="hint_compensate">请输入参数</string>
     <string name="x">x</string>
     <string name="y">y</string>
     <string name="z">z</string>
 
-    <string name="parameter_1">蜂鸣器报警间隔时间</string>
-    <string name="parameter_2">报警灯闪烁间隔时间</string>
-    <string name="parameter_3">炉头工作温度</string>
-    <string name="parameter_4">炉头低速</string>
-    <string name="parameter_5">炉头中速</string>
-    <string name="parameter_6">炉头高速</string>
-    <string name="parameter_7">炉头N秒后进入低功耗</string>
-    <string name="parameter_8">炉头进入低功耗温度</string>
-    <string name="parameter_9">炉头进入待机时间</string>
-    <string name="parameter_10">水泵开启时间</string>
-    <string name="parameter_11">风机吹气时间</string>
-    <string name="parameter_12">手动门关闭等待时间</string>
-    <string name="parameter_13">第N次循环后自复位</string>
-    <string name="parameter_14">加湿器回差调节</string>
-    <string name="parameter_15">炉头N秒后进入待机</string>
-    <string name="parameter_16">炉头进入待机温度</string>
-    <string name="parameter_18">循环风机启动温度</string>
-    <string name="parameter_25">关机炉头清洗次数</string>
-    <string name="parameter_26">低温环境设定(炉头升柜温)</string>
-    <string name="parameter_27">高温环境设定(外循环风机)</string>
-    <string name="parameter_28">炉头清洗次数(炉头升柜温)</string>
-    <string name="parameter_29">炉头喷水时间(炉头升柜温)</string>
-    <string name="parameter_30">低温环境回差(炉头升柜温)</string>
-    <string name="parameter_31">基准温度</string>
-    <string name="parameter_32">基准系数</string>
-    <string name="parameter_33">基准湿度</string>
-    <string name="parameter_34">柜内允许做糖温度误差</string>
-    <string name="parameter_35">柜内允许做糖湿度误差</string>
-    <string name="second">秒</string>
+   <string name="second">秒</string>
     <string name="chinese">中文</string>
     <string name="english">English</string>
     <string name="reset">确定修改</string>
 
-    <string name="error_door_hand">手动门异常</string>
-    <string name="error_door_auto">自动门异常</string>
-    <string name="error_humidifier">加湿器异常</string>
-    <string name="error_fan_sugar">送糖风机异常</string>
-    <string name="error_fan_loop">循环风机异常</string>
-    <string name="error_fan_exhaust">排风风机异常</string>
-    <string name="error_coin">投币异常</string>
-    <string name="error_screen">触摸屏异常</string>
-    <string name="error_power">电源异常</string>
-    <string name="error_qrcode">扫码支付异常</string>
-    <string name="error_machine_hand">机械手异常</string>
-    <string name="error_stick">No.16 插棍异常</string>
-    <string name="error_furnace_head">炉头异常</string>
-
-    <string name="error_plc">PLC故障</string>
-    <string name="error_type">故障类型</string>
-    <string name="error_detail">故障详情</string>
+
+
     <string name="operate">操作</string>
     <string name="upload_now">立即上报</string>
 
-    <string name="door_hand_1">无法锁到底</string>
-    <string name="door_hand_2">上下滑动不顺畅</string>
-    <string name="door_hand_3">磁吸锁损坏</string>
-    <string name="door_hand_4">线接头松动,导致不通电</string>
-
-    <string name="door_auto_1">推杆损坏</string>
-    <string name="door_auto_2">继电器损坏</string>
-    <string name="door_auto_3">气缸线接头松动</string>
-
-    <string name="humidifier_1">加湿器漏水</string>
-    <string name="humidifier_2">水泵损坏,无法抽水</string>
-    <string name="humidifier_3">雾化器损坏</string>
-    <string name="humidifier_4">水位器损坏</string>
-    <string name="humidifier_5">控制加湿器的继电器损坏</string>
-
-    <string name="fan_sugar_1">风机压力不足</string>
-    <string name="fan_sugar_2">风机损坏</string>
-    <string name="fan_sugar_3">风机线接头松动</string>
-    <string name="fan_sugar_4">控制风机的继电器损坏</string>
-
-    <string name="furnace_head_1">炉头盖堵塞</string>
-    <string name="furnace_head_2">炉头盖变形,更换新炉头盖</string>
-    <string name="furnace_head_3">发热线圈烧坏</string>
-    <string name="furnace_head_4">送糖不锈钢管磨穿</string>
-    <string name="furnace_head_5">炉头轴承损坏</string>
-    <string name="furnace_head_6">炉头卡死</string>
-    <string name="furnace_head_7">碳刷磨损</string>
-    <string name="furnace_head_8">炉头电机损坏</string>
-    <string name="furnace_head_9">炉头电机接头接触不良</string>
-    <string name="furnace_head_10">转速探头坏了/接头接触不良</string>
-    <string name="furnace_head_11">热电偶线接触不良</string>
-
-    <string name="machine_hand_1">传感器损坏</string>
-    <string name="machine_hand_2">X轴电机损坏</string>
-    <string name="machine_hand_3">Y轴电机损坏</string>
-    <string name="machine_hand_4">Z轴电机损坏</string>
-    <string name="machine_hand_5">E轴电机损坏</string>
-    <string name="machine_hand_6">线接头接触不良</string>
-    <string name="machine_hand_7">X轴驱动器损坏</string>
-    <string name="machine_hand_8">Y轴驱动器损坏</string>
-    <string name="machine_hand_9">Z轴驱动器损坏</string>
-    <string name="machine_hand_10">E轴驱动器损坏</string>
-    <string name="machine_hand_11">夹具损坏</string>
-
-    <string name="stick_1">搅棍电机损坏</string>
-    <string name="stick_2">卡棍</string>
-    <string name="stick_3">出棍传感器损坏</string>
-    <string name="stick_4">缺棍传感器损坏</string>
-    <string name="stick_5">出棍推杆损坏</string>
-    <string name="stick_6">推杆接头接触不良</string>
-    <string name="stick_7">控制推杆的继电器损坏</string>
-
-    <string name="fan_loop_1">循环风扇损坏</string>
-    <string name="fan_loop_2">接头接触不良</string>
-
-    <string name="fan_exhaust_1">接头接触不良</string>
-    <string name="fan_exhaust_2">风机损坏</string>
-
-    <string name="coin_1">投币器损坏</string>
-    <string name="coin_2">投币器线路接触不良</string>
-
-    <string name="power_1">UPS损坏</string>
-    <string name="power_2">24V电源循环</string>
-    <string name="power_3">外部电源故障</string>
-
-    <string name="repair">修复</string>
-    <string name="not_repaired">未修复</string>
     <string name="none">无</string>
 
-    <string name="signal_x">输入信号</string>
-    <string name="signal_y">输出信号</string>
     <string name="address">地址</string>
     <string name="content">内容</string>
     <string name="state">状态</string>
@@ -275,23 +149,8 @@
 
     <string name="x_check_lose_step">丢步检测</string>
     <string name="x_check_stove_turn">炉头转动检测</string>
-    <string name="x_x">X轴限位检测</string>
-    <string name="x_y">Y轴限位检测</string>
-    <string name="x_z">Z轴限位检测</string>
-    <string name="x_air_pump">气泵吹气检测</string>
-    <string name="x_signal">市电信号检测</string>
-    <!--<string name="x_door_auto">自动门</string>-->
-    <!--<string name="x_door_hand"> 手动门</string> -->
-    <string name="x_door_hand">手动门</string>
-
-    <string name="y_pul_x">X轴PUL</string>
-    <string name="y_pul_y">Y轴PUL</string>
-    <string name="y_pul_z">Z轴PUL</string>
-    <string name="y_pul_e">E轴PUL</string>
-    <string name="y_pul_eo">EO轴PUL</string>
-    <string name="y_dir_y">Y轴DIR</string>
-    <string name="y_dir_z">Z轴DIR</string>
-    <string name="y_dir_e">E轴DIR</string>
+
+
     <string name="y_air_pump">气泵</string>
     <string name="y_water_pump">水泵</string>
     <string name="y_heating_mg">电磁加热</string>

+ 16 - 2
app/src/test/java/com/sunzee/ExampleUnitTest.java

@@ -6,6 +6,8 @@ import com.sunzee.model.HoleInformation;
 
 import org.junit.Test;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -22,8 +24,9 @@ public class ExampleUnitTest {
     private static List<HoleInformation> sHoleInformationList = new CopyOnWriteArrayList<>();
     private static LinkedList<Integer> sCleaningLocationList = new LinkedList<>();//存储要清洗的位置。
     private static int sum = 0;
+
     @Test
-    public void test(){
+    public void test() {
         for (int i = 0; i < 6; i++) {
             sHoleInformationList.add(i, new HoleInformation(2, 0));//初始化
         }
@@ -55,7 +58,7 @@ public class ExampleUnitTest {
                             System.out.println("又上厕所了。");
                         }
                     }
-                }else{
+                } else {
                     //说明是第一次,还没上厕所。
                 }
             } else {
@@ -68,4 +71,15 @@ public class ExampleUnitTest {
             }
         }
     }
+
+    @Test
+    public void mmm(){
+        String asdf = "1111111";
+        String[] split = asdf.split("");
+        System.out.println(split[0]);
+        List<String> lis = Arrays.asList(asdf.split(""));
+        System.out.println(lis.get(0));
+        ArrayList<String> result = new ArrayList(lis);
+        System.out.println(result.get(0));
+    }
 }