Procházet zdrojové kódy

优化通话界面显示及操作

weizhengliang před 3 roky
rodič
revize
7895315752

+ 3 - 2
callingbed/src/main/java/com/wdkl/app/ncs/callingbed/activity/CallingbedActivity.kt

@@ -811,7 +811,6 @@ class CallingbedActivity :BaseActivity<CallingbedActivityPresenter, CallingbedMa
         } else if (Constant.CALL_STATE == Constant.CALL_INCOMING) {
         } else if (Constant.CALL_STATE == Constant.CALL_INCOMING) {
             //来电接听
             //来电接听
             EventBus.getDefault().post(MessageEvent("accept", Constant.EVENT_SERIAL_EVENT))
             EventBus.getDefault().post(MessageEvent("accept", Constant.EVENT_SERIAL_EVENT))
-            Constant.CALL_STATE = Constant.CALL_STANDBY
         }
         }
     }
     }
 
 
@@ -832,7 +831,9 @@ class CallingbedActivity :BaseActivity<CallingbedActivityPresenter, CallingbedMa
         } else if (Constant.CALL_STATE == Constant.CALL_INCOMING) {
         } else if (Constant.CALL_STATE == Constant.CALL_INCOMING) {
             //来电接听
             //来电接听
             EventBus.getDefault().post(MessageEvent("accept", Constant.EVENT_SERIAL_EVENT))
             EventBus.getDefault().post(MessageEvent("accept", Constant.EVENT_SERIAL_EVENT))
-            Constant.CALL_STATE = Constant.CALL_STANDBY
+        } else if (Constant.CALL_STATE == Constant.CALL_CALLING) {
+            //挂断
+            EventBus.getDefault().post(MessageEvent("handoff", Constant.EVENT_SERIAL_EVENT))
         }
         }
     }
     }
 
 

+ 1 - 1
callingbed/src/main/java/com/wdkl/app/ncs/callingbed/fragment/SkyCallFragment.kt

@@ -169,7 +169,7 @@ class SkyCallFragment: BaseCallFragment(), CallSession.CallSessionCallback {
         Constant.CALL_STATE = Constant.CALL_INCOMING
         Constant.CALL_STATE = Constant.CALL_INCOMING
         sky_voice_call_calling_text.text = "有新来电..."
         sky_voice_call_calling_text.text = "有新来电..."
         sky_voice_call_outgoing.visibility = View.GONE
         sky_voice_call_outgoing.visibility = View.GONE
-        sky_voice_call_incoming.visibility = View.VISIBLE
+        sky_voice_call_incoming.visibility = View.GONE
         sky_voice_call_timeout.visibility = View.GONE
         sky_voice_call_timeout.visibility = View.GONE
         sky_voice_call_timer.visibility = View.GONE
         sky_voice_call_timer.visibility = View.GONE
         cancelTimer()
         cancelTimer()

+ 3 - 2
callingbed/src/main/res/layout/sky_voice_call_layout.xml

@@ -36,7 +36,7 @@
                     android:id="@+id/sky_voice_call_head_img"
                     android:id="@+id/sky_voice_call_head_img"
                     android:layout_width="100dp"
                     android:layout_width="100dp"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
-                    android:layout_marginTop="40dp"
+                    android:layout_marginTop="100dp"
                     android:scaleType="centerInside"
                     android:scaleType="centerInside"
                     android:src="@drawable/ic_nurse" />
                     android:src="@drawable/ic_nurse" />
 
 
@@ -87,7 +87,8 @@
                     android:layout_width="100dp"
                     android:layout_width="100dp"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_marginTop="20dp"
                     android:layout_marginTop="20dp"
-                    android:src="@drawable/selector_call_hangup" />
+                    android:src="@drawable/selector_call_hangup"
+                    android:visibility="gone"/>
             </LinearLayout>
             </LinearLayout>
 
 
             <!--来电-->
             <!--来电-->