瀏覽代碼

<修改设置显示>

weizhengliang 4 年之前
父節點
當前提交
eb70198afa

+ 51 - 19
nursehome/src/main/java/com/wdkl/ncs/android/component/nursehome/activity/NurseHomeActivity.kt

@@ -90,6 +90,9 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
     //呼叫对方设备id
     var callTargetId: Int? = -1
 
+    //当前选中的button id
+    var select_id: Int = 0
+
     //来电设备id
     //private var fromId: Int = -1
     //Interaction ID
@@ -338,45 +341,74 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
     override fun onClick(p0: View) {
        when(p0.id){
            R.id.home_radio_bt ->{
-               showLeftFragment(CallRecordsFragment())
-               showMiddleFragment(FramePartFragment())
+               if (select_id != 0) {
+                   select_id = 0
+                   showLeftFragment(CallRecordsFragment())
+                   showMiddleFragment(FramePartFragment())
+               }
            }
            R.id.broadcast_radio_bt ->{
-               showLeftFragment(CallRecordsFragment())
-               showRightFragment(BroadcastFragment())
+               if (select_id != 1) {
+                   select_id = 1
+                   showLeftFragment(CallRecordsFragment())
+                   showRightFragment(BroadcastFragment())
+               }
            }
            R.id.visit_an_extension_radio_bt ->{
+               if (select_id != 2) {
+                   select_id = 2
+               }
                showLeftFragment(CallRecordsFragment())
                showMiddleFragment(VisitManagementFragment())
            }
            R.id.doctor_host_radio_bt ->{
-               showLeftFragment(CallRecordsFragment())
-               showMiddleFragment(DoctorHostFragment())
+               if (select_id != 3) {
+                   select_id = 3
+                   showLeftFragment(CallRecordsFragment())
+                   showMiddleFragment(DoctorHostFragment())
+               }
            }
            R.id.inpatient_ward_radio_bt ->{
-
-               showLeftFragment(InpatientWardFragment())
-               showMiddleFragment(BedsInTheWardFragment())
+               if (select_id != 4) {
+                   select_id = 4
+                   showLeftFragment(InpatientWardFragment())
+                   showMiddleFragment(BedsInTheWardFragment())
+               }
            }
            R.id.sickbed_radio_bt ->{
-               showLeftFragment(CallRecordsFragment())
-               showMiddleFragment(SickbedFragment())
+               if (select_id != 5) {
+                   select_id = 5
+                   showLeftFragment(CallRecordsFragment())
+                   showMiddleFragment(SickbedFragment())
+               }
            }
            R.id.nurse_move_radio_bt ->{
-               showLeftFragment(CallRecordsFragment())
-               showMiddleFragment(NurseMoveFragment())
+               if (select_id != 6) {
+                   select_id = 6
+                   showLeftFragment(CallRecordsFragment())
+                   showMiddleFragment(NurseMoveFragment())
+               }
            }
            R.id.other_host_radio_bt ->{
-               showLeftFragment(CallRecordsFragment())
-               showMiddleFragment(OtherHostFragment())
+               if (select_id != 7) {
+                   select_id = 7
+                   showLeftFragment(CallRecordsFragment())
+                   showMiddleFragment(OtherHostFragment())
+               }
            }
            R.id.collocation_radio_bt ->{
-               showLeftFragment(CallRecordsFragment())
-               showMiddleFragment(TrustManagementFragment())
+               if (select_id != 8) {
+                   select_id = 8
+                   showLeftFragment(CallRecordsFragment())
+                   showMiddleFragment(TrustManagementFragment())
+               }
            }
            R.id.system_settings_radio_bt ->{
-               showLeftFragment(CallRecordsFragment())
-               showRightFragment(SystemSettingsFragment())
+               if (select_id != 9) {
+                   select_id = 9
+                   //showLeftFragment(CallRecordsFragment())
+                   showRightFragment(SystemSettingsFragment())
+               }
            }
 
 

+ 1 - 1
nursehome/src/main/java/com/wdkl/ncs/android/component/nursehome/fragment/CallRecordsFragment.kt

@@ -305,7 +305,7 @@ class CallRecordsFragment: BaseFragment<CallRecordsFragmentPresenter, FragmentCa
     @Subscribe(threadMode = ThreadMode.MAIN)
     fun onMoonEvent(messageEvent: MessageEvent) {
 //        Log.e(TAG,"收到tcp消息")
-        var messageEvent = messageEvent.getMessage() as TcpModel
+//        var messageEvent = messageEvent.getMessage() as TcpModel
 //        if(messageEvent.getAction() === TcpAction.EventAction.KEY_CLICK){
 //
 //            Log.e(TAG,"收到tcp消息"+messageEvent.toJson())

二進制
nursehome/src/main/res/drawable-mdpi/bg_bottom_btn.png


+ 5 - 0
nursehome/src/main/res/drawable/selector_bottom_btn_text_color.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/text_name_color" android:state_checked="true"/>
+    <item android:color="@color/white"/>
+</selector>

+ 7 - 5
nursehome/src/main/res/layout/activity_nurse_home.xml

@@ -234,10 +234,10 @@
                             android:layout_height="match_parent"
                             android:layout_weight="1"
                             android:button="@null"
-                            android:drawableLeft="@drawable/selt_home_icon"
+                            android:drawableLeft="@drawable/shou_ye_no"
                             android:drawablePadding="10px"
                             android:gravity="center"
-                            android:textColor="#FFFFFF"
+                            android:textColor="@drawable/selector_bottom_btn_text_color"
                             android:text="首页"
                             android:textSize="16px" />
 
@@ -247,9 +247,10 @@
                             android:layout_height="match_parent"
                             android:layout_weight="1"
                             android:button="@null"
-                            android:drawableLeft="@drawable/selt_broadcast_icon"
+                            android:drawableLeft="@drawable/guang_bo"
+                            android:drawablePadding="10px"
                             android:gravity="center"
-                            android:textColor="#FFFFFF"
+                            android:textColor="@drawable/selector_bottom_btn_text_color"
                             android:text="广播"
                             android:textSize="16px"
                             android:visibility="invisible"
@@ -374,8 +375,9 @@
                             android:layout_weight="1"
                             android:button="@null"
                             android:drawableLeft="@drawable/selt_set_icon"
+                            android:drawablePadding="10px"
                             android:gravity="center"
-                            android:textColor="#FFFFFF"
+                            android:textColor="@drawable/selector_bottom_btn_text_color"
                             android:text="系统设置"
                             android:textSize="16px" />
 <!--                        <TextView-->

+ 2 - 1
nursehome/src/main/res/layout/fragment_frame_part.xml

@@ -10,7 +10,8 @@
             android:id="@+id/indexes_radiog"
             android:layout_width="22px"
             android:layout_height="match_parent"
-            android:background="@drawable/sp_indexes_bg">
+            android:background="@drawable/sp_indexes_bg"
+            android:visibility="gone">
 
             <RadioButton
                 android:id="@+id/one_radiob"

+ 13 - 12
nursehome/src/main/res/layout/fragment_system_settings.xml

@@ -40,14 +40,14 @@
                         android:layout_marginBottom="5px"
                         android:text="白昼设置"
                         android:textColor="#000000"
-                        android:textSize="14px" />
+                        android:textSize="16px" />
 
                     <com.wdkl.ncs.android.lib.widget.DoubleSlideSeekBar
                         android:id="@+id/doubleslide_withoutrule"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="-10px"
-                        android:layout_marginRight="30px"
+                        android:layout_marginRight="10px"
                         custom:lineHeight="5dp"
                         custom:textSizes="16px"
                         custom:textColors="#e40627"
@@ -55,12 +55,11 @@
                         custom:outColor="#ace208"
                         custom:imageLow="@drawable/imgv_slide"
                         custom:imageBig="@drawable/imgv_slide"
-                        custom:imagewidth="30dp"
-                        custom:imageheight="30dp"
+                        custom:imagewidth="20dp"
+                        custom:imageheight="20dp"
                         custom:hasRule="false"
                         custom:bigValue="49"
-                        custom:smallValue="0"
-                        />
+                        custom:smallValue="0" />
 
                 </LinearLayout>
 
@@ -141,7 +140,7 @@
                     android:paddingLeft="6px">
 
                     <TextView
-                        android:layout_width="wrap_content"
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="5px"
                         android:layout_marginBottom="15px"
@@ -652,7 +651,7 @@
                             android:layout_gravity="center_vertical"
                             android:text="通话模式:"
                             android:textColor="#000000"
-                            android:textSize="16px" />
+                            android:textSize="14px" />
 
                         <RadioGroup
                             android:id="@+id/talk_mode_radiogrp"
@@ -664,14 +663,14 @@
                                 android:id="@+id/single_pass_mode_radiobt"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:text="单通模式"
+                                android:text="单通"
                                 android:textSize="14px" />
 
                             <RadioButton
                                 android:id="@+id/two_way_mode_radiobt"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:text="双通模式"
+                                android:text="双通"
                                 android:textSize="14px" />
                         </RadioGroup>
 
@@ -1313,15 +1312,17 @@
                 </LinearLayout>
 
                 <LinearLayout
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginTop="10dp"
-                    android:layout_marginBottom="20dp">
+                    android:layout_marginBottom="10dp"
+                    android:gravity="center">
 
                     <TextView
                         android:id="@+id/software_and_information_tv"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
+                        android:padding="4dp"
                         android:text=""
                         android:textColor="#000000"
                         android:textSize="14px" />

+ 8 - 0
nursehome/src/main/res/values/colors.xml

@@ -6,4 +6,12 @@
 
     <color name="red_color">#FD3B30</color>
     <color name="green">#00FF00</color>
+
+    <color name="white">#ffffff</color>
+    <color name="text_black">#808080</color>
+    <color name="title_text">#F78B8F</color>
+    <color name="text_room_color">#020202</color>
+    <color name="text_name_color">#B4B4B4</color>
+
+    <color name="main_color">#2F9DF1</color>
 </resources>