Ver código fonte

调整主界面显示,增加扫码点餐文字

weizhengliang 2 anos atrás
pai
commit
f1b25a0aa4

+ 4 - 7
android_bed/src/main/h5_3128/java/com/wdkl/app/ncs/callingbed/fragment/MainFragment.kt

@@ -69,9 +69,11 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
         //显示入住信息
         tv_custom_name.text = customInfo.named
         if (customInfo.sex == 0) {
-            tv_custom_gender.setBackgroundResource(R.mipmap.ic_gender_female)
+            //tv_custom_gender.setBackgroundResource(R.mipmap.ic_gender_female)
+            tv_custom_gender.text = "女"
         } else if (customInfo.sex == 1) {
-            tv_custom_gender.setBackgroundResource(R.mipmap.ic_gender_male)
+            //tv_custom_gender.setBackgroundResource(R.mipmap.ic_gender_male)
+            tv_custom_gender.text = "男"
         }
         tv_custom_age.text = "" + customInfo.age + customInfo.ageUnit
         if (customInfo.inDate != null) {
@@ -80,11 +82,6 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
         if (!TextUtils.isEmpty(customInfo.cardNo)) {
             tv_custom_card_no.text = StringUtil.getResString(R.string.card_no) + customInfo.cardNo
         }
-        if (TextUtils.isEmpty(customInfo.advice)) {
-            tv_order_content.text = StringUtil.getResString(R.string.str_empty)
-        } else {
-            tv_order_content.text = customInfo.advice
-        }
 
         if (Constant.doctorValid == 1) {
             ll_doctor_view.visibility = View.VISIBLE

+ 6 - 9
android_bed/src/main/h5_3128/res/layout/item_nurse_config.xml

@@ -8,12 +8,6 @@
     android:background="#E7E7E7"
     android:orientation="vertical">
 
-    <!--<TextView
-        android:id="@+id/tv_nurse_color"
-        android:layout_width="8dp"
-        android:layout_height="match_parent"
-        android:background="@color/main_color"/>-->
-
     <TextView
         android:id="@+id/tv_nurse_config_name"
         android:layout_width="match_parent"
@@ -27,18 +21,21 @@
         android:textSize="20sp"
         android:textColor="@color/white"/>
 
-    <TextView
+    <com.wdkl.ncs.android.lib.widget.MarqueeTextView
         android:id="@+id/tv_nurse_config_value"
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_weight="1"
         android:paddingRight="6dp"
         android:paddingBottom="6dp"
+        android:ellipsize="marquee"
+        android:focusable="true"
+        android:focusableInTouchMode="true"
+        android:marqueeRepeatLimit="marquee_forever"
         android:singleLine="true"
-        android:ellipsize="end"
         android:gravity="right|bottom"
         android:text="@string/str_empty"
-        android:textSize="22sp"
+        android:textSize="24sp"
         android:textColor="@color/white"/>
 
 </LinearLayout>

+ 40 - 48
android_bed/src/main/h5_3128/res/layout/main_view.xml

@@ -45,7 +45,7 @@
                     android:layout_height="wrap_content"
                     android:layout_marginTop="4dp"
                     android:textColor="@color/black"
-                    android:textSize="18sp"
+                    android:textSize="24sp"
                     android:text="@string/str_empty"/>
             </LinearLayout>
 
@@ -55,7 +55,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="0dp"
                 android:layout_weight="1"
-                android:layout_marginTop="10dp"
+                android:layout_marginTop="4dp"
                 android:gravity="center_horizontal"
                 android:orientation="vertical"
                 android:background="@color/white">
@@ -78,7 +78,7 @@
                     android:layout_height="wrap_content"
                     android:layout_marginTop="4dp"
                     android:textColor="@color/black"
-                    android:textSize="18sp"
+                    android:textSize="24sp"
                     android:text="@string/str_empty"/>
             </LinearLayout>
         </LinearLayout>
@@ -123,8 +123,8 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:paddingTop="4dp"
-                android:paddingLeft="12dp"
-                android:paddingRight="12dp"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp"
                 android:background="@color/white"
                 android:orientation="vertical"
                 android:visibility="gone">
@@ -156,18 +156,21 @@
                             android:textSize="20sp"
                             android:textColor="@color/white"/>
 
-                        <TextView
+                        <com.wdkl.ncs.android.lib.widget.MarqueeTextView
                             android:id="@+id/tv_nurse_value6"
                             android:layout_width="match_parent"
                             android:layout_height="0dp"
                             android:layout_weight="1"
                             android:paddingRight="6dp"
                             android:paddingBottom="6dp"
+                            android:ellipsize="marquee"
+                            android:focusable="true"
+                            android:focusableInTouchMode="true"
+                            android:marqueeRepeatLimit="marquee_forever"
                             android:singleLine="true"
-                            android:ellipsize="end"
                             android:gravity="right|bottom"
                             android:text="@string/str_empty"
-                            android:textSize="22sp"
+                            android:textSize="24sp"
                             android:textColor="@color/white"/>
                     </LinearLayout>
 
@@ -191,18 +194,21 @@
                             android:textSize="20sp"
                             android:textColor="@color/white"/>
 
-                        <TextView
+                        <com.wdkl.ncs.android.lib.widget.MarqueeTextView
                             android:id="@+id/tv_nurse_value7"
                             android:layout_width="match_parent"
                             android:layout_height="0dp"
                             android:layout_weight="1"
                             android:paddingRight="6dp"
                             android:paddingBottom="6dp"
+                            android:ellipsize="marquee"
+                            android:focusable="true"
+                            android:focusableInTouchMode="true"
+                            android:marqueeRepeatLimit="marquee_forever"
                             android:singleLine="true"
-                            android:ellipsize="end"
                             android:gravity="right|bottom"
                             android:text="@string/str_empty"
-                            android:textSize="22sp"
+                            android:textSize="24sp"
                             android:textColor="@color/white"/>
                     </LinearLayout>
 
@@ -226,27 +232,35 @@
                             android:textSize="20sp"
                             android:textColor="@color/white"/>
 
-                        <TextView
+                        <com.wdkl.ncs.android.lib.widget.MarqueeTextView
                             android:id="@+id/tv_nurse_value8"
                             android:layout_width="match_parent"
                             android:layout_height="0dp"
                             android:layout_weight="1"
                             android:paddingRight="6dp"
                             android:paddingBottom="6dp"
+                            android:ellipsize="marquee"
+                            android:focusable="true"
+                            android:focusableInTouchMode="true"
+                            android:marqueeRepeatLimit="marquee_forever"
                             android:singleLine="true"
-                            android:ellipsize="end"
                             android:gravity="right|bottom"
                             android:text="@string/str_empty"
-                            android:textSize="22sp"
+                            android:textSize="24sp"
                             android:textColor="@color/white"/>
                     </LinearLayout>
                 </LinearLayout>
 
-                <TextView
+                <com.wdkl.ncs.android.lib.widget.MarqueeTextView
                     android:id="@+id/tv_custom_name"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:textSize="56sp"
+                    android:ellipsize="marquee"
+                    android:focusable="true"
+                    android:focusableInTouchMode="true"
+                    android:marqueeRepeatLimit="marquee_forever"
+                    android:singleLine="true"
+                    android:textSize="72sp"
                     android:textStyle="bold"
                     android:textColor="@color/main_color"
                     android:text="---"/>
@@ -256,7 +270,7 @@
                     android:layout_height="wrap_content"
                     android:layout_below="@id/tv_custom_name"
                     android:layout_marginLeft="4dp"
-                    android:background="@mipmap/ic_gender_male"/>
+                    android:textSize="28sp"/>
                 <TextView
                     android:id="@+id/tv_custom_age"
                     android:layout_width="wrap_content"
@@ -289,40 +303,18 @@
                     android:id="@+id/main_view_qr_code"
                     android:layout_width="180dp"
                     android:layout_height="180dp"
-                    android:layout_marginRight="-2dp"
+                    android:layout_marginRight="-4dp"
                     android:layout_alignParentRight="true"/>
-                <!--<TextView
-                    android:id="@+id/tv_order_title"
-                    android:layout_width="match_parent"
+                <TextView
+                    android:layout_width="180dp"
                     android:layout_height="wrap_content"
-                    android:layout_below="@id/tv_custom_indate"
-                    android:layout_marginTop="20dp"
-                    android:padding="10dp"
-                    android:background="#F3F9FE"
-                    android:drawableLeft="@mipmap/ic_order"
-                    android:drawablePadding="10dp"
-                    android:textSize="24sp"
-                    android:textColor="@color/black"
-                    android:text=""/>-->
-                <com.wdkl.ncs.android.lib.widget.MarqueeTextView
-                    android:id="@+id/tv_order_content"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
                     android:layout_below="@id/main_view_qr_code"
-                    android:layout_above="@id/ll_nurse_more"
-                    android:layout_marginTop="4dp"
-                    android:padding="10dp"
-                    android:ellipsize="marquee"
-                    android:focusable="true"
-                    android:focusableInTouchMode="true"
-                    android:marqueeRepeatLimit="marquee_forever"
-                    android:scrollHorizontally="true"
-                    android:singleLine="true"
-                    android:background="#F3F9FE"
-                    android:textSize="24sp"
-                    android:textColor="#131313"
-                    android:text="@string/str_empty"
-                    android:lineSpacingExtra="12dp"/>
+                    android:layout_marginRight="-10dp"
+                    android:layout_alignParentRight="true"
+                    android:gravity="center"
+                    android:text="扫码点餐"
+                    android:textColor="@color/main_color"
+                    android:textSize="24sp"/>
             </RelativeLayout>
         </FrameLayout>
 

+ 2 - 1
android_bed/src/main/h5_3128/res/layout/qrcode_view.xml

@@ -57,7 +57,8 @@
                 android:layout_marginLeft="10dp"
                 android:text="Version:"
                 android:textColor="@color/black"
-                android:textSize="20sp" />
+                android:textSize="20sp"
+                android:visibility="gone" />
 
             <TextView
                 android:id="@+id/tv_mcu_version"

+ 9 - 4
android_bed/src/main/h5_3128/res/layout/view_bed_name.xml

@@ -2,9 +2,9 @@
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="96dp">
+    android:layout_height="112dp">
 
-    <TextView
+    <com.wdkl.ncs.android.lib.widget.MarqueeTextView
         android:id="@+id/tv_bed_name"
         android:layout_width="0dp"
         android:layout_height="match_parent"
@@ -13,8 +13,13 @@
         android:background="@color/white"
         android:paddingLeft="24dp"
         android:gravity="center_vertical"
+        android:ellipsize="marquee"
+        android:focusable="true"
+        android:focusableInTouchMode="true"
+        android:marqueeRepeatLimit="marquee_forever"
+        android:singleLine="true"
         android:textColor="@color/main_color"
-        android:textSize="86sp"
+        android:textSize="96sp"
         android:textStyle="bold"
         android:text="--"/>
 
@@ -26,6 +31,6 @@
         android:background="@color/white"
         android:gravity="bottom"
         android:textColor="@color/black"
-        android:textSize="16sp"
+        android:textSize="18sp"
         android:text="v--"/>
 </LinearLayout>

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

@@ -1,5 +1,5 @@
 <resources>
-    <string name="javashop_app_name">NCS-7寸床头机</string>
+    <string name="javashop_app_name">NCS-5寸床头机</string>
     <string name="javashop_qrcode_name">扫啊扫</string>
     <string name="javashop_navigation_home_title">首页</string>
     <string name="javashop_navigation_category_title">分类</string>