Ver código fonte

门口机增加养老主题UI

weizhengliang 8 meses atrás
pai
commit
df3f01f783

+ 64 - 17
android_door/src/main/h10_3128/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivity.kt

@@ -153,6 +153,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     override fun getLayId(): Int {
         if (BuildConfig.UI_TYPE == "mom") {
             setTheme(R.style.MomAppTheme)
+        } else if (BuildConfig.UI_TYPE == "yanglao") {
+            setTheme(R.style.YanglaoAppTheme)
         }
 
         if ("rk3288".equals(Build.MODEL)) {
@@ -311,6 +313,18 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
 
             ll_room_name.setBackgroundResource(R.mipmap.room_bg_girl)
             tv_room_name.setTextColor(Color.WHITE)
+        } else if (BuildConfig.UI_TYPE == "yanglao") {
+            ll_room_name.setBackgroundResource(R.mipmap.room_bg_girl)
+            tv_room_name.setTextColor(Color.WHITE)
+
+            room_action_home.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
+            room_action_call_bed.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
+            room_action_call.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
+            room_cancel_call.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
+            room_action_support.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
+            room_action_nurse.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
+            room_action_power_reset.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
+            room_action_more.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
         }
 
         //注册广播
@@ -642,28 +656,33 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             }
         }.start()
 
-        //room_action_nurse.text = "退出护理"
-        room_action_nurse.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
+
         if (TextUtils.isEmpty(Constant.NursingTitle)) {
             tv_room_name.text = Constant.ROOM_NAME + StringUtil.getResString(R.string.nursing_title)
         } else {
             tv_room_name.text = Constant.ROOM_NAME + " " + Constant.NursingTitle + "..."
         }
-        if (BuildConfig.UI_TYPE != "mom") {
+
+        if (BuildConfig.UI_TYPE == "mom" || BuildConfig.UI_TYPE == "yanglao") {
+            tv_room_name.setTextColor(Color.WHITE)
+            room_action_nurse.setTextColor(Color.RED)
+        } else {
             tv_room_name.setTextColor(resources.getColor(R.color.nursing_color))
+            room_action_nurse.setBackgroundResource(R.mipmap.ic_bottom_btn_bg)
         }
     }
 
     private fun exitNursing() {
-        //if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
-            //SerialPortHelper.setDoorLight(1, "111") //白色
-            DoorLightHelper.resetDoorLight()
-        //}
-        //room_action_nurse.text = "进入护理"
-        room_action_nurse.setBackgroundResource(R.mipmap.bg_bottom_btn)
+        DoorLightHelper.resetDoorLight()
+
         tv_room_name.text = Constant.ROOM_NAME
-        if (BuildConfig.UI_TYPE != "mom") {
+
+        if (BuildConfig.UI_TYPE == "mom" || BuildConfig.UI_TYPE == "yanglao") {
+            tv_room_name.setTextColor(Color.WHITE)
+            room_action_nurse.setTextColor(Color.WHITE)
+        } else {
             tv_room_name.setTextColor(resources.getColor(R.color.main_color))
+            room_action_nurse.setBackgroundResource(R.mipmap.bg_bottom_btn)
         }
     }
 
@@ -1136,12 +1155,16 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         }
         if (Constant.DEVICE_STATUS == 0) {
             tv_room_name.setText(R.string.device_disable)
-            if (BuildConfig.UI_TYPE != "mom") {
+            if (BuildConfig.UI_TYPE == "mom" || BuildConfig.UI_TYPE == "yanglao") {
+                tv_room_name.setTextColor(Color.WHITE)
+            } else {
                 tv_room_name.setTextColor(resources.getColor(R.color.red_color))
             }
         } else {
             tv_room_name.text = Constant.ROOM_NAME
-            if (BuildConfig.UI_TYPE != "mom") {
+            if (BuildConfig.UI_TYPE == "mom" || BuildConfig.UI_TYPE == "yanglao") {
+                tv_room_name.setTextColor(Color.WHITE)
+            } else {
                 tv_room_name.setTextColor(resources.getColor(R.color.main_color))
             }
         }
@@ -1788,7 +1811,11 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                     textView.text = e.text
                     textView.maxLines = 2
                     textView.ellipsize = TextUtils.TruncateAt.END
-                    textView.setTextColor(Color.RED)
+                    if (BuildConfig.UI_TYPE == "mom" || BuildConfig.UI_TYPE == "yanglao") {
+                        textView.setTextColor(Color.WHITE)
+                    } else {
+                        textView.setTextColor(Color.RED)
+                    }
                     if ("rk3288".equals(Build.MODEL)) {
                         textView.textSize = 48f
                     } else {
@@ -1884,7 +1911,21 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     }
 
     private fun updateNetState() {
-        if (BuildConfig.UI_TYPE == "mom" && Constant.babyGirl) {
+        if (BuildConfig.UI_TYPE == "yanglao") {
+            if (NetHelper.getInstance().networkType == ConnectivityManager.TYPE_WIFI) {
+                view_title_layout_iv_wifi.visibility = View.VISIBLE
+                view_title_layout_iv_wifi.setImageResource(R.mipmap.ic_wifi_success_red)
+                view_title_layout_iv_ethernet.visibility = View.GONE
+            } else if (NetHelper.getInstance().networkType == ConnectivityManager.TYPE_ETHERNET) {
+                view_title_layout_iv_ethernet.visibility = View.VISIBLE
+                view_title_layout_iv_ethernet.setImageResource(R.mipmap.ic_ethernet_success_red)
+                view_title_layout_iv_wifi.visibility = View.GONE
+            } else {
+                view_title_layout_iv_ethernet.visibility = View.VISIBLE
+                view_title_layout_iv_ethernet.setImageResource(R.mipmap.ic_ethernet_fail)
+                view_title_layout_iv_wifi.visibility = View.GONE
+            }
+        } else if (BuildConfig.UI_TYPE == "mom" && Constant.babyGirl) {
             if (NetHelper.getInstance().networkType == ConnectivityManager.TYPE_WIFI) {
                 view_title_layout_iv_wifi.visibility = View.VISIBLE
                 view_title_layout_iv_wifi.setImageResource(R.mipmap.ic_wifi_success_red)
@@ -1958,7 +1999,9 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
 
     private fun updateTcpState() {
         if (Constant.TCP_CONNECTED) {
-            if (BuildConfig.UI_TYPE == "mom" && Constant.babyGirl) {
+            if (BuildConfig.UI_TYPE == "yanglao") {
+                view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_success_red)
+            } else if (BuildConfig.UI_TYPE == "mom" && Constant.babyGirl) {
                 view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_success_red)
             } else {
                 view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_success)
@@ -1994,7 +2037,9 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 //VoiceManagerUtil.setSystemVoice(this, SettingConfig.getDoorDaytimeSystemVolume(this))
                 //VoiceManagerUtil.setMusicVoice(this, SettingConfig.getDoorDaytimeSystemVolume(this))
 
-                if (BuildConfig.UI_TYPE == "mom" && Constant.babyGirl) {
+                if (BuildConfig.UI_TYPE == "yanglao") {
+                    view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_daylight_red)
+                } else if (BuildConfig.UI_TYPE == "mom" && Constant.babyGirl) {
                     view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_daylight_red)
                 } else {
                     view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_daylight)
@@ -2019,7 +2064,9 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 //VoiceManagerUtil.setSystemVoice(this, SettingConfig.getDoorNightSystemVolume(this))
                 //VoiceManagerUtil.setMusicVoice(this, SettingConfig.getDoorNightSystemVolume(this))
 
-                if (BuildConfig.UI_TYPE == "mom" && Constant.babyGirl) {
+                if (BuildConfig.UI_TYPE == "yanglao") {
+                    view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_night_red)
+                } else if (BuildConfig.UI_TYPE == "mom" && Constant.babyGirl) {
                     view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_night_red)
                 } else {
                     view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_night)

+ 8 - 3
android_door/src/main/h10_3128/java/com/wdkl/app/ncs/callingdoor/adapter/FrameRoomAdapter.kt

@@ -16,6 +16,7 @@ import android.widget.ImageView
 import android.widget.LinearLayout
 import android.widget.TextView
 import androidx.recyclerview.widget.RecyclerView
+import com.wdkl.app.ncs.callingdoor.BuildConfig
 import com.wdkl.app.ncs.callingdoor.R
 import com.wdkl.ncs.android.lib.base.BaseApplication
 import com.wdkl.ncs.android.middleware.common.Constant
@@ -133,13 +134,17 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
         //检查是否有呼叫,更新背景动画效果
         if (flickBedNames.contains(name)) {
             Log.e("showBed", "show animator: $name")
-            holder.bedItem.setBackgroundResource(R.color.bed_light_color)
+            holder.bedItem.setBackgroundResource(R.drawable.shape_bed_item_flick_bg)
             holder.bedName.setTextColor(Color.parseColor("#FFFD3B30"))
             startAnimator(holder.bedName)
         } else {
             Log.e("showBed", "clear animator: $name")
-            holder.bedItem.setBackgroundResource(R.color.white)
-            holder.bedName.setTextColor(Color.parseColor("#2F9DF1"))
+            holder.bedItem.setBackgroundResource(R.drawable.shape_bed_item_bg)
+            if (BuildConfig.UI_TYPE == "mom" || BuildConfig.UI_TYPE == "yanglao") {
+                holder.bedName.setTextColor(Color.parseColor("#FFBDC3"))
+            } else {
+                holder.bedName.setTextColor(Color.parseColor("#2F9DF1"))
+            }
             clearAnimator(holder.bedName)
         }
 

+ 1 - 0
android_door/src/main/h10_3128/java/com/wdkl/app/ncs/callingdoor/fragment/QrCodeFragment.kt

@@ -94,6 +94,7 @@ class QrCodeFragment : BaseFragment<QrCodeFragmentPresenter, QrCodeLayBinding>()
             tv_language_set.visibility = View.GONE
             tv_nursing_timing.visibility = View.GONE
             ll_nursing_color_set.visibility = View.GONE
+            tv_serial_port_config.visibility = View.GONE
         }
 
         if ("mk_h10_a133_1".equals(BuildConfig.APP_DEVICE_TYPE)) {

+ 1 - 0
android_door/src/main/h10_3128/res/drawable/shape_bed_item_bg.xml

@@ -4,6 +4,7 @@
         android:right="-2dp"
         android:top="-2dp">
         <shape>
+            <solid android:color="#f9f7f7"/>
             <stroke
                 android:width="2px"
                 android:color="@color/main_color"/>

+ 13 - 0
android_door/src/main/h10_3128/res/drawable/shape_bed_item_flick_bg.xml

@@ -0,0 +1,13 @@
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item
+        android:left="-2dp"
+        android:right="-2dp"
+        android:top="-2dp">
+        <shape>
+            <solid android:color="#44f29200"/>
+            <stroke
+                android:width="2px"
+                android:color="@color/main_color"/>
+        </shape>
+    </item>
+</layer-list>

+ 89 - 87
android_door/src/main/h10_3128/res/layout/callingdoor_main_lay.xml

@@ -10,17 +10,86 @@
             android:id="@+id/activity_calling_door_layout_title"
             layout="@layout/view_title_layout"/>
 
+        <LinearLayout
+            android:id="@+id/ll_room_name"
+            android:layout_width="match_parent"
+            android:layout_height="148dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_below="@id/activity_calling_door_layout_title">
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginTop="-10dp"
+                android:layout_weight="2.2"
+                android:paddingLeft="20dp"
+                android:paddingRight="20dp">
+                <com.wdkl.ncs.android.lib.widget.MarqueeTextView
+                    android:id="@+id/tv_room_name"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:gravity="center_vertical"
+                    android:text="--"
+                    android:textColor="@color/main_color"
+                    android:textSize="120sp"
+                    android:textStyle="bold"
+                    android:singleLine="true"
+                    android:ellipsize="marquee"
+                    android:focusable="true"
+                    android:focusableInTouchMode="true" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/ll_call_view"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:orientation="vertical">
+                <ViewFlipper
+                    android:id="@+id/view_flipper"
+                    android:layout_width="match_parent"
+                    android:layout_height="100dp"
+                    android:autoStart="true"
+                    android:flipInterval="5000"
+                    android:inAnimation="@anim/slide_up_in"
+                    android:outAnimation="@anim/slide_down_out">
+                    <!--<TextView
+                        android:id="@+id/call_name"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center|right"
+                        android:text="09床 呼叫"
+                        android:textColor="@color/color_red"
+                        android:textSize="32sp" />-->
+                </ViewFlipper>
+
+                <TextView
+                    android:id="@+id/tv_nurse_countdown_time"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:padding="4dp"
+                    android:textSize="32sp"
+                    android:text="00:00:00"
+                    android:textColor="@color/zmcx_orange_color"
+                    android:visibility="gone"/>
+            </LinearLayout>
+
+        </LinearLayout>
+
         <TextView
             android:id="@+id/app_version"
             android:layout_width="148dp"
             android:layout_height="wrap_content"
             android:layout_alignParentBottom="true"
             android:layout_alignParentRight="true"
+            android:layout_marginLeft="6dp"
+            android:layout_marginRight="6dp"
             android:gravity="center"
             android:paddingTop="10dp"
             android:paddingBottom="10dp"
             android:text="--"
-            android:textColor="?attr/myBackgroundColor"
+            android:textColor="?attr/verTextColor"
             android:textSize="20sp" />
 
         <!--右侧按钮区域-->
@@ -28,9 +97,10 @@
             android:id="@+id/room_actions"
             android:layout_width="160dp"
             android:layout_height="match_parent"
-            android:layout_marginTop="120dp"
-            android:layout_below="@id/activity_calling_door_layout_title"
-            android:layout_above="@id/app_version"
+            android:layout_marginTop="6dp"
+            android:layout_marginBottom="6dp"
+            android:layout_below="@+id/ll_room_name"
+            android:layout_above="@+id/app_version"
             android:layout_alignParentRight="true">
 
             <LinearLayout
@@ -44,7 +114,7 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginTop="10dp"
-                    android:layout_marginBottom="16dp"
+                    android:layout_marginBottom="18dp"
                     android:background="@mipmap/bg_bottom_btn"
                     android:drawableLeft="@mipmap/ic_home"
                     android:drawablePadding="6dp"
@@ -54,13 +124,13 @@
                     android:ellipsize="end"
                     android:text="@string/str_home"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="22sp" />
+                    android:textSize="24sp" />
 
                 <TextView
                     android:id="@+id/room_action_call_bed"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginBottom="16dp"
+                    android:layout_marginBottom="18dp"
                     android:background="@mipmap/bg_bottom_btn"
                     android:drawableLeft="@mipmap/ic_call"
                     android:drawablePadding="6dp"
@@ -70,13 +140,13 @@
                     android:ellipsize="end"
                     android:text="@string/str_call_bed"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="22sp" />
+                    android:textSize="24sp" />
 
                 <TextView
                     android:id="@+id/room_action_call"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginBottom="16dp"
+                    android:layout_marginBottom="18dp"
                     android:background="@mipmap/bg_bottom_btn"
                     android:drawableLeft="@mipmap/ic_call"
                     android:drawablePadding="6dp"
@@ -86,13 +156,13 @@
                     android:ellipsize="end"
                     android:text="@string/str_call_nurse"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="22sp" />
+                    android:textSize="24sp" />
 
                 <TextView
                     android:id="@+id/room_cancel_call"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginBottom="16dp"
+                    android:layout_marginBottom="18dp"
                     android:background="@mipmap/bg_bottom_btn"
                     android:drawableLeft="@mipmap/ic_call"
                     android:drawablePadding="6dp"
@@ -102,13 +172,13 @@
                     android:ellipsize="end"
                     android:text="@string/str_cancel_call"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="22sp" />
+                    android:textSize="24sp" />
 
                 <TextView
                     android:id="@+id/room_action_support"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginBottom="16dp"
+                    android:layout_marginBottom="18dp"
                     android:background="@mipmap/bg_bottom_btn"
                     android:drawableLeft="@mipmap/ic_support"
                     android:drawablePadding="6dp"
@@ -118,13 +188,13 @@
                     android:ellipsize="end"
                     android:text="@string/str_support"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="22sp" />
+                    android:textSize="24sp" />
 
                 <TextView
                     android:id="@+id/room_action_nurse"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginBottom="16dp"
+                    android:layout_marginBottom="18dp"
                     android:background="@mipmap/bg_bottom_btn"
                     android:drawableLeft="@drawable/ic_nursing"
                     android:drawablePadding="6dp"
@@ -134,13 +204,13 @@
                     android:ellipsize="end"
                     android:text="@string/enter_nursing"
                     android:textColor="@color/white"
-                    android:textSize="22sp" />
+                    android:textSize="24sp" />
 
                 <TextView
                     android:id="@+id/room_action_power_reset"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginBottom="16dp"
+                    android:layout_marginBottom="18dp"
                     android:background="@mipmap/bg_bottom_btn"
                     android:drawableLeft="@mipmap/ic_more"
                     android:drawablePadding="6dp"
@@ -150,7 +220,7 @@
                     android:ellipsize="end"
                     android:text="@string/power_reset"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="22sp"
+                    android:textSize="24sp"
                     android:visibility="gone"/>
 
                 <TextView
@@ -167,79 +237,11 @@
                     android:ellipsize="end"
                     android:text="@string/str_more"
                     android:textColor="@color/white"
-                    android:textSize="22sp" />
+                    android:textSize="24sp" />
 
             </LinearLayout>
         </ScrollView>
 
-        <LinearLayout
-            android:id="@+id/ll_room_name"
-            android:layout_width="match_parent"
-            android:layout_height="148dp"
-            android:layout_marginLeft="10dp"
-            android:layout_marginRight="10dp"
-            android:layout_below="@id/activity_calling_door_layout_title">
-
-            <LinearLayout
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_marginTop="-10dp"
-                android:layout_weight="2.2"
-                android:paddingLeft="20dp"
-                android:paddingRight="20dp">
-                <com.wdkl.ncs.android.lib.widget.MarqueeTextView
-                    android:id="@+id/tv_room_name"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:gravity="center_vertical"
-                    android:text="--"
-                    android:textColor="@color/main_color"
-                    android:textSize="120sp"
-                    android:textStyle="bold"
-                    android:singleLine="true"
-                    android:ellipsize="marquee"
-                    android:focusable="true"
-                    android:focusableInTouchMode="true" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:id="@+id/ll_call_view"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:orientation="vertical">
-                <ViewFlipper
-                    android:id="@+id/view_flipper"
-                    android:layout_width="match_parent"
-                    android:layout_height="100dp"
-                    android:autoStart="true"
-                    android:flipInterval="5000"
-                    android:inAnimation="@anim/slide_up_in"
-                    android:outAnimation="@anim/slide_down_out">
-                    <!--<TextView
-                        android:id="@+id/call_name"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center|right"
-                        android:text="09床 呼叫"
-                        android:textColor="@color/color_red"
-                        android:textSize="32sp" />-->
-                </ViewFlipper>
-
-                <TextView
-                    android:id="@+id/tv_nurse_countdown_time"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:padding="4dp"
-                    android:textSize="32sp"
-                    android:text="00:00:00"
-                    android:textColor="@color/zmcx_orange_color"
-                    android:visibility="gone"/>
-            </LinearLayout>
-
-        </LinearLayout>
-
-
 
         <!--床位fragment区域-->
         <FrameLayout

+ 1 - 2
android_door/src/main/h10_3128/res/layout/item_bed.xml

@@ -3,8 +3,7 @@
     android:id="@+id/ll_item_bed"
     android:layout_width="264dp"
     android:layout_height="match_parent"
-    android:layout_marginLeft="4dp"
-    android:layout_marginRight="4dp"
+    android:layout_margin="6dp"
     android:background="@drawable/shape_bed_item_bg"
     android:orientation="vertical"
     android:gravity="center">

+ 12 - 0
android_door/src/main/h10_3128/res/values/styles.xml

@@ -13,6 +13,7 @@
         <item name="myBackgroundColor">@color/main_color</item>
         <item name="myStatusBarColor">#FFFFFF</item>
         <item name="myTextColor">@color/main_color</item>
+        <item name="verTextColor">@color/main_color</item>
         <item name="listBgColor">#EAF2F9</item>
         <item name="selectImgColor">@color/main_color</item>
     </style>
@@ -22,6 +23,17 @@
         <item name="myBackgroundColor">@color/main_bg_color_girl</item>
         <item name="myStatusBarColor">#FFFFFF</item>
         <item name="myTextColor">@color/text_color_girl</item>
+        <item name="verTextColor">#FFFFFF</item>
+        <item name="listBgColor">@color/main_bg_color_girl</item>
+        <item name="selectImgColor">@color/main_bg_color_girl</item>
+    </style>
+
+    <!--养老项目主题-->
+    <style name="YanglaoAppTheme" parent="MyAppTheme">
+        <item name="myBackgroundColor">@color/main_bg_color_girl</item>
+        <item name="myStatusBarColor">#FFFFFF</item>
+        <item name="myTextColor">@color/text_color_girl</item>
+        <item name="verTextColor">#FFFFFF</item>
         <item name="listBgColor">@color/main_bg_color_girl</item>
         <item name="selectImgColor">@color/main_bg_color_girl</item>
     </style>

+ 15 - 1
app/src/main/code/com/wdkl/app/ncs/application/Application.kt

@@ -113,6 +113,20 @@ class Application : BaseApplication() {
             if (BuildConfig.UI_TYPE == "mom") {
                 //月子中心版,用的新主板,按键板接串口0
                 SerialPortUtil.getInstance().openSerialPort("/dev/ttyS0")
+            } else if (BuildConfig.UI_TYPE == "yanglao") {
+                //功能板串口
+                if (TextUtils.isEmpty(SettingConfig.getPanelKeySerialPort(baseContext))) {
+                    //默认设置为ttyS0
+                    SettingConfig.setPanelKeySerialPort(baseContext, "/dev/ttyS0")
+                }
+                SerialPortUtil.getInstance().openSerialPort(SettingConfig.getPanelKeySerialPort(baseContext))
+
+                //433串口
+                if (TextUtils.isEmpty(SettingConfig.get433SerialPort(baseContext))) {
+                    //默认设置为ttyS2
+                    SettingConfig.set433SerialPort(baseContext, "/dev/ttyS2")
+                }
+                SerialPortUtil433.getInstance().openSerialPort(SettingConfig.get433SerialPort(baseContext))
             } else {
                 //志合A133主板
                 //功能板串口
@@ -122,7 +136,7 @@ class Application : BaseApplication() {
                     SerialPortUtil.getInstance().openSerialPort("/dev/ttyS2")
                 }
 
-                //打开433串口0
+                //433串口
                 if (!TextUtils.isEmpty(SettingConfig.get433SerialPort(baseContext))) {
                     SerialPortUtil433.getInstance().openSerialPort(SettingConfig.get433SerialPort(baseContext))
                 } else {

+ 1 - 1
build.gradle

@@ -46,7 +46,7 @@ buildscript {
 
     ext.app_device_type = "mk_h10_a133_1"
 
-    //UI版本: default, mom
+    //UI版本: default, mom, yanglao
     ext.ui_type = "default"
 
     if (app_device_type == "mk_h10_z_3128_1") {

+ 2 - 2
common/src/main/code/com/wdkl/ncs/android/lib/settings/SettingConfig.java

@@ -200,7 +200,7 @@ public class SettingConfig {
 
     public static String getPanelKeySerialPort(Context context) {
         //按键板串口默认为ttyS2
-        return getSP(context).getString(KEY_SP_PANEL_KEY_SERIAL_PORT, "/dev/ttyS2");
+        return getSP(context).getString(KEY_SP_PANEL_KEY_SERIAL_PORT, "");
     }
 
     public static void setPanelKeySerialPort(Context context, String path) {
@@ -211,7 +211,7 @@ public class SettingConfig {
 
     public static String get433SerialPort(Context context) {
         //433串口默认为ttyS0
-        return getSP(context).getString(KEY_SP_433_SERIAL_PORT, "/dev/ttyS0");
+        return getSP(context).getString(KEY_SP_433_SERIAL_PORT, "");
     }
 
     public static void set433SerialPort(Context context, String path) {

+ 1 - 0
common/src/main/res/values/attrs.xml

@@ -103,6 +103,7 @@
     <attr name="myBackgroundColor" format="color"/>
     <attr name="myStatusBarColor" format="color"/>
     <attr name="myTextColor" format="color"/>
+    <attr name="verTextColor" format="color"/>
     <attr name="listBgColor" format="color"/>
     <attr name="selectImgColor" format="color"/>
 </resources>