Frankensteinly 10 miesięcy temu
rodzic
commit
f6649d4912

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

@@ -33,6 +33,7 @@
             android:exported="false" />
         <activity
             android:name=".presentation.simple.SimpleLoginActivity"
+            android:launchMode="singleTask"
             android:exported="false" />
         <activity
             android:name=".activity.test.ProcessDemoActivity"

+ 3 - 3
app/src/main/java/com/grkj/iscs/presentation/simple/SimpleProcessActivity.kt

@@ -33,11 +33,11 @@ class SimpleProcessActivity : BaseActivity<ActivitySimpleProcessBinding>() {
             mBinding!!.llContainer2, mBinding!!.llContainer3, mBinding!!.llContainer4,
             mBinding!!.llContainer5, mBinding!!.llContainer6, mBinding!!.llContainer7)
 
-        mBinding?.rlHome?.setOnClickListener {
+        mBinding?.llHome?.setOnClickListener {
             finish()
         }
 
-        mBinding?.rlSetting?.setOnClickListener {
+        mBinding?.llSetting?.setOnClickListener {
             startActivity(Intent(this, SimpleSettingActivity::class.java))
         }
 
@@ -56,7 +56,7 @@ class SimpleProcessActivity : BaseActivity<ActivitySimpleProcessBinding>() {
             changeStep(PresentationManager.mStep)
         }
 
-        mBinding?.rlConfirm?.setOnClickListener {
+        mBinding?.llConfirm?.setOnClickListener {
             PresentationManager.mStep = 2
             changeStep(PresentationManager.mStep)
             PresentationManager.checkSimpleEquip(this)

+ 14 - 6
app/src/main/java/com/grkj/iscs/presentation/simple/SimpleSettingActivity.kt

@@ -1,5 +1,6 @@
 package com.grkj.iscs.presentation.simple
 
+import android.content.Intent
 import com.grkj.iscs.base.BaseActivity
 import com.grkj.iscs.databinding.ActivitySimpleSettingBinding
 import com.grkj.iscs.modbus.ModBusController
@@ -11,26 +12,33 @@ class SimpleSettingActivity : BaseActivity<ActivitySimpleSettingBinding>() {
         get() = ActivitySimpleSettingBinding.inflate(layoutInflater)
 
     override fun initView() {
-        mBinding?.tvFinishTicket?.setOnClickListener {
+        mBinding?.llFinishTicket?.setOnClickListener {
             PresentationManager.initTicket()
         }
 
-        mBinding?.tvCloseAllLockBuckles?.setOnClickListener {
+        mBinding?.llCloseAllLockBuckles?.setOnClickListener {
             ModBusController.controlAllLockBuckles(false)
         }
 
-        mBinding?.tvOpenAllLockBuckles?.setOnClickListener {
+        mBinding?.llOpenAllLockBuckles?.setOnClickListener {
             ModBusController.controlAllLockBuckles(true)
         }
 
-        mBinding?.tvCloseAllKeyBuckles?.setOnClickListener {
+        mBinding?.llCloseAllKeyBuckles?.setOnClickListener {
             ModBusController.controlAllKeyBuckles(false)
         }
 
-        mBinding?.tvOpenAllKeyBuckles?.setOnClickListener {
+        mBinding?.llOpenAllKeyBuckles?.setOnClickListener {
             ModBusController.controlAllKeyBuckles(true)
         }
 
-        mBinding?.tvReturnHome?.setOnClickListener { finish() }
+        mBinding?.llHome?.setOnClickListener {
+            startActivity(Intent(this, SimpleLoginActivity::class.java))
+            finish()
+        }
+
+        mBinding?.llSetting?.setOnClickListener {
+            startActivity(Intent(this, SimpleSettingActivity::class.java))
+        }
     }
 }

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

@@ -14,8 +14,10 @@
         android:text="@string/simple_title" />
 
     <ImageView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"/>
+        android:layout_width="100dp"
+        android:layout_height="100dp"
+        android:background="@mipmap/login_icon"
+        android:layout_marginTop="40dp"/>
 
     <TextView
         android:layout_width="wrap_content"

+ 96 - 31
app/src/main/res/layout/activity_simple_process.xml

@@ -30,14 +30,20 @@
             android:padding="20dp"
             android:layout_marginVertical="20dp"/>
 
-        <RelativeLayout
+        <LinearLayout
             android:id="@+id/rl_execute"
             style="@style/SimpleBtnContainer">
+
+            <ImageView
+                android:layout_width="@dimen/simple_icon_size"
+                android:layout_height="@dimen/simple_icon_size"
+                android:background="@mipmap/permit"
+                android:layout_marginRight="5dp"/>
             <TextView
                 android:id="@+id/tv_execute"
                 style="@style/SimpleTextView"
                 android:text="@string/simple_execute"/>
-        </RelativeLayout>
+        </LinearLayout>
     </LinearLayout>
 
     <!--  步骤1  -->
@@ -83,13 +89,20 @@
                 android:layout_margin="10dp"/>
         </LinearLayout>
 
-        <RelativeLayout
-            android:id="@+id/rl_confirm"
+        <LinearLayout
+            android:id="@+id/ll_confirm"
             style="@style/SimpleBtnContainer">
+
+            <ImageView
+                android:layout_width="@dimen/simple_icon_size"
+                android:layout_height="@dimen/simple_icon_size"
+                android:background="@mipmap/confirm"
+                android:layout_marginRight="5dp"/>
+
             <TextView
                 style="@style/SimpleTextView"
-                android:text="@string/simple_confirm"/>
-        </RelativeLayout>
+                android:text="@string/simple_confirm" />
+        </LinearLayout>
     </LinearLayout>
 
     <!--  步骤2  -->
@@ -133,13 +146,20 @@
                 android:layout_margin="10dp"/>
         </LinearLayout>
 
-        <RelativeLayout
-            android:id="@+id/rl_waiting"
+        <LinearLayout
+            android:id="@+id/ll_waiting"
             style="@style/SimpleBtnContainer">
+
+            <ImageView
+                android:layout_width="@dimen/simple_icon_size"
+                android:layout_height="@dimen/simple_icon_size"
+                android:background="@mipmap/waiting"
+                android:layout_marginRight="5dp"/>
+
             <TextView
                 style="@style/SimpleTextView"
                 android:text="@string/simple_waiting"/>
-        </RelativeLayout>
+        </LinearLayout>
 
     </LinearLayout>
 
@@ -184,11 +204,22 @@
                 android:layout_margin="10dp"/>
         </LinearLayout>
 
-        <TextView
-            style="@style/SimpleTextView"
-            android:background="@drawable/tip_bg_white"
-            android:text="@string/simple_shared"
-            android:padding="10dp"/>
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:gravity="center"
+            android:padding="10dp">
+            <ImageView
+                android:layout_width="@dimen/simple_icon_size"
+                android:layout_height="@dimen/simple_icon_size"
+                android:background="@mipmap/lock"
+                android:layout_marginRight="5dp"/>
+
+            <TextView
+                style="@style/SimpleTextView"
+                android:text="@string/simple_shared"/>
+        </LinearLayout>
     </LinearLayout>
 
     <!--  步骤4  -->
@@ -232,11 +263,22 @@
                 android:layout_margin="10dp"/>
         </LinearLayout>
 
-        <TextView
-            style="@style/SimpleTextView"
-            android:background="@drawable/tip_bg_white"
-            android:text="@string/simple_shared"
-            android:padding="10dp"/>
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:gravity="center"
+            android:padding="10dp">
+            <ImageView
+                android:layout_width="@dimen/simple_icon_size"
+                android:layout_height="@dimen/simple_icon_size"
+                android:background="@mipmap/lock"
+                android:layout_marginRight="5dp"/>
+
+            <TextView
+                style="@style/SimpleTextView"
+                android:text="@string/simple_shared"/>
+        </LinearLayout>
     </LinearLayout>
 
     <!--  步骤5  -->
@@ -280,13 +322,19 @@
                 android:layout_margin="10dp"/>
         </LinearLayout>
 
-        <RelativeLayout
-            android:id="@+id/rl_confirm_complete"
+        <LinearLayout
+            android:id="@+id/ll_confirm_complete"
             style="@style/SimpleBtnContainer">
+            <ImageView
+                android:layout_width="@dimen/simple_icon_size"
+                android:layout_height="@dimen/simple_icon_size"
+                android:background="@mipmap/confirm"
+                android:layout_marginRight="5dp"/>
+
             <TextView
                 style="@style/SimpleTextView"
                 android:text="@string/simple_confirm"/>
-        </RelativeLayout>
+        </LinearLayout>
     </LinearLayout>
 
 
@@ -332,12 +380,19 @@
                 android:layout_margin="10dp"/>
         </LinearLayout>
 
-        <RelativeLayout
-            style="@style/SimpleBtnContainer">
+        <LinearLayout
+            style="@style/SimpleBtnContainer"
+            android:background="#00FFFFFF">
+            <ImageView
+                android:layout_width="@dimen/simple_icon_size"
+                android:layout_height="@dimen/simple_icon_size"
+                android:background="@mipmap/waiting"
+                android:layout_marginRight="5dp"/>
+
             <TextView
                 style="@style/SimpleTextView"
                 android:text="@string/simple_waiting"/>
-        </RelativeLayout>
+        </LinearLayout>
     </LinearLayout>
 
 
@@ -366,22 +421,32 @@
 
 
     <!--  通用  -->
-    <RelativeLayout
-        android:id="@+id/rl_home"
+    <LinearLayout
+        android:id="@+id/ll_home"
         style="@style/SimpleBtnContainer"
         android:layout_alignParentBottom="true">
+        <ImageView
+            android:layout_width="@dimen/simple_icon_size"
+            android:layout_height="@dimen/simple_icon_size"
+            android:background="@mipmap/home"
+            android:layout_marginRight="5dp"/>
         <TextView
             style="@style/SimpleTextView"
             android:text="@string/simple_return_home"/>
-    </RelativeLayout>
+    </LinearLayout>
 
-    <RelativeLayout
-        android:id="@+id/rl_setting"
+    <LinearLayout
+        android:id="@+id/ll_setting"
         style="@style/SimpleBtnContainer"
         android:layout_alignParentBottom="true"
         android:layout_alignParentRight="true">
+        <ImageView
+            android:layout_width="@dimen/simple_icon_size"
+            android:layout_height="@dimen/simple_icon_size"
+            android:background="@mipmap/settings"
+            android:layout_marginRight="5dp"/>
         <TextView
             style="@style/SimpleTextView"
             android:text="@string/simple_setting"/>
-    </RelativeLayout>
+    </LinearLayout>
 </RelativeLayout>

+ 136 - 31
app/src/main/res/layout/activity_simple_setting.xml

@@ -6,47 +6,152 @@
     android:layout_height="match_parent"
     tools:context=".presentation.simple.SimpleSettingActivity">
 
-    <TextView
-        android:id="@+id/tv_return_home"
-        style="@style/SimpleButton"
-        android:layout_alignParentBottom="true"
-        android:text="@string/simple_return_home"/>
-
     <LinearLayout
-        android:id="@+id/ll_container"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:layout_margin="20dp">
-        <TextView
-            android:id="@+id/tv_finish_ticket"
-            style="@style/SimpleButton"
-            android:text="@string/simple_finish_ticket"/>
+        android:id="@+id/ll_home"
+        style="@style/SimpleBtnContainer"
+        android:layout_alignParentBottom="true">
 
-        <TextView
-            android:id="@+id/tv_close_all_lock_buckles"
-            style="@style/SimpleButton"
-            android:text="@string/simple_close_all_lock_buckles"/>
+        <ImageView
+            android:layout_width="@dimen/simple_icon_size"
+            android:layout_height="@dimen/simple_icon_size"
+            android:layout_marginRight="5dp"
+            android:background="@mipmap/home" />
 
         <TextView
-            android:id="@+id/tv_open_all_lock_buckles"
-            style="@style/SimpleButton"
-            android:text="@string/simple_open_all_lock_buckles"/>
+            style="@style/SimpleTextView"
+            android:text="@string/simple_return_home" />
+    </LinearLayout>
 
-        <TextView
-            android:id="@+id/tv_close_all_key_buckles"
-            style="@style/SimpleButton"
-            android:text="@string/simple_close_all_key_buckles"/>
+    <LinearLayout
+        android:id="@+id/ll_setting"
+        style="@style/SimpleBtnContainer"
+        android:layout_alignParentRight="true"
+        android:layout_alignParentBottom="true">
+
+        <ImageView
+            android:layout_width="@dimen/simple_icon_size"
+            android:layout_height="@dimen/simple_icon_size"
+            android:layout_marginRight="5dp"
+            android:background="@mipmap/settings" />
 
         <TextView
-            android:id="@+id/tv_open_all_key_buckles"
-            style="@style/SimpleButton"
-            android:text="@string/simple_open_all_key_buckles"/>
+            style="@style/SimpleTextView"
+            android:text="@string/simple_setting" />
     </LinearLayout>
 
     <TextView
+        android:id="@+id/tv_title"
         style="@style/SimpleTextView"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="50dp"
         android:text="@string/simple_setting_tip"
-        android:layout_toRightOf="@id/ll_container"
-        android:layout_marginTop="30dp"/>
+        android:textSize="@dimen/simple_large_text"
+        android:textStyle="bold" />
+
+    <LinearLayout
+        android:id="@+id/ll_container"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/tv_title"
+        android:layout_centerHorizontal="true"
+        android:layout_margin="20dp"
+        android:gravity="center"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+
+            <LinearLayout
+                android:id="@+id/ll_open_all_lock_buckles"
+                style="@style/SimpleBtnContainer"
+                android:layout_width="200dp">
+
+                <ImageView
+                    android:layout_width="@dimen/simple_icon_size"
+                    android:layout_height="@dimen/simple_icon_size"
+                    android:layout_marginRight="5dp"
+                    android:background="@mipmap/switch_on" />
+
+                <TextView
+                    style="@style/SimpleTextView"
+                    android:text="@string/simple_open_all_lock_buckles" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/ll_open_all_key_buckles"
+                style="@style/SimpleBtnContainer"
+                android:layout_width="200dp">
+
+                <ImageView
+                    android:layout_width="@dimen/simple_icon_size"
+                    android:layout_height="@dimen/simple_icon_size"
+                    android:layout_marginRight="5dp"
+                    android:background="@mipmap/switch_on" />
+
+                <TextView
+                    style="@style/SimpleTextView"
+                    android:text="@string/simple_open_all_key_buckles" />
+            </LinearLayout>
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+
+            <LinearLayout
+                android:id="@+id/ll_close_all_lock_buckles"
+                style="@style/SimpleBtnContainer"
+                android:layout_width="200dp">
+
+                <ImageView
+                    android:layout_width="@dimen/simple_icon_size"
+                    android:layout_height="@dimen/simple_icon_size"
+                    android:layout_marginRight="5dp"
+                    android:background="@mipmap/switch_off" />
+
+                <TextView
+                    style="@style/SimpleTextView"
+                    android:text="@string/simple_close_all_lock_buckles" />
+            </LinearLayout>
+
+
+            <LinearLayout
+                android:id="@+id/ll_close_all_key_buckles"
+                style="@style/SimpleBtnContainer"
+                android:layout_width="200dp">
+
+                <ImageView
+                    android:layout_width="@dimen/simple_icon_size"
+                    android:layout_height="@dimen/simple_icon_size"
+                    android:layout_marginRight="5dp"
+                    android:background="@mipmap/switch_off" />
+
+                <TextView
+                    style="@style/SimpleTextView"
+                    android:text="@string/simple_close_all_key_buckles" />
+            </LinearLayout>
+
+        </LinearLayout>
+
+
+        <LinearLayout
+            android:id="@+id/ll_finish_ticket"
+            style="@style/SimpleBtnContainer"
+            android:layout_width="200dp">
+
+            <ImageView
+                android:layout_width="@dimen/simple_icon_size"
+                android:layout_height="@dimen/simple_icon_size"
+                android:layout_marginRight="5dp"
+                android:background="@mipmap/reset" />
+
+            <TextView
+                style="@style/SimpleTextView"
+                android:text="@string/simple_reset_ticket" />
+        </LinearLayout>
+    </LinearLayout>
 </RelativeLayout>

BIN
app/src/main/res/mipmap/confirm.png


BIN
app/src/main/res/mipmap/home.png


BIN
app/src/main/res/mipmap/lock.png


BIN
app/src/main/res/mipmap/login_icon.png


BIN
app/src/main/res/mipmap/permit.png


BIN
app/src/main/res/mipmap/reset.png


BIN
app/src/main/res/mipmap/settings.png


BIN
app/src/main/res/mipmap/switch_off.png


BIN
app/src/main/res/mipmap/switch_on.png


BIN
app/src/main/res/mipmap/unlock.png


BIN
app/src/main/res/mipmap/waiting.png


+ 1 - 1
app/src/main/res/values-zh/strings.xml

@@ -120,7 +120,7 @@
     <string name="simple_in_maintenance">维修进行中</string>
     <string name="simple_maintenance_tip">请维修⼈员,维修作业结束后,打卡解除共锁</string>
     <string name="simple_maintenance_finished">维修结束</string>
-    <string name="simple_finish_ticket">结束作业票</string>
+    <string name="simple_reset_ticket">重置作业票</string>
     <string name="simple_close_all_lock_buckles">挂锁仓关</string>
     <string name="simple_open_all_lock_buckles">挂锁仓开</string>
     <string name="simple_close_all_key_buckles">钥匙仓关</string>

+ 1 - 0
app/src/main/res/values/dimens.xml

@@ -57,4 +57,5 @@
     <dimen name="simple_ticket_tip_width">180dp</dimen>
     <dimen name="simple_large_text">25dp</dimen>
     <dimen name="simple_small_text">10dp</dimen>
+    <dimen name="simple_icon_size">20dp</dimen>
 </resources>

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

@@ -120,12 +120,12 @@
     <string name="simple_in_maintenance">Maintenance in progress</string>
     <string name="simple_maintenance_tip">请维修⼈员,维修作业结束后,打卡解除共锁</string>
     <string name="simple_maintenance_finished">Maintenance Completed</string>
-    <string name="simple_finish_ticket">结束作业票</string>
-    <string name="simple_close_all_lock_buckles">挂锁仓关</string>
-    <string name="simple_open_all_lock_buckles">挂锁仓开</string>
-    <string name="simple_close_all_key_buckles">钥匙仓关</string>
-    <string name="simple_open_all_key_buckles">钥匙仓开</string>
-    <string name="simple_setting_tip">设置⻚⾯,请专⼈操作</string>
+    <string name="simple_reset_ticket">Reset Work Permit</string>
+    <string name="simple_close_all_lock_buckles">Lock storage close</string>
+    <string name="simple_open_all_lock_buckles">Lock storage close</string>
+    <string name="simple_close_all_key_buckles">Key storage close</string>
+    <string name="simple_open_all_key_buckles">Key storage open</string>
+    <string name="simple_setting_tip">Settings Page, Authorized Personnel Only</string>
     <string name="simple_step_error">步骤异常</string>
     <string name="simple_lock_no_ticket_to_handle">暂无可处理的工作票</string>
     <string name="simple_workshop_assemble">组装车间</string>