Procházet zdrojové kódy

增加版本号显示

weizhengliang před 3 roky
rodič
revize
93ac374752

+ 2 - 2
build.gradle

@@ -49,12 +49,12 @@ buildscript {
     /**
      * APP版本码
      */
-    ext.app_version_code = 7
+    ext.app_version_code = 9
 
     /**
      * APP版本号
      */
-    ext.app_version = "1.1.1"
+    ext.app_version = "1.1.3"
 
     /**
      * 项目依赖库

+ 2 - 0
callingbed/src/main/java/com/wdkl/app/ncs/callingbed/fragment/MainFragment.kt

@@ -131,6 +131,8 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
             ll_empty.visibility = View.GONE
             presenter.loadCustomInfo(Constant.CUSTOM_ID)
         }
+
+        tv_version.text = "V"+BuildConfig.VERSION_NAME+"_"+BuildConfig.VERSION_CODE
     }
 
     @Subscribe(threadMode = ThreadMode.MAIN)

+ 2 - 0
callingbed/src/main/java/com/wdkl/app/ncs/callingbed/fragment/QrCodeFragment.kt

@@ -41,6 +41,8 @@ class QrCodeFragment : BaseFragment<QrCodeFragmentPresenter, QrcodeViewBinding>(
             tv_bed_name.setTextColor(resources.getColor(R.color.main_color))
         }
 
+        tv_version.text = "V"+BuildConfig.VERSION_NAME+"_"+BuildConfig.VERSION_CODE
+
         Thread{
             //val logoBitmap = BitmapFactory.decodeResource(resources, R.mipmap.erlogo)
             var builder = StringBuilder()

+ 1 - 1
callingbed/src/main/res/layout/main_view.xml

@@ -171,7 +171,7 @@
                     android:drawablePadding="10dp"
                     android:textSize="24sp"
                     android:textColor="@color/black"
-                    android:text="医嘱: "/>
+                    android:text=""/>
                 <com.wdkl.ncs.android.lib.widget.MarqueeTextView
                     android:id="@+id/tv_order_content"
                     android:layout_width="match_parent"

+ 13 - 1
callingbed/src/main/res/layout/view_bed_name.xml

@@ -6,12 +6,24 @@
 
     <TextView
         android:id="@+id/tv_bed_name"
-        android:layout_width="match_parent"
+        android:layout_width="0dp"
         android:layout_height="match_parent"
+        android:layout_weight="1"
         android:background="@color/white"
         android:paddingLeft="24dp"
         android:gravity="center_vertical"
         android:textColor="@color/main_color"
         android:textSize="54sp"
         android:text=""/>
+
+    <TextView
+        android:id="@+id/tv_version"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:padding="6dp"
+        android:background="@color/white"
+        android:gravity="bottom"
+        android:textColor="@color/black"
+        android:textSize="16sp"
+        android:text="v--"/>
 </LinearLayout>