weizhengliang 6 місяців тому
батько
коміт
dffdf8dc14
70 змінених файлів з 877 додано та 569 видалено
  1. 9 11
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/AppUpdateActivity.kt
  2. 7 1
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/BaseActivity.kt
  3. 4 4
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/ChannelImActivity.kt
  4. 1 1
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/NewCallListActivity.kt
  5. 6 5
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/NewEventListActivity.kt
  6. 2 2
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/TakeoverActivity.kt
  7. 5 5
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/VoiceMsgActivity.kt
  8. 21 26
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/WatchCallRecordsActivity.kt
  9. 2 2
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/WatchContactsActivity.kt
  10. 33 21
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/WatchHome2Activity.kt
  11. 58 8
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/WatchUserSettingActivity.java
  12. 1 1
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/ChannelImItemAdapter.kt
  13. 2 1
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/NewCallItemAdapter.kt
  14. 5 5
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/NewEventItemAdapter.kt
  15. 11 24
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/TakeoverItemAdapter.kt
  16. 52 19
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/WatchCallRecordsItemAdapter.kt
  17. 3 17
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/WatchContactsItemAdapter.kt
  18. 1 37
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/helper/AppUpdateHelper.java
  19. 3 20
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/service/PhoneStateReceiver.java
  20. 20 7
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/service/WdKeepAliveService.kt
  21. 2 2
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/ui/CallSingleActivity.java
  22. 4 3
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/ui/FragmentAudio.java
  23. 1 1
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/ui/FragmentSipAudio.java
  24. 13 19
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/ui/SingleCallFragment.java
  25. 140 0
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/util/LanguageSetDialogHelper.java
  26. 16 16
      android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/util/RecordHelper.java
  27. BIN
      android_mobile/src/main/yd_watch_2/res/drawable/checked_20.png
  28. BIN
      android_mobile/src/main/yd_watch_2/res/drawable/unchecked_20.png
  29. 2 2
      android_mobile/src/main/yd_watch_2/res/layout/activity_app_update.xml
  30. 1 1
      android_mobile/src/main/yd_watch_2/res/layout/activity_call_list.xml
  31. 1 1
      android_mobile/src/main/yd_watch_2/res/layout/activity_channel_im_list.xml
  32. 6 8
      android_mobile/src/main/yd_watch_2/res/layout/activity_sip_voip_audio.xml
  33. 9 12
      android_mobile/src/main/yd_watch_2/res/layout/activity_sip_voip_audio_ringing.xml
  34. 5 6
      android_mobile/src/main/yd_watch_2/res/layout/activity_sos_emergency_call.xml
  35. 1 1
      android_mobile/src/main/yd_watch_2/res/layout/activity_voice_msg.xml
  36. 5 7
      android_mobile/src/main/yd_watch_2/res/layout/activity_web_rtc_voip_audio.xml
  37. 8 11
      android_mobile/src/main/yd_watch_2/res/layout/activity_web_rtc_voip_audio_ringing.xml
  38. 6 8
      android_mobile/src/main/yd_watch_2/res/layout/adapter_client_list.xml
  39. 15 13
      android_mobile/src/main/yd_watch_2/res/layout/adapter_watch_call_records_item.xml
  40. 50 58
      android_mobile/src/main/yd_watch_2/res/layout/adapter_watch_contacts_item.xml
  41. 0 3
      android_mobile/src/main/yd_watch_2/res/layout/av_p2p_audio_incoming.xml
  42. 3 3
      android_mobile/src/main/yd_watch_2/res/layout/av_p2p_audio_outgoing.xml
  43. 3 3
      android_mobile/src/main/yd_watch_2/res/layout/av_p2p_video_connected_action.xml
  44. 3 3
      android_mobile/src/main/yd_watch_2/res/layout/av_p2p_video_incoming_action.xml
  45. 2 2
      android_mobile/src/main/yd_watch_2/res/layout/av_p2p_video_outgoing_action.xml
  46. 1 1
      android_mobile/src/main/yd_watch_2/res/layout/back_layout.xml
  47. 12 11
      android_mobile/src/main/yd_watch_2/res/layout/event_list_item.xml
  48. 1 1
      android_mobile/src/main/yd_watch_2/res/layout/float_call_window_layout.xml
  49. 1 1
      android_mobile/src/main/yd_watch_2/res/layout/fragment_audio.xml
  50. 1 1
      android_mobile/src/main/yd_watch_2/res/layout/fragment_video.xml
  51. 2 2
      android_mobile/src/main/yd_watch_2/res/layout/im_dialog_lay.xml
  52. 1 1
      android_mobile/src/main/yd_watch_2/res/layout/im_play_dialog_lay.xml
  53. 91 0
      android_mobile/src/main/yd_watch_2/res/layout/language_set_dialog.xml
  54. 9 0
      android_mobile/src/main/yd_watch_2/res/layout/spinner_item.xml
  55. 9 8
      android_mobile/src/main/yd_watch_2/res/layout/takeover_item.xml
  56. 106 37
      android_mobile/src/main/yd_watch_2/res/layout/user_setting_layout.xml
  57. 0 41
      android_mobile/src/main/yd_watch_2/res/layout/videoroom_item.xml
  58. 2 2
      android_mobile/src/main/yd_watch_2/res/layout/watch_activity_call_records.xml
  59. 8 8
      android_mobile/src/main/yd_watch_2/res/layout/watch_activity_dialing_voice.xml
  60. 24 24
      android_mobile/src/main/yd_watch_2/res/layout/watch_activity_event.xml
  61. 9 8
      android_mobile/src/main/yd_watch_2/res/layout/watch_activity_home2.xml
  62. 21 8
      android_mobile/src/main/yd_watch_2/res/layout/watch_activity_register.xml
  63. 14 15
      android_mobile/src/main/yd_watch_2/res/layout/watch_activity_voice_calls.xml
  64. 1 0
      app/src/main/AndroidManifest.xml
  65. 1 0
      app/src/main/gionee/AndroidManifest.xml
  66. 1 0
      app/src/main/sharedUserId/AndroidManifest.xml
  67. 5 0
      resource/src/main/res/values-es/strings.xml
  68. 5 0
      resource/src/main/res/values-ru/strings.xml
  69. 5 0
      resource/src/main/res/values-zh/strings.xml
  70. 5 0
      resource/src/main/res/values/strings.xml

+ 9 - 11
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/AppUpdateActivity.kt

@@ -70,12 +70,12 @@ class AppUpdateActivity : BaseActivity<AppUpdatePresenter, ActivityAppUpdateBind
             if (!TextUtils.isEmpty(appInfo.appPath)) {
                 downLoadAPK(urlManager.base + ":8006/" + appInfo.appPath)
             } else {
-                showMessage("下载路径异常")
+                showMessage(R.string.download_error)
                 finish()
             }
         } else {
-            showMessage("本机已经是最新版本")
-            activity_calling_bed_text_download.text = "本机已经是最新版本"
+            showMessage(R.string.update_no_required)
+            activity_calling_bed_text_download.setText(R.string.update_no_required)
             activity_appupdate_dialog_progressview.visibility = View.GONE
             WdKeepAliveService.updateLastTime = System.currentTimeMillis() / 1000
             AppTool.Time.delay(1000){
@@ -99,9 +99,9 @@ class AppUpdateActivity : BaseActivity<AppUpdatePresenter, ActivityAppUpdateBind
         activity_appupdate_dialog_progressview.setCurProgress(0)
         HttpHelper.download(url, object : HttpHelper.DownloadListener {
             override fun onDownloadSuccess() {
-                Log.d("download", "onDownloadSuccess==" + "成功")
+                Log.d("download", "onDownloadSuccess==")
                 runOnUiThread {
-                    activity_calling_bed_text_download.text = "正在安装,请稍后..."
+                    activity_calling_bed_text_download.setText(R.string.updating)
                 }
                 startInstallApk()
             }
@@ -113,7 +113,7 @@ class AppUpdateActivity : BaseActivity<AppUpdatePresenter, ActivityAppUpdateBind
             }
 
             override fun onDownloadFailed() {
-                Log.d("download", "onDownloadFailed==" + "失败")
+                Log.d("download", "onDownloadFailed==")
                 finish()
             }
         })
@@ -124,14 +124,14 @@ class AppUpdateActivity : BaseActivity<AppUpdatePresenter, ActivityAppUpdateBind
             AppUpdateHelper.updateApp(this, object : AppUpdateHelper.UpdateCallBack {
                 override fun onFailed() {
                     runOnUiThread {
-                        showMessage("升级失败")
+                        showMessage(R.string.update_fail)
                         finish()
                     }
                 }
 
                 override fun onSuccess() {
                     runOnUiThread {
-                        showMessage("开始安装")
+                        showMessage(R.string.update_success)
                         finish()
                     }
                 }
@@ -150,13 +150,11 @@ class AppUpdateActivity : BaseActivity<AppUpdatePresenter, ActivityAppUpdateBind
     override fun destory() {
         Constants.allowVoiceMsg = true
         opened = false
-        //退出时重置呼叫状态
-        //DeviceChannel.calling = false
     }
 
     //数据加载错误
     override fun onError(message: String, type: Int) {
-        showMessage("获取升级数据失败")
+        showMessage(message)
         finish()
     }
 

+ 7 - 1
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/BaseActivity.kt

@@ -10,6 +10,8 @@ import androidx.databinding.DataBindingUtil
 import androidx.databinding.ViewDataBinding
 import com.enation.javashop.android.jrouter.JRouter
 import com.enation.javashop.utils.base.tool.BaseToolActivity
+import com.wdkl.ncs.android.component.home.settingconfig.SettingConfig
+import com.wdkl.ncs.android.component.home.util.LocaleMangerUtils
 import com.wdkl.ncs.android.lib.base.*
 import com.wdkl.ncs.android.lib.utils.AppTool
 import com.wdkl.ncs.android.lib.utils.debugLog
@@ -72,6 +74,10 @@ abstract class BaseActivity<PresenterType : BaseContract.BasePresenter, DataBind
      * @Note   Activity创建时进行相关的配置
      */
     override fun onCreate(savedInstanceState: Bundle?) {
+        //切换语言
+        val languageId: Int = SettingConfig.getLanguageId(this)
+        LocaleMangerUtils.setApplicationLanguageByIndex(this, languageId)
+
         try {
             JRouter.prepare().inject(this)
         }catch (e :Exception){
@@ -165,7 +171,7 @@ abstract class BaseActivity<PresenterType : BaseContract.BasePresenter, DataBind
         removeAllCallBack()
         /**处理android4.4.2 底层内存泄漏*/
         fixInputMethodManagerLeak(activity)
-        errorLog("PageDestory","页面销毁======>$localClassName")
+        //errorLog("PageDestory","页面销毁======>$localClassName")
     }
 
     /**

+ 4 - 4
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/ChannelImActivity.kt

@@ -113,7 +113,7 @@ class ChannelImActivity : BaseActivity<ChannelImPresenter, ActivityChannelImList
                     downTime = System.currentTimeMillis()
                     downY = event.getY()
                     RecordHelper.getInstance().startRecord()
-                    tv_channel_text.text = "松开留言,上滑取消"
+                    tv_channel_text.setText(R.string.str_voice_msg_btn_title)
                     voiceFile = RecordHelper.getInstance().audiofilePath
 
                     //按下时保持常亮
@@ -130,14 +130,14 @@ class ChannelImActivity : BaseActivity<ChannelImPresenter, ActivityChannelImList
                 MotionEvent.ACTION_UP -> {
                     upTime = System.currentTimeMillis()
                     RecordHelper.getInstance().stopRecord()
-                    tv_channel_text.text = "按住说话"
+                    tv_channel_text.setText(R.string.str_voice_msg_btn_text)
 
                     if (Math.abs(upTime - downTime) <= 1000) {
                         RecordHelper.getInstance().deleteAudioFile(voiceFile)
-                        showMessage("说话时间太短")
+                        showMessage(R.string.str_voice_msg_record_loss)
                     } else if(cancel) {
                         RecordHelper.getInstance().deleteAudioFile(voiceFile)
-                        showMessage("语音留言已取消")
+                        showMessage(R.string.str_voice_msg_record_cancel)
                     } else {
                         //上传语音留言
                         if (voiceFile != null) {

+ 1 - 1
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/NewCallListActivity.kt

@@ -260,7 +260,7 @@ class NewCallListActivity : BaseToolActivity(), NewCallItemAdapter.CallClickList
     }
 
     override fun onBackPressed() {
-        showMessage("您还有呼叫未处理")
+        showMessage(R.string.str_call_handle_warning)
     }
 
     private fun updateCallList() {

+ 6 - 5
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/NewEventListActivity.kt

@@ -142,7 +142,7 @@ class NewEventListActivity : BaseActivity<NewEventListPresenter, ActivityEventLi
 
     override fun onBackPressed() {
         if (!Constants.oldEvent) {
-            showMessage("您还有事件未处理")
+            showMessage(R.string.str_event_handle_warning)
         } else {
             super.onBackPressed()
         }
@@ -154,14 +154,14 @@ class NewEventListActivity : BaseActivity<NewEventListPresenter, ActivityEventLi
             //if (mVibrator!=null) mVibrator.cancel()
             val resTcpModel = messageEvent.getMessage() as TcpModel
             if (resTcpModel.type === TcpType.CALLBACK && resTcpModel.action === TcpAction.VoiceAction.FAILED) {
-                showMessage("呼叫失败,可能对方不在线")
+                showMessage(R.string.call_failed)
                 dismissDialog()
             }
         } else if (messageEvent.tag == 2) {
             //if (mVibrator!=null) mVibrator.cancel()
             val resTcpModel = messageEvent.getMessage() as TcpModel
             if (resTcpModel.action == TcpAction.VoiceAction.CALLING) {
-                showMessage("对方通话中")
+                showMessage(R.string.call_busy)
             }
         } else if (messageEvent.tag == 4) {
             val resTcpModel = messageEvent.getMessage() as TcpModel
@@ -169,8 +169,9 @@ class NewEventListActivity : BaseActivity<NewEventListPresenter, ActivityEventLi
                 if (resTcpModel.data != null) {
                     dismissDialog()
                     //if (mVibrator!=null) mVibrator.cancel()
-                    val responseInteractionVO = Gson().fromJson<InteractionVO>(resTcpModel.data.toString(), InteractionVO::class.java)
-                    showMessage("已响应"+responseInteractionVO.fromFrameFullName + " " + responseInteractionVO.data)
+                    val responseInteractionVO = Gson().fromJson(resTcpModel.data.toString(), InteractionVO::class.java)
+                    val text = getString(R.string.str_event_response, responseInteractionVO.fromFrameFullName, responseInteractionVO.data)
+                    showMessage(text)
 
                     var doFinish = false
                     val iterator = Constants.eventList.iterator()

+ 2 - 2
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/TakeoverActivity.kt

@@ -103,9 +103,9 @@ class TakeoverActivity: BaseActivity<TakeoverPresenter, ActivityTakeoverBinding>
         if (messageEvent.tag == 2) {
             val resTcpModel = messageEvent.getMessage() as TcpModel
             if (resTcpModel.action  == TcpAction.VoiceAction.FAILED){
-                showMessage("呼叫失败,可能对方不在线")
+                showMessage(R.string.call_failed)
             } else if (resTcpModel.action == TcpAction.VoiceAction.CALLING){
-                showMessage("对方通话中")
+                showMessage(R.string.call_busy)
             }
         }
     }

+ 5 - 5
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/VoiceMsgActivity.kt

@@ -87,7 +87,7 @@ class VoiceMsgActivity:BaseActivity<VoiceMsgPresenter,ActivityVoiceMsgBinding>()
                     downTime = System.currentTimeMillis()
                     downY = event.getY()
                     RecordHelper.getInstance().startRecord()
-                    tv_voice_text.text = "松开留言,上滑取消"
+                    tv_voice_text.setText(R.string.str_voice_msg_btn_title)
                     voice_call_timer.base = SystemClock.elapsedRealtime()
                     voice_call_timer.start()
                     voiceFile = RecordHelper.getInstance().audiofilePath
@@ -106,16 +106,16 @@ class VoiceMsgActivity:BaseActivity<VoiceMsgPresenter,ActivityVoiceMsgBinding>()
                 MotionEvent.ACTION_UP -> {
                     upTime = System.currentTimeMillis()
                     RecordHelper.getInstance().stopRecord()
-                    tv_voice_text.text = "按住说话"
+                    tv_voice_text.setText(R.string.str_voice_msg_btn_text)
                     voice_call_timer.base = SystemClock.elapsedRealtime()
                     voice_call_timer.stop()
 
                     if (Math.abs(upTime - downTime) <= 1000) {
                         RecordHelper.getInstance().deleteAudioFile(voiceFile)
-                        showMessage("说话时间太短")
+                        showMessage(R.string.str_voice_msg_record_loss)
                     } else if(cancel) {
                         RecordHelper.getInstance().deleteAudioFile(voiceFile)
-                        showMessage("语音留言已取消")
+                        showMessage(R.string.str_voice_msg_record_cancel)
                     } else {
                         //上传语音留言
                         if (voiceFile != null) {
@@ -208,7 +208,7 @@ class VoiceMsgActivity:BaseActivity<VoiceMsgPresenter,ActivityVoiceMsgBinding>()
         }
         RecordHelper.getInstance().stopRecord()
         RecordHelper.getInstance().deleteAudioFile(voiceFile)
-        showMessage("语音留言已取消")
+        showMessage(R.string.str_voice_msg_record_cancel)
         finish()
     }
 

+ 21 - 26
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/WatchCallRecordsActivity.kt

@@ -70,6 +70,8 @@ class WatchCallRecordsActivity : BaseActivity<WatchCallRecordsFragmentPresenter,
     var customerRecords = "CUSTOMER_RECORDS"
     var unread = "UNREAD"
 
+    val pageSize = 10
+
     var action: String? = null
     var receivedData: WatchContactsVO? = null
 
@@ -106,31 +108,35 @@ class WatchCallRecordsActivity : BaseActivity<WatchCallRecordsFragmentPresenter,
         action = intent.getStringExtra("action")
         customerId = intent.getStringExtra("customer_id").toString()
 
+        initCountDownTimer()
+    }
+
+    private fun loadRecords() {
         when(action){
             all->{
                 call_relyout.visibility = View.GONE
-                presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 0)
+                presenter.loadPage(all, 1, pageSize, Constants.deviceId, 0, 0)
 
                 refresh.setOnLoadMoreListener {
                     page += 1
-                    presenter.loadPage(all, page, 30, Constants.deviceId, 0, 0)
+                    presenter.loadPage(all, page, pageSize, Constants.deviceId, 0, 0)
                 }
                 refresh.setOnRefreshListener {
                     page = 1
-                    presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 0)
+                    presenter.loadPage(all, 1, pageSize, Constants.deviceId, 0, 0)
                 }
             }
             unread->{
                 call_relyout.visibility = View.GONE
-                presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 1)
+                presenter.loadPage(all, 1, pageSize, Constants.deviceId, 0, 1)
 
                 refresh.setOnLoadMoreListener {
                     page += 1
-                    presenter.loadPage(all, page, 30, Constants.deviceId, 0, 1)
+                    presenter.loadPage(all, page, pageSize, Constants.deviceId, 0, 1)
                 }
                 refresh.setOnRefreshListener {
                     page = 1
-                    presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 1)
+                    presenter.loadPage(all, 1, pageSize, Constants.deviceId, 0, 1)
                 }
             }
             customerRecords->{
@@ -165,10 +171,10 @@ class WatchCallRecordsActivity : BaseActivity<WatchCallRecordsFragmentPresenter,
                                 TcpClient.getInstance().sendTcp(tcpModel, true, transaction)
 
                             } else {
-                                showMessage("呼叫失败,可能手机号异常")
+                                showMessage(R.string.call_phone_failed)
                             }
                         } catch (e: Exception) {
-                            showMessage("呼叫失败,请检查手机号")
+                            showMessage(R.string.call_phone_failed)
                         }
                     } else {
                         val tcpModel = VoiceUtil.voiceCall(Constants.deviceId, receivedData!!.deviceId)
@@ -191,20 +197,18 @@ class WatchCallRecordsActivity : BaseActivity<WatchCallRecordsFragmentPresenter,
                     }
                 }
 
-                presenter.loadPage(customerRecords, 1, 30, Constants.deviceId, customerId.toInt(), -1)
+                presenter.loadPage(customerRecords, 1, pageSize, Constants.deviceId, customerId.toInt(), -1)
 
                 refresh.setOnLoadMoreListener {
                     page += 1
-                    presenter.loadPage(customerRecords, page, 30, Constants.deviceId, customerId.toInt(), -1)
+                    presenter.loadPage(customerRecords, page, pageSize, Constants.deviceId, customerId.toInt(), -1)
                 }
                 refresh.setOnRefreshListener {
                     page = 1
-                    presenter.loadPage(customerRecords, 1, 30, Constants.deviceId, customerId.toInt(), -1)
+                    presenter.loadPage(customerRecords, 1, pageSize, Constants.deviceId, customerId.toInt(), -1)
                 }
             }
         }
-
-        initCountDownTimer()
     }
 
     override fun bindEvent() {
@@ -274,17 +278,8 @@ class WatchCallRecordsActivity : BaseActivity<WatchCallRecordsFragmentPresenter,
     override fun onResume() {
         super.onResume()
         page = 1
-        when(action){
-            all->{
-                presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 0)
-            }
-            unread->{
-                presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 1)
-            }
-            customerRecords->{
-                presenter.loadPage(customerRecords, 1, 30, Constants.deviceId, customerId.toInt(), -1)
-            }
-        }
+
+        loadRecords()
     }
 
     fun initCountDownTimer() {
@@ -309,9 +304,9 @@ class WatchCallRecordsActivity : BaseActivity<WatchCallRecordsFragmentPresenter,
                     call_relyout.isEnabled = true
                     DeviceChannel.calling = false
                     DeviceChannel.callId = 0
-                    showMessage("呼叫失败,可能对方不在线")
+                    showMessage(R.string.call_failed)
                 }else if (tcpModel.action == TcpAction.VoiceAction.CALLING){
-                    showMessage("对方通话中")
+                    showMessage(R.string.call_busy)
                 }
             }
         }

+ 2 - 2
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/WatchContactsActivity.kt

@@ -149,9 +149,9 @@ class WatchContactsActivity : BaseActivity<WatchActivityPresenter, WatchContacts
         if (messageEvent.tag == 2) {
             val resTcpModel = messageEvent.getMessage() as TcpModel
             if (resTcpModel.action  == TcpAction.VoiceAction.FAILED){
-                showMessage("呼叫失败,可能对方不在线")
+                showMessage(R.string.call_failed)
             } else if (resTcpModel.action == TcpAction.VoiceAction.CALLING){
-                showMessage("对方通话中")
+                showMessage(R.string.call_busy)
             }
         }
     }

+ 33 - 21
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/WatchHome2Activity.kt

@@ -100,6 +100,8 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
 
     private var longPressed = false
 
+    private var language = "zh"
+
     //com.asr.fileexplorer/.activities.FileExploreActivity
     //com.sgtc.settings/.ShutdownActivity
     //com.sgtc.settings/.RebootActivity
@@ -133,6 +135,8 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
 
         initCountDownTimer()
 
+        language = LocaleMangerUtils.getApplicationLocale().language
+
         /*if (DaemonEnv.app == null) {
             DaemonEnv.init(this)
         }*/
@@ -488,7 +492,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
                     )
                     .subscribe {
                         if (!it) {
-                            showMessage("请重新授权,进入App")
+                            showMessage(R.string.permission_tips)
                             requestPermissions()
                         } else {
                             permissionGranted()
@@ -515,7 +519,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
                     )
                     .subscribe {
                         if (!it) {
-                            showMessage("请重新授权,进入App")
+                            showMessage(R.string.permission_tips)
                             requestPermissions()
                         } else {
                             permissionGranted()
@@ -534,8 +538,8 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
     override fun setDeviceDo(data: DeviceVO) {
         if (data.id == null || data.id <= 0) {
             loadingDialog.dismiss()
-            showMessage("本机未注册,请将识别码发给管理员")
-            tv_register_status.text = "本机未注册,请将识别码发给管理员。管理员注册本机后请点击注册完成进入"
+            showMessage(R.string.device_not_register)
+            tv_register_status.setText(R.string.device_not_register_tips)
             /*if (DaemonEnv.app != null) {
                 SpManager.getInstance().putBoolean(Constants.SYSTEM_REGISTERED, false)
             }*/
@@ -557,7 +561,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
         watch_activity_home_linyout.visibility = View.VISIBLE
         tv_register_ok.visibility = View.GONE
 
-        tv_register_status.text = "本机已注册,进入系统中"
+        tv_register_status.text = "Loading..."
         tv_register_status.setTextColor(Color.GREEN)
 
         isUnRegister = false
@@ -576,12 +580,12 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
         presenter.getWatchContacts(Constants.deviceId)
 
         if (Constants.deviceId <= 0 || TextUtils.isEmpty(Constants.sipId)) {
-            showMessage("初始化数据时服务器返回数据不全,请联系管理员")
-            tv_feedback_device_info.text = "初始化数据时服务器返回数据不全,请联系管理员"
+            showMessage(R.string.init_data_error)
+            tv_feedback_device_info.setText(R.string.init_data_error)
             return
         } else if (TextUtils.isEmpty(Constants.tcpServer)) {
-            showMessage("初始化tcp连接数据为null")
-            tv_feedback_device_info.text = "初始化tcp连接数据为null"
+            showMessage(R.string.init_server_data_error)
+            tv_feedback_device_info.setText(R.string.init_server_data_error)
             return
         }
 
@@ -615,6 +619,10 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
                 watch_role_name_tv.text = Constants.roleName
                 watch_user_phone_tv.text = data.phoneNumber
             }
+
+            if (Locale.CHINESE.getLanguage().equals(language)) {
+                watch_role_name_tv.visibility = View.VISIBLE
+            }
         }
 
         //获取频道列表
@@ -633,7 +641,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
         //加载电话号码白名单
         presenter.getPhoneNumberWhiteList(Constants.deviceId)
 
-        showMessage("载入完成")
+        showMessage("Load complete")
 
         /*AppTool.Time.delay(5000) {
             startCheckUpdate()
@@ -726,7 +734,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
         Log.i(TAG, "连接成功")
 
         tv_net_reconnect_text.visibility = View.GONE
-        tv_signal_strength.text = "网络正常"
+        tv_signal_strength.setText(R.string.tcp_connect_success)
         netOffLoadingDialog.dismiss()
         sip_state_tv.setBackgroundColor(Color.parseColor("#00FFFF"))
     }
@@ -734,7 +742,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
     fun onTcpConnectFailed() {
         Log.w(TAG, "网络断开")
 
-        tv_signal_strength.text = "网络断开"
+        tv_signal_strength.setText(R.string.tcp_connect_failed)
         tv_net_reconnect_text.visibility = View.VISIBLE
         netOffLoadingDialog.show()
         sip_state_tv.setBackgroundColor(Color.parseColor("#FF0000"))
@@ -814,7 +822,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
                     startActivity(intent)
                 }
             } catch (ex: Exception) {
-                showMessage("不支持关机")
+                showMessage("Not support")
             }
         }
 
@@ -829,9 +837,13 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
                     startActivity(intent)
                 }
             } catch (ex: Exception) {
-                showMessage("不支持重启")
+                showMessage("Not support")
             }
         }
+
+        tv_language_settings.setOnClickListener {
+            LanguageSetDialogHelper.showDialog(activity)
+        }
     }
 
     override fun enableHeadsetVoiceMsg(): Boolean {
@@ -859,9 +871,9 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
             }
 
             if (NetHelper.getInstance().getNetworkState(this) == NetHelper.NETWORK_NONE) {
-                runOnUiThread(Runnable {
-                    showMessage("未能正确连接,请重试")
-                })
+                runOnUiThread {
+                    showMessage(R.string.net_disconnect)
+                }
             }
         }.start()
     }
@@ -1009,9 +1021,9 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
             R.id.channel_im_layout -> {
                 //群留言
                 if (Constants.channelId == -1) {
-                    showMessage("请先建立频道")
+                    showMessage(R.string.str_im_no_channel)
                 } else if (TextUtils.isEmpty(Constants.userName)) {
-                    showMessage("设备未绑定")
+                    showMessage(R.string.device_user_not_register)
                 } else {
                     val intent = Intent(this, ChannelImActivity::class.java)
                     startActivity(intent)
@@ -1020,7 +1032,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
 
             R.id.other_linyout -> {
                 if (System.currentTimeMillis() - clickTime > 2000) {
-                    showMessage("再点一次进入设置")
+                    showMessage(R.string.click_twice_start_settings)
                 } else {
                     val intent = Intent(this, WatchUserSettingActivity::class.java)
                     startActivity(intent)
@@ -1067,7 +1079,7 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
             electric_quantity_tv.text = "" + power + "%"
             battery_warning_tv.setTextColor(Color.parseColor("#FF3030"))
             battery_warning_tv.visibility = View.VISIBLE
-            battery_warning_tv.text = "电量低"
+            battery_warning_tv.setText(R.string.low_power)
             SoundPoolManager.getInstance().playSound(10)
         } else {
             battery_warning_tv.visibility = View.GONE

+ 58 - 8
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/activity/WatchUserSettingActivity.java

@@ -8,9 +8,12 @@ import android.provider.Settings;
 import android.util.Log;
 import android.view.View;
 import android.view.WindowManager;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
+import android.widget.Spinner;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -22,6 +25,7 @@ import com.wdkl.ncs.android.component.home.R;
 import com.wdkl.ncs.android.component.home.service.WdKeepAliveService;
 import com.wdkl.ncs.android.component.home.settingconfig.SettingConfig;
 import com.wdkl.ncs.android.component.home.util.AppUtils;
+import com.wdkl.ncs.android.component.home.util.LocaleMangerUtils;
 import com.wdkl.ncs.android.component.home.util.NetHelper;
 import com.wdkl.ncs.android.component.home.util.SpeechUtil;
 import com.wdkl.ncs.android.middleware.common.Constants;
@@ -45,6 +49,10 @@ public class WatchUserSettingActivity extends Activity {
 
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
+        //切换语言
+        int languageId = SettingConfig.getLanguageId(this);
+        LocaleMangerUtils.setApplicationLanguageByIndex(this, languageId);
+
         super.onCreate(savedInstanceState);
         setContentView(R.layout.user_setting_layout);
 
@@ -80,7 +88,8 @@ public class WatchUserSettingActivity extends Activity {
         tvDeviceImei.setText(Constants.Companion.getImei());
         tvDeviceIp.setText(NetHelper.getInstance().getLocalIP());
         tvServerIp.setText(Constants.Companion.getTcpServer());
-        tvPhoneType.setText("手机-" + Constants.Companion.getPhoneType() + ", 分机-" + Constants.Companion.getBedPhoneType() + ", 主机-" + Constants.Companion.getNursePhoneType());
+        String type = getString(R.string.phone_type, Constants.Companion.getPhoneType(), Constants.Companion.getBedPhoneType(), Constants.Companion.getNursePhoneType());
+        tvPhoneType.setText(type);
         TextView tvVoiceMode = findViewById(R.id.tv_voice_type);
         tvVoiceMode.setText(Constants.Companion.getVoice_type());
 
@@ -90,10 +99,51 @@ public class WatchUserSettingActivity extends Activity {
             callNo.setChecked(true);
         }
 
-        tvTtsStatus.setOnClickListener(new View.OnClickListener() {
+        /*tvTtsStatus.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                SpeechUtil.getInstance().speakSingleText("这是一个语音示例");
+                String text = getString(R.string.speech_sample_text);
+                SpeechUtil.getInstance().startSpeak(text);
+            }
+        });*/
+
+        int mode = SettingConfig.getLanguageMode(BaseApplication.appContext);
+        RadioGroup languageMode = findViewById(R.id.group_language_mode);
+        RadioButton languageYes = findViewById(R.id.rb_language_yes);
+        RadioButton languageNo = findViewById(R.id.rb_language_no);
+        if (mode == 0) {
+            languageYes.setChecked(true);
+        } else {
+            languageNo.setChecked(true);
+        }
+        languageMode.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(RadioGroup group, int checkedId) {
+                if (checkedId == R.id.rb_language_yes) {
+                    SettingConfig.setLanguageMode(BaseApplication.appContext, 0);
+                } else {
+                    SettingConfig.setLanguageMode(BaseApplication.appContext, 1);
+                }
+            }
+        });
+
+        int originIndex = LocaleMangerUtils.getCurrentLocaleIndex();
+        Spinner spinner = findViewById(R.id.spinner_language_select);
+        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
+                R.array.language_list, R.layout.spinner_item);
+        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+        spinner.setAdapter(adapter);
+        spinner.setSelection(originIndex);
+        spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                Log.d("languageId", "pos: " + position + ", originIndex: " + originIndex);
+                SettingConfig.setLanguageId(BaseApplication.appContext, position);
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
             }
         });
 
@@ -134,7 +184,7 @@ public class WatchUserSettingActivity extends Activity {
                     intent.setClass(_this, AppUpdateActivity.class);
                     startActivity(intent);
                 } else {
-                    Toast.makeText(_this, "请10秒后再尝试", Toast.LENGTH_SHORT).show();
+                    ExtendMethodsKt.showMessage(R.string.retry_tips);
                 }
             }
         });
@@ -165,7 +215,7 @@ public class WatchUserSettingActivity extends Activity {
                     startActivity(intent);
                 }
             } catch (Exception ex) {
-                Toast.makeText(_this, "不支持重启", Toast.LENGTH_SHORT).show();
+                ExtendMethodsKt.showMessage("Not support");
             }
         });
 
@@ -180,7 +230,7 @@ public class WatchUserSettingActivity extends Activity {
                     startActivity(intent);
                 }
             } catch (Exception ex) {
-                Toast.makeText(_this, "不支持关机", Toast.LENGTH_SHORT).show();
+                ExtendMethodsKt.showMessage("Not support");
             }
         });
 
@@ -204,9 +254,9 @@ public class WatchUserSettingActivity extends Activity {
 
         Log.d(TAG, "tts state: " + Constants.Companion.getTtsState());
         if (Constants.Companion.getTtsState() == 2) {
-            tvTtsStatus.setText("正常");
+            tvTtsStatus.setText(R.string.tts_init_success);
         } else {
-            tvTtsStatus.setText("异常");
+            tvTtsStatus.setText(R.string.tts_init_failed);
         }
     }
 }

+ 1 - 1
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/ChannelImItemAdapter.kt

@@ -88,7 +88,7 @@ class ChannelImItemAdapter(val data: ArrayList<ChannelIMVO>, val imActivity: Act
 
 
             binding.imPlayTv.setOnClickListener {
-                showMessage("播放:" + itemData.audioPath)
+                showMessage("play:" + itemData.audioPath)
                 EventBus.getDefault().post(MessageEvent(false, Constants.EVENT_CLEAR_IM))
                 MediaPlayHelper.getInstance().stopMusic(false)
                 MediaPlayHelper.getInstance().playUrlMusic(ApiManager.urlManager.device_url + itemData.audioPath, 1f, false)

+ 2 - 1
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/NewCallItemAdapter.kt

@@ -12,6 +12,7 @@ import com.wdkl.ncs.android.lib.utils.BaseRecyclerViewHolder
 import com.wdkl.ncs.android.middleware.entity.CallingItem
 import com.wdkl.ncs.android.middleware.model.vo.InteractionVO
 import com.wdkl.ncs.android.middleware.tcp.dto.TcpModel
+import com.wdkl.ncs.android.middleware.utils.StringUtil
 
 class NewCallItemAdapter(var data:ArrayList<CallingItem>, val activity: Activity) : BaseDelegateAdapter<BaseRecyclerViewHolder<CallListItemBinding>, CallingItem>() {
 
@@ -51,7 +52,7 @@ class NewCallItemAdapter(var data:ArrayList<CallingItem>, val activity: Activity
                     name = interactionVO.fromFrameFullName
                 }
 
-                binding.tvCallName.text = name + " 呼叫"
+                binding.tvCallName.text = name + " " + StringUtil.getResString(R.string.str_call)
                 binding.btnCallAccept.setOnClickListener {
                     //来电接听
                     if (callListener != null) {

+ 5 - 5
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/NewEventItemAdapter.kt

@@ -123,7 +123,7 @@ class NewEventItemAdapter(var data:ArrayList<InteractionVO>, val activity: Activ
                     }
                 }
                 TcpType.IM.name->{
-                    binding.eliEventName.text = "语音留言"
+                    binding.eliEventName.setText(R.string.event_voice_msg)
                     binding.eliEventResponse.visibility = View.GONE
                     if (itemData.actionEnd!=null){
                         binding.eliEventResponse.visibility = View.GONE
@@ -131,7 +131,7 @@ class NewEventItemAdapter(var data:ArrayList<InteractionVO>, val activity: Activ
                         binding.eliEventName.setTextColor(Color.GREEN)
 
                         binding.eliImRead.setOnClickListener {
-                            showMessage("播放:" + itemData.data)
+                            showMessage("play:" + itemData.data)
                             MediaPlayHelper.getInstance().stopMusic(false)
                             MediaPlayHelper.getInstance().playUrlMusic(ApiManager.urlManager.device_url + itemData.data, 1f, false)
                             ImPlayDialogHelper.showImPlayDialog(activity, itemData.fromFrameFullName, TimeTransition().stampToTime(itemData.createDate*1000))
@@ -141,7 +141,7 @@ class NewEventItemAdapter(var data:ArrayList<InteractionVO>, val activity: Activ
                         binding.eliImRead.visibility = View.VISIBLE
 
                         binding.eliImRead.setOnClickListener {
-                            showMessage("播放:" + itemData.data)
+                            showMessage("play:" + itemData.data)
                             MediaPlayHelper.getInstance().stopMusic(false)
                             MediaPlayHelper.getInstance().playUrlMusic(ApiManager.urlManager.device_url + itemData.data, 1f, false)
                             ImPlayDialogHelper.showImPlayDialog(activity, itemData.fromFrameFullName, TimeTransition().stampToTime(itemData.createDate*1000))
@@ -223,11 +223,11 @@ class NewEventItemAdapter(var data:ArrayList<InteractionVO>, val activity: Activ
                     }
                 }
                 TcpType.VOICE.name->{
-                    binding.eliEventName.text = "通话"
+                    binding.eliEventName.setText(R.string.event_voice_call)
                     binding.eliEventResponse.visibility = View.GONE
                 }
                 TcpType.PHONE.name->{
-                    binding.eliEventName.text = "通话"
+                    binding.eliEventName.setText(R.string.event_voice_call)
                     binding.eliEventResponse.visibility = View.GONE
                 }
             }

+ 11 - 24
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/TakeoverItemAdapter.kt

@@ -29,6 +29,7 @@ import com.wdkl.ncs.android.middleware.tcp.channel.PhoneUtil
 import com.wdkl.ncs.android.middleware.tcp.channel.VoiceUtil
 import com.wdkl.ncs.android.middleware.tcp.dto.TcpCallback
 import com.wdkl.ncs.android.middleware.tcp.enums.CommunicationEnum
+import com.wdkl.ncs.android.middleware.utils.StringUtil
 
 class TakeoverItemAdapter(var data:ArrayList<JsonObject>, val activity: Activity) : BaseDelegateAdapter<BaseRecyclerViewHolder<TakeoverItemBinding>, JsonObject>(){
     val TAG = "TakeoverItemAdapter"
@@ -61,8 +62,8 @@ class TakeoverItemAdapter(var data:ArrayList<JsonObject>, val activity: Activity
         holder.bind {
             binding ->
             val itemData = getItem(position)
-            binding.clerkName.text = "未知"
-            binding.tvPhoneNumber.text = "暂无"
+            binding.clerkName.setText(R.string.str_null)
+            binding.tvPhoneNumber.setText(R.string.str_empty)
             try {
                 binding.clerkName.text = itemData.get("clerk_name").asString
                 binding.tvPhoneNumber.text = itemData.get("phone_number").asString
@@ -73,10 +74,15 @@ class TakeoverItemAdapter(var data:ArrayList<JsonObject>, val activity: Activity
             if (Strings.isNullOrEmpty(Constants.userName)){
                 binding.btnCallOut.visibility = View.GONE
                 binding.btnUserChange.setOnClickListener {
-                    CommonTool.createVerifyDialog("确认切换吗","取消","确定", activity, object : CommonTool.DialogInterface{
+                    CommonTool.createVerifyDialog(
+                        StringUtil.getResString(R.string.device_change_check),
+                        StringUtil.getResString(R.string.str_cancel),
+                        StringUtil.getResString(R.string.str_confirm),
+                        activity,
+                        object : CommonTool.DialogInterface{
                         override fun yes() {
                             loadingDialog.show()
-                            showMessage("切换中,请稍候")
+                            showMessage(R.string.device_change_tips)
                             val tcpModel = DeviceUtil.deviceChange(Constants.deviceId, itemData.get("id").asInt)
                             val transaction: TcpCallback = object : TcpCallback(tcpModel.tid) {
                                 override fun onSuccess(jsonObject: JSONObject) {
@@ -100,16 +106,6 @@ class TakeoverItemAdapter(var data:ArrayList<JsonObject>, val activity: Activity
                                 }
                             }
                             TcpClient.getInstance().sendTcp(tcpModel, false, transaction)
-
-                            /*NettyClient.instance.sendMsg(tcpModel.toJson()).subscribe {
-                                if (it) {
-                                    Log.d(TAG, "TCP.发送消息完成")
-                                } else {
-                                    Log.e(TAG, "TCP.发送消息失败")
-                                    HandleTcpConnect.instance.tcpReConnectWithMsgShow()
-                                }
-                                loadingDialog.dismiss()
-                            }*/
                         }
                         override fun no() {
                         }
@@ -138,17 +134,8 @@ class TakeoverItemAdapter(var data:ArrayList<JsonObject>, val activity: Activity
                                 }
                             }
                             TcpClient.getInstance().sendTcp(tcpModel, true, transaction)
-
-                            /*NettyClient.instance.sendMsg(tcpModel.toJson()).subscribe { res: Boolean ->
-                                if (res) {
-                                    Log.d(TAG, "TCP.发送消息完成")
-                                } else {
-                                    Log.e(TAG, "TCP.发送消息失败")
-                                    HandleTcpConnect.instance.tcpReConnectWithMsgShow()
-                                }
-                            }*/
                         } catch (e: Exception) {
-                            showMessage("呼叫失败,请检查手机号")
+                            showMessage(R.string.call_phone_failed)
                         }
 
                         //直接呼叫

+ 52 - 19
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/WatchCallRecordsItemAdapter.kt

@@ -1,5 +1,6 @@
 package com.wdkl.ncs.android.component.home.adapter
 
+import android.text.TextUtils
 import android.util.Log
 import android.view.View
 import android.view.ViewGroup
@@ -10,6 +11,7 @@ import com.wdkl.ncs.android.component.home.databinding.AdapterWatchCallRecordsIt
 import com.wdkl.ncs.android.middleware.common.Constants
 import com.wdkl.ncs.android.component.home.util.TimeTransition
 import com.wdkl.ncs.android.lib.adapter.BaseDelegateAdapter
+import com.wdkl.ncs.android.lib.base.BaseApplication
 import com.wdkl.ncs.android.lib.utils.BaseRecyclerViewHolder
 import com.wdkl.ncs.android.middleware.model.vo.InteractionVO
 import com.wdkl.ncs.android.middleware.tcp.enums.EventStatusEnum
@@ -67,11 +69,32 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
             if (itemData.createDate != null) {
                 binding.callTimeTv.text = TimeTransition().stampToDate(itemData.createDate*1000)
             }
+            binding.callStatusImagev.visibility = View.INVISIBLE
+
+            /*if (!TextUtils.isEmpty(itemData.fromMemberName)) {
+                binding.sickbedTv.text = BaseApplication.appContext.getString(R.string.record_from, itemData.fromMemberName)
+            } else {
+                binding.sickbedTv.text = BaseApplication.appContext.getString(R.string.record_from, itemData.fromFrameFullName)
+            }
+
+            if (!TextUtils.isEmpty(itemData.toMemberName)) {
+                binding.nameTv.text = BaseApplication.appContext.getString(R.string.record_to, itemData.toMemberName)
+            } else {
+                binding.nameTv.text = BaseApplication.appContext.getString(R.string.record_to, itemData.toFrameFullName)
+            }*/
+
+            if (itemData.fromDeviceMemberId == Constants.memberId){
+                binding.sickbedTv.text = itemData.toFrameFullName
+                binding.nameTv.text = itemData.toMemberName
+            } else {
+                binding.sickbedTv.text = itemData.fromFrameFullName
+                binding.nameTv.text = itemData.fromMemberName
+            }
 
             if (itemData.actionType == TcpType.EVENT.name) {
                 if (itemData.actionEndMemberId != null) {
                     //已响应
-                    binding.treatmentStateImagev.setImageResource(R.drawable.checked_100)
+                    binding.treatmentStateImagev.setImageResource(R.drawable.checked_20)
                     binding.treatmentStateImagev.visibility = View.VISIBLE
                     binding.playTv.visibility = View.GONE
                     binding.projectTv.visibility = View.VISIBLE
@@ -95,7 +118,7 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
                         binding.processingTimeTv.setText(R.string.event_cancel)
                     } else {
                         //未响应
-                        binding.treatmentStateImagev.setImageResource(R.drawable.unchecked_100)
+                        binding.treatmentStateImagev.setImageResource(R.drawable.unchecked_20)
                         binding.treatmentStateImagev.visibility = View.VISIBLE
                         binding.playTv.visibility = View.GONE
                         binding.projectTv.visibility = View.VISIBLE
@@ -112,24 +135,27 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
 
             //是否已播放 已响应
             if (itemData.actionEnd != null) {
-                binding.treatmentStateImagev.setImageResource(R.drawable.checked_100)
+                binding.treatmentStateImagev.setImageResource(R.drawable.checked_20)
                 binding.treatmentStateImagev.visibility = View.VISIBLE
                 binding.processingTimeTv.visibility = View.VISIBLE
 
                 //判断是呼入还是呼出 1 分机到主机 2主机到分机
                 if (itemData.fromDeviceMemberId == Constants.memberId){
-                    binding.sickbedTv.text = itemData.toFrameFullName
-                    binding.nameTv.text = itemData.toMemberName
                     binding.callStatusImagev.setImageResource(R.drawable.hu_chu_yi_jie)
+                    binding.callStatusImagev.visibility = View.VISIBLE
                 } else {
-                    binding.sickbedTv.text = itemData.fromFrameFullName
-                    binding.nameTv.text = itemData.fromMemberName
                     binding.callStatusImagev.setImageResource(R.drawable.hu_ru_yi_jie)
+                    binding.callStatusImagev.visibility = View.VISIBLE
                 }
 
                 if(itemData.actionType == TcpType.SOS.name){ //sos紧急呼叫 已处理
-                    binding.sickbedTv.text = itemData.fromFrameFullName.substringBefore("-")
-                    binding.nameTv.text = ""
+                    if (!TextUtils.isEmpty(itemData.data)) {
+                        binding.sickbedTv.text = ""
+                        binding.nameTv.text = itemData.data
+                    } else {
+                        binding.sickbedTv.text = itemData.fromFrameFullName.substringBefore("-")
+                        binding.nameTv.text = "SOS"
+                    }
                     binding.playTv.visibility = View.GONE
                     binding.projectTv.visibility = View.VISIBLE
                     binding.conductorNameTv.visibility = View.VISIBLE
@@ -138,12 +164,14 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
                     binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
                     binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
                     binding.callStatusImagev.setImageResource(R.drawable.sos_96)
+                    binding.callStatusImagev.visibility = View.VISIBLE
                 }else if (itemData.actionType == TcpType.IM.name){//语音已播放
                     binding.projectTv.visibility = View.GONE
                     binding.playTv.visibility = View.VISIBLE
                     binding.conductorNameTv.visibility = View.GONE
                     binding.playTv.setBackgroundResource(R.drawable.yi_bo_fang)
-                    binding.processingTimeTv.text = "已播放"
+                    //binding.processingTimeTv.text = "已播放"
+                    binding.processingTimeTv.visibility = View.GONE
                 }else if(itemData.actionType == TcpType.VOICE.name || itemData.actionType == TcpType.PHONE.name){ //语音呼叫已接听
                     binding.projectTv.visibility = View.GONE
                     binding.playTv.visibility = View.GONE
@@ -158,36 +186,41 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
                     binding.processingTimeTv.visibility = View.GONE
                 }
             } else {
-                binding.treatmentStateImagev.setImageResource(R.drawable.unchecked_100)
+                binding.treatmentStateImagev.setImageResource(R.drawable.unchecked_20)
                 binding.treatmentStateImagev.visibility = View.VISIBLE
                 binding.conductorNameTv.visibility = View.GONE
                 binding.processingTimeTv.visibility = View.VISIBLE
 
                 //判断是呼入还是呼出 1 分机到主机 2主机到分机
                 if(Constants.memberId!=itemData.fromDeviceMemberId){
-                    binding.sickbedTv.text = itemData.fromFrameFullName
-                    binding.nameTv.text = itemData.fromMemberName
                     binding.callStatusImagev.setImageResource(R.drawable.hu_ru_wei_jie)
+                    binding.callStatusImagev.visibility = View.VISIBLE
                 }else{
-                    binding.sickbedTv.text = itemData.toFrameFullName
-                    binding.nameTv.text = itemData.toMemberName
                     binding.callStatusImagev.setImageResource(R.drawable.hu_chu_wei_jie)
+                    binding.callStatusImagev.visibility = View.VISIBLE
                 }
 
                 if(itemData.actionType == TcpType.SOS.name){ //sos紧急呼叫 未处理
-                    binding.sickbedTv.text = itemData.fromFrameFullName.substringBefore("-")
-                    binding.nameTv.text = ""
+                    if (!TextUtils.isEmpty(itemData.data)) {
+                        binding.sickbedTv.text = ""
+                        binding.nameTv.text = itemData.data
+                    } else {
+                        binding.sickbedTv.text = itemData.fromFrameFullName.substringBefore("-")
+                        binding.nameTv.text = "SOS"
+                    }
                     binding.playTv.visibility = View.GONE
                     binding.projectTv.visibility = View.VISIBLE
                     binding.projectTv.text = "SOS"
                     binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
-                    binding.processingTimeTv.text = "未处理"
+                    binding.processingTimeTv.setText(R.string.event_undo)
                     binding.callStatusImagev.setImageResource(R.drawable.sos_96)
+                    binding.callStatusImagev.visibility = View.VISIBLE
                 }else if (itemData.actionType == TcpType.IM.name){//语音未播放
                     binding.projectTv.visibility = View.GONE
                     binding.playTv.visibility = View.VISIBLE
                     binding.playTv.setBackgroundResource(R.drawable.wei_bo_fang)
-                    binding.processingTimeTv.text = "未播放"
+                    //binding.processingTimeTv.text = "未播放"
+                    binding.processingTimeTv.visibility = View.GONE
                 }else if(itemData.actionType == TcpType.VOICE.name || itemData.actionType == TcpType.PHONE.name){ //语音呼叫未接听
                     binding.projectTv.visibility = View.GONE
                     binding.playTv.visibility = View.GONE

+ 3 - 17
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/adapter/WatchContactsItemAdapter.kt

@@ -70,11 +70,7 @@ class WatchContactsItemAdapter(val data:ArrayList<WatchContactsVO>, val context:
         holder.bind {
             binding ->
             val itemData = getItem(position)
-//            if(position == thisPosition){
-//                binding.itemRelayout.setBackgroundColor(Color.parseColor("#DCDCDC"))
-//            }else{
-//                binding.itemRelayout.setBackgroundColor(Color.parseColor("#ffffff"))
-//            }
+
             binding.roomNumberTv.text = itemData.frameFullName
             binding.nameTv.text = itemData.customerNamed
 
@@ -108,21 +104,11 @@ class WatchContactsItemAdapter(val data:ArrayList<WatchContactsVO>, val context:
                                 }
                             }
                             TcpClient.getInstance().sendTcp(tcpModel, true, transaction)
-
-                            /*NettyClient.instance.sendMsg(tcpModel.toJson())
-                                .subscribe { res: Boolean ->
-                                    if (res) {
-                                        Log.d(TAG, "TCP.发送消息完成")
-                                    } else {
-                                        Log.e(TAG, "TCP.发送消息失败")
-                                        HandleTcpConnect.instance.tcpReConnectWithMsgShow()
-                                    }
-                                }*/
                         } else {
-                            showMessage("呼叫失败,可能手机号异常")
+                            showMessage(R.string.call_phone_failed)
                         }
                     } catch (e: Exception) {
-                        showMessage("呼叫失败,请检查手机号")
+                        showMessage(R.string.call_phone_failed)
                     }
                 } else {
                     //通话

+ 1 - 37
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/helper/AppUpdateHelper.java

@@ -47,32 +47,6 @@ public class AppUpdateHelper {
 
         String path = FILE_APK_PATH + "/" + FILE_APK_NAME;
 
-//        if (!checkApkAvailable(context, path)) {
-//            Log.d(TAG, "安装失败");
-//            return;
-//        }
-
-
-//        if (installApp(context.getPackageName(), path)) {
-//        if (rootSilenceInstall(path)) {
-//            Log.d(TAG, "安装成功");
-//            if (callBack != null) {
-//                callBack.onSuccess();
-//            }
-//        } else {
-//            Log.d(TAG, "安装失败");
-//            if (callBack != null) {
-//                callBack.onFailed();
-//            }
-//        }
-
-//        if (silentInstall(context, path)) {
-//            Log.d(TAG, "app 安装成功");
-//            if (callBack != null) {
-//                callBack.onSuccess();
-//            }
-//        }
-
         if (installAPP(path)) {
             Log.d(TAG, "安装成功");
             if (callBack != null) {
@@ -85,16 +59,6 @@ public class AppUpdateHelper {
 
     public static boolean installAPP(String path) {
 
-//        if (ShellUtils.checkRootPermission()){
-//            // 安装App命令:apkFilePath为待安装的软件地址
-//            String installCommand = "pm install -r " + path;
-//            // 重启密令: getPackageName:软件包名,WatchHome2Activity.class.getCanonicalName():重启APP的首页;
-//            String restartCommand = "am start -n "
-//                    + mContext.getPackageName() + "/" + WatchHome2Activity.class.getCanonicalName();
-//            String[] commands = {installCommand, restartCommand};
-//            ShellUtils.CommandResult commandResult = ShellUtils.execCommand(commands, true, true);
-//            return Strings.isNullOrEmpty(commandResult.errorMsg);
-//        } else {
             Intent intent = new Intent(Intent.ACTION_VIEW);
             File apkFile = new File(path);
             // 由于没有在Activity环境下启动Activity,设置下面的标签
@@ -112,7 +76,7 @@ public class AppUpdateHelper {
             }
             mContext.startActivity(intent);
             return true;
-//        }
+
     }
 
 

+ 3 - 20
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/service/PhoneStateReceiver.java

@@ -7,6 +7,7 @@ import android.telephony.TelephonyManager;
 import android.util.Log;
 
 import com.alibaba.fastjson.JSONObject;
+import com.wdkl.ncs.android.component.home.R;
 import com.wdkl.ncs.android.component.home.util.PhoneCallUtil;
 import com.wdkl.ncs.android.component.home.util.RecordHelper;
 import com.wdkl.ncs.android.lib.vo.MessageEvent;
@@ -57,15 +58,6 @@ public class PhoneStateReceiver extends BroadcastReceiver {
                             }
                         };
                         TcpClient.getInstance().sendTcp(tcpModel, true, transaction);
-
-                        /*NettyClient.Companion.getInstance().sendMsg(tcpModel.toJson()).subscribe(it -> {
-                            if (it) {
-                                Log.d(TAG, "TCP.发送消息完成");
-                            } else {
-                                Log.e(TAG, "TCP.发送消息失败");
-                                HandleTcpConnect.Companion.getInstance().tcpReConnectWithMsgShow();
-                            }
-                        });*/
                     }
                 }
                 DeviceChannel.calling = false;
@@ -85,7 +77,7 @@ public class PhoneStateReceiver extends BroadcastReceiver {
                         }
                     }
                     //循环结束,说明来电号码不在白名单内,挂断来电
-                    showMessage("非法号码:" + extraIncomingNumber);
+                    showMessage(context.getString(R.string.invalid_phone_number, extraIncomingNumber));
                     boolean res = PhoneCallUtil.endCall(context);
                     Log.d(TAG, "end call result: " + res);
                     PhoneCallUtil.deleteCallLog(context, extraIncomingNumber);
@@ -112,15 +104,6 @@ public class PhoneStateReceiver extends BroadcastReceiver {
                             }
                         };
                         TcpClient.getInstance().sendTcp(tcpModel, true, transaction);
-
-                        /*NettyClient.Companion.getInstance().sendMsg(tcpModel.toJson()).subscribe(it -> {
-                            if (it) {
-                                Log.d(TAG, "TCP.发送消息完成");
-                            } else {
-                                Log.e(TAG, "TCP.发送消息失败");
-                                HandleTcpConnect.Companion.getInstance().tcpReConnectWithMsgShow();
-                            }
-                        });*/
                     }
                 } else if (Constants.Companion.getPhoneState() == Constants.PHONE_IDLE) {
                     Constants.Companion.setPhoneState(Constants.PHONE_OUTGOING);
@@ -137,7 +120,7 @@ public class PhoneStateReceiver extends BroadcastReceiver {
                         }
                     }
                     //循环结束,说明来电号码不在白名单内,挂断来电
-                    showMessage("非法号码:" + extraIncomingNumber);
+                    showMessage(context.getString(R.string.invalid_phone_number, extraIncomingNumber));
                     Constants.Companion.setPhoneState(Constants.PHONE_IDLE);
                     boolean res = PhoneCallUtil.endCall(context);
                     Log.d(TAG, "end call result: " + res);

+ 20 - 7
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/service/WdKeepAliveService.kt

@@ -103,6 +103,8 @@ class WdKeepAliveService : AbsWorkService() {
         }
     }
 
+    private var language = "zh"
+
     override fun startWork() {
         EventBus.getDefault().register(this)
 
@@ -138,6 +140,8 @@ class WdKeepAliveService : AbsWorkService() {
 
         audioFocusManager = AudioFocusManager(BaseApplication.appContext)
         initMediaSession()
+
+        language = LocaleMangerUtils.getApplicationLocale().language
     }
 
     fun registerCallListener() {
@@ -429,7 +433,7 @@ class WdKeepAliveService : AbsWorkService() {
                                 }
 
                                 Util.wakeUpAndUnlock()
-                                SoundPoolManager.getInstance().playSound(1)
+                                SoundPoolManager.getInstance().playSound(4)
 
                                 val intent = Intent()
                                 intent.setClass(this, NewEventListActivity::class.java)
@@ -866,7 +870,11 @@ class WdKeepAliveService : AbsWorkService() {
                 SoundPoolManager.getInstance().playSound(8)
             }*/
 
-            SoundPoolManager.getInstance().playSound(8)
+            if (Locale.CHINESE.getLanguage().equals(language)) {
+                SoundPoolManager.getInstance().playSound(8)
+            } else {
+                SoundPoolManager.getInstance().playSound(9)
+            }
         } else if (model.type == TcpType.SOS) {
             AppTool.Time.delay(500) {
                 RingPlayHelper.playRingTone(BaseApplication.appContext, R.raw.sos, false)
@@ -902,7 +910,7 @@ class WdKeepAliveService : AbsWorkService() {
     private fun playVoiceMsg(interactionVO: InteractionVO) {
         synchronized(this) {
             channelImList.clear()
-            showMessage("播放留言...")
+            showMessage(R.string.str_voice_msg_play)
             MediaPlayHelper.getInstance().stopMusic(true)
             SoundPoolManager.getInstance().playSound(4)
             AppTool.Time.delay(1000) {
@@ -925,7 +933,7 @@ class WdKeepAliveService : AbsWorkService() {
 
     private fun startPlayChannelIm(channelIm: ChannelImDO) {
         imPlayState = 2
-        showMessage("播放群留言...")
+        //showMessage("播放群留言...")
         MediaPlayHelper.getInstance().stopMusic(true)
         SoundPoolManager.getInstance().playSound(4)
         AppTool.Time.delay(1000) {
@@ -1042,7 +1050,7 @@ class WdKeepAliveService : AbsWorkService() {
                                     }
                                     //通话中或者某些特定界面不响应耳机按键留言,未绑定用户时也不响应按键
                                     else if (Constants.channelId == -1) {
-                                        showMessage("请先建立频道")
+                                        showMessage(R.string.str_im_no_channel)
                                     } else if (!DeviceChannel.calling && Constants.allowVoiceMsg && !TextUtils.isEmpty(Constants.userName)) {
                                         if (Constants.deviceType != 1) {
                                             RecordHelper.getInstance().execRecordVoiceMsg()
@@ -1057,9 +1065,14 @@ class WdKeepAliveService : AbsWorkService() {
                                             if (!warningTips) {
                                                 warningTips = true
                                                 keepHandler.sendEmptyMessageDelayed(0, 3000)
-                                                SoundPoolManager.getInstance().playSound(5)
+                                                if (Locale.CHINESE.getLanguage().equals(language)) {
+                                                    SoundPoolManager.getInstance().playSound(5)
+                                                } else {
+                                                    SoundPoolManager.getInstance().playSound(6)
+                                                }
                                             }
-                                            showMessage("请使用屏幕按钮留言")
+
+                                            showMessage(R.string.str_im_media_button_unuseful)
                                         }
                                     }
                                 }

+ 2 - 2
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/ui/CallSingleActivity.java

@@ -131,7 +131,7 @@ public class CallSingleActivity extends BaseCallActivity {
             perms = new String[]{Manifest.permission.RECORD_AUDIO, Manifest.permission.CAMERA};
         }
         if (!EasyPermissions.hasPermissions(CallSingleActivity.this, perms)) {
-            EasyPermissions.requestPermissions(CallSingleActivity.this, "需要相机和录音权限",
+            EasyPermissions.requestPermissions(CallSingleActivity.this, "need record, camera permissions",
                     100, perms);
         } else {
             //初始化 engine
@@ -169,7 +169,7 @@ public class CallSingleActivity extends BaseCallActivity {
         //先检查权限
         if (Build.VERSION.SDK_INT >= 23) {
             if (!Settings.canDrawOverlays(this)) {
-                Toast.makeText(CallSingleActivity.this, "请开启悬浮窗权限", Toast.LENGTH_LONG).show();
+                Toast.makeText(CallSingleActivity.this, "need floating window permission", Toast.LENGTH_LONG).show();
                 return;
             }
         }

+ 4 - 3
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/ui/FragmentAudio.java

@@ -28,6 +28,7 @@ import com.wdkl.ncs.android.middleware.tcp.TcpClient;
 import com.wdkl.ncs.android.middleware.tcp.channel.VoiceUtil;
 import com.wdkl.ncs.android.middleware.tcp.dto.TcpCallback;
 import com.wdkl.ncs.android.middleware.tcp.dto.TcpModel;
+import com.wdkl.ncs.android.middleware.utils.StringUtil;
 import com.wdkl.rtc.entity.Publisher;
 import com.wdkl.rtc.entity.Room;
 import com.wdkl.rtc.rtc.WebRTCEngine;
@@ -101,12 +102,12 @@ public class FragmentAudio extends SingleCallFragment implements View.OnClickLis
         } else {
             // 如果未接通
             if (isOutgoing) {
-                descTextView.setText("正在向 "+getShowName()+" 请求通话");
+                descTextView.setText(getShowName() + "\n" + StringUtil.getResString(R.string.call_in_calling));
                 outgoingActionContainer.setVisibility(View.VISIBLE);
                 incomingActionContainer.setVisibility(View.GONE);
                 //MediaPlayHelper.getInstance().playResMusic(R.raw.outgoing_call, 0.8f, true);
             } else {
-                descTextView.setText(getShowName() + " 请求通话");
+                descTextView.setText(getShowName() + "\n" + StringUtil.getResString(R.string.call_incoming));
                 outgoingActionContainer.setVisibility(View.GONE);
                 incomingActionContainer.setVisibility(View.VISIBLE);
             }
@@ -250,7 +251,7 @@ public class FragmentAudio extends SingleCallFragment implements View.OnClickLis
                 }
             } else if (msg.what == CHECK) {
                 if (callSingleActivity!=null && callSingleActivity.janusClient.getCallState()!= EnumType.CallState.Connected && !isHandoff){
-                    Toast.makeText(callSingleActivity, "当前网络状况不佳", Toast.LENGTH_LONG).show();
+                    Toast.makeText(callSingleActivity, R.string.call_disconnect, Toast.LENGTH_LONG).show();
                 }
             } else if (msg.what == CALL) {
                 currentState = callSingleActivity.janusClient.getCallState();

+ 1 - 1
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/ui/FragmentSipAudio.java

@@ -86,7 +86,7 @@ public class FragmentSipAudio extends BaseSipCallFragment implements View.OnClic
         }
         transHandler = new TransHandler();
         //是来电,且是客户来电进入延时转接
-        if (!isOutgoing && interactionVO.getFromClerkId()==null) {
+        if (!isOutgoing && interactionVO!= null && interactionVO.getFromClerkId()==null) {
             int transSeconds = SettingConfig.getCountdownTime(this.getContext());
             transHandler.sendEmptyMessageDelayed(TRANS, transSeconds * 1000);
         }

+ 13 - 19
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/ui/SingleCallFragment.java

@@ -236,7 +236,7 @@ public abstract class SingleCallFragment extends Fragment {
         runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                Toast.makeText(SingleCallFragment.this.getContext(), "呼叫成功", Toast.LENGTH_SHORT).show();
+                Toast.makeText(SingleCallFragment.this.getContext(), R.string.call_success, Toast.LENGTH_SHORT).show();
             }
         });
     }
@@ -307,7 +307,7 @@ public abstract class SingleCallFragment extends Fragment {
                     break;
                 case WHAT_DELAY_CHECK_CALL:
                     if (callSingleActivity != null && !callSuccess) {
-                        Toast.makeText(SingleCallFragment.this.getContext(), "服务器无响应,请检查网络状态!", Toast.LENGTH_SHORT).show();
+                        Toast.makeText(SingleCallFragment.this.getContext(), R.string.net_error, Toast.LENGTH_SHORT).show();
                     }
                     break;
                 case FINISH_CURRENT:
@@ -367,23 +367,17 @@ public abstract class SingleCallFragment extends Fragment {
                 runOnUiThread(new Runnable() {
                     @Override
                     public void run() {
-                        Toast.makeText(SingleCallFragment.this.getContext(),"对方已离开",Toast.LENGTH_SHORT).show();
+                        Toast.makeText(SingleCallFragment.this.getContext(),R.string.call_end,Toast.LENGTH_SHORT).show();
                     }
                 });
             }
-//            runOnUiThread(new Runnable() {
-//                @Override
-//                public void run() {
-//                    Toast.makeText(SingleCallFragment.this.getContext(),"对方挂断",Toast.LENGTH_SHORT).show();
-//                }
-//            });
 
             handler.sendEmptyMessageDelayed(FINISH_CURRENT, 100);
         } else if (code == JanusClient.CALLBACK_ROOM_ERROR) {
             runOnUiThread(new Runnable() {
                 @Override
                 public void run() {
-                    Toast.makeText(SingleCallFragment.this.getContext(), "创建通话错误", Toast.LENGTH_SHORT).show();
+                    Toast.makeText(SingleCallFragment.this.getContext(), "Room error", Toast.LENGTH_SHORT).show();
                 }
             });
 
@@ -397,7 +391,7 @@ public abstract class SingleCallFragment extends Fragment {
             runOnUiThread(new Runnable() {
                 @Override
                 public void run() {
-                    Toast.makeText(SingleCallFragment.this.getContext(), "连接超时", Toast.LENGTH_SHORT).show();
+                    Toast.makeText(SingleCallFragment.this.getContext(), "Connect timeout", Toast.LENGTH_SHORT).show();
                 }
             });
 
@@ -413,7 +407,7 @@ public abstract class SingleCallFragment extends Fragment {
                     runOnUiThread(new Runnable() {
                         @Override
                         public void run() {
-                            Toast.makeText(SingleCallFragment.this.getContext(), "连接超时,请重试", Toast.LENGTH_SHORT).show();
+                            Toast.makeText(SingleCallFragment.this.getContext(), "Connect timeout", Toast.LENGTH_SHORT).show();
                         }
                     });
 
@@ -434,7 +428,7 @@ public abstract class SingleCallFragment extends Fragment {
             runOnUiThread(new Runnable() {
                 @Override
                 public void run() {
-                    Toast.makeText(SingleCallFragment.this.getContext(), "对方离开", Toast.LENGTH_SHORT).show();
+                    Toast.makeText(SingleCallFragment.this.getContext(), R.string.call_end, Toast.LENGTH_SHORT).show();
                 }
             });
 
@@ -443,7 +437,7 @@ public abstract class SingleCallFragment extends Fragment {
             runOnUiThread(new Runnable() {
                 @Override
                 public void run() {
-                    Toast.makeText(SingleCallFragment.this.getContext(), "网络情况差", Toast.LENGTH_SHORT).show();
+                    Toast.makeText(SingleCallFragment.this.getContext(), R.string.net_error, Toast.LENGTH_SHORT).show();
                 }
             });
         }
@@ -473,7 +467,7 @@ public abstract class SingleCallFragment extends Fragment {
                     runOnUiThread(new Runnable() {
                         @Override
                         public void run() {
-                            Toast.makeText(SingleCallFragment.this.getContext(), "对方挂断", Toast.LENGTH_SHORT).show();
+                            Toast.makeText(SingleCallFragment.this.getContext(), R.string.call_end, Toast.LENGTH_SHORT).show();
                         }
                     });
 
@@ -486,7 +480,7 @@ public abstract class SingleCallFragment extends Fragment {
                     runOnUiThread(new Runnable() {
                         @Override
                         public void run() {
-                            Toast.makeText(SingleCallFragment.this.getContext(), "对方拒绝", Toast.LENGTH_SHORT).show();
+                            Toast.makeText(SingleCallFragment.this.getContext(), R.string.call_reject, Toast.LENGTH_SHORT).show();
                         }
                     });
                 }
@@ -496,7 +490,7 @@ public abstract class SingleCallFragment extends Fragment {
                     runOnUiThread(new Runnable() {
                         @Override
                         public void run() {
-                            Toast.makeText(SingleCallFragment.this.getContext(), "对方通话中", Toast.LENGTH_SHORT).show();
+                            Toast.makeText(SingleCallFragment.this.getContext(), R.string.call_busy, Toast.LENGTH_SHORT).show();
                         }
                     });
                 }
@@ -506,7 +500,7 @@ public abstract class SingleCallFragment extends Fragment {
                     runOnUiThread(new Runnable() {
                         @Override
                         public void run() {
-                            Toast.makeText(SingleCallFragment.this.getContext(), "呼叫失败,对方可能不在线", Toast.LENGTH_SHORT).show();
+                            Toast.makeText(SingleCallFragment.this.getContext(), R.string.call_failed, Toast.LENGTH_SHORT).show();
                         }
                     });
                 //}
@@ -516,7 +510,7 @@ public abstract class SingleCallFragment extends Fragment {
                     runOnUiThread(new Runnable() {
                         @Override
                         public void run() {
-                            Toast.makeText(SingleCallFragment.this.getContext(), "取消", Toast.LENGTH_SHORT).show();
+                            Toast.makeText(SingleCallFragment.this.getContext(), R.string.str_cancel, Toast.LENGTH_SHORT).show();
                         }
                     });
                 }

+ 140 - 0
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/util/LanguageSetDialogHelper.java

@@ -0,0 +1,140 @@
+package com.wdkl.ncs.android.component.home.util;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.os.Handler;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.Spinner;
+import android.widget.Toast;
+
+import com.wdkl.ncs.android.component.home.R;
+import com.wdkl.ncs.android.component.home.settingconfig.SettingConfig;
+
+
+public class LanguageSetDialogHelper {
+
+    private static AlertDialog dialog;
+    private static int selectIndex;
+
+    public static void showDialog(final Activity activity) {
+        if (dialog != null && dialog.isShowing()) {
+            return;
+        }
+
+        final int originIndex = LocaleMangerUtils.getCurrentLocaleIndex();
+        selectIndex = originIndex;
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.language_set_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+
+        RadioButton btnYes = contentView.findViewById(R.id.rb_language_yes);
+        RadioButton btnNo = contentView.findViewById(R.id.rb_language_no);
+        final int mode = SettingConfig.getLanguageMode(activity);
+        if (mode == 0) {
+            btnYes.setChecked(true);
+        } else {
+            btnNo.setChecked(true);
+        }
+
+        Button buttonCancel = contentView.findViewById(R.id.cancel_button);
+        Button buttonConfirm = contentView.findViewById(R.id.confirm_button);
+        Spinner spinner = contentView.findViewById(R.id.spinner_language_select);
+        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(activity,
+                R.array.language_list, R.layout.spinner_item);
+        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+        spinner.setAdapter(adapter);
+        spinner.setSelection(originIndex);
+        spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                Log.d("languageId", "pos: " + position + ", originIndex: " + originIndex);
+                selectIndex = position;
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
+            }
+        });
+
+        RadioGroup languageGroup = contentView.findViewById(R.id.group_language_mode);
+        languageGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(RadioGroup group, int checkedId) {
+                if (checkedId == R.id.rb_language_yes) {
+                    SettingConfig.setLanguageMode(activity, 0);
+                } else {
+                    SettingConfig.setLanguageMode(activity, 1);
+                }
+            }
+        });
+
+        buttonCancel.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (dialog != null) {
+                    dialog.dismiss();
+                }
+            }
+        });
+
+        buttonConfirm.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                SettingConfig.setLanguageId(activity, selectIndex);
+
+                if (SettingConfig.getLanguageMode(activity) == 1) {
+                    if (selectIndex != originIndex) {
+                        Toast.makeText(activity, "restart now...", Toast.LENGTH_LONG).show();
+                        new Handler().postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                AppUtils.restartApp();
+                            }
+                        }, 3000);
+                    }
+                } else {
+                    Toast.makeText(activity, "restart now...", Toast.LENGTH_LONG).show();
+                    new Handler().postDelayed(new Runnable() {
+                        @Override
+                        public void run() {
+                            AppUtils.restartApp();
+                        }
+                    }, 3000);
+                }
+
+                if (dialog != null) {
+                    dialog.dismiss();
+                }
+            }
+        });
+
+        dialog = builder.create();
+        //dialog.setCanceledOnTouchOutside(false);
+        //dialog.setCancelable(false);
+        dialog.show();
+
+        //设置dialog宽高及位置
+        try {
+            Window window = dialog.getWindow();
+            WindowManager.LayoutParams lp = window.getAttributes();
+            lp.width = WindowManager.LayoutParams.MATCH_PARENT;
+            lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
+            lp.gravity = Gravity.CENTER;
+            window.setAttributes(lp);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 16 - 16
android_mobile/src/main/yd_watch_2/code/com/wdkl/ncs/android/component/home/util/RecordHelper.java

@@ -23,6 +23,7 @@ import com.wdkl.ncs.android.middleware.tcp.dto.TcpModel;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Locale;
 
 import static com.wdkl.ncs.android.lib.utils.ExtendMethodsKt.showMessage;
 
@@ -39,6 +40,8 @@ public class RecordHelper {
     private boolean recordRunning = false;
     private UrlManager urlManager = UrlManager.Companion.build();
 
+    private String language = "zh";
+
     private final static Object lock = new Object();
 
     private final Handler handler = new Handler(Looper.getMainLooper()) {
@@ -72,6 +75,8 @@ public class RecordHelper {
     }
 
     public void startRecord() {
+        language = LocaleMangerUtils.getApplicationLocale().getLanguage();
+
         //如果正在录音则先停止录音
         if (recording) {
             stopRecord();
@@ -136,13 +141,17 @@ public class RecordHelper {
         //连续点击2次开始留言
         long curTime = System.currentTimeMillis();
         if (curTime - clickTime < 1000 && curTime - pressDownTime > 3500 && curTime - pressUpTime > 2500) {
-            showMessage("开始留言");
+            showMessage(R.string.str_voice_msg_start);
             //先停止其他语音或铃声
             RingPlayHelper.stopRingTone();
             SpeechUtil.getInstance().stopSpeak();
             MediaPlayHelper.getInstance().stopMusic(true);
             //播放提示
-            SoundPoolManager.getInstance().playSound(2);
+            if (Locale.CHINESE.getLanguage().equals(language)) {
+                SoundPoolManager.getInstance().playSound(2);
+            } else {
+                SoundPoolManager.getInstance().playSound(7);
+            }
             recordRunning = true;
             pressDownTime = curTime;
             handler.postDelayed(this::startRecord, 1200);
@@ -154,7 +163,7 @@ public class RecordHelper {
                 handler.removeCallbacksAndMessages(null);
                 if (Math.abs(pressUpTime - pressDownTime) <= 2000) {
                     deleteAudioFile(audiofilePath);
-                    showMessage("说话时间太短");
+                    showMessage(R.string.str_voice_msg_record_loss);
                 } else {
                     sendChannelVoiceMsg(audiofilePath);
 
@@ -174,7 +183,7 @@ public class RecordHelper {
             HttpHelper.upload( urlManager.getDevice_url()+ "ncs/upload/file", new File(file), new HttpHelper.UploadCallback() {
                 @Override
                 public void onFail() {
-                    showMessage("留言失败");
+                    showMessage(R.string.str_voice_msg_send_fail);
                 }
 
                 @SuppressLint("CheckResult")
@@ -182,7 +191,6 @@ public class RecordHelper {
                 public void onSuccess(String data) {
                     //上传完成后删除本地文件
                     deleteAudioFile(file);
-                    SoundPoolManager.getInstance().playSound(3);
                     ChannelImDO channelImDO = new ChannelImDO();
                     channelImDO.setChannelId(Constants.Companion.getChannelId());
                     channelImDO.setSenderMemberId(Constants.Companion.getMemberId());
@@ -191,9 +199,9 @@ public class RecordHelper {
                     TcpCallback transaction = new TcpCallback(tcpModel.getTid()) {
                         @Override
                         public void onSuccess(JSONObject jsonObject) {
-                            //if (Locale.CHINESE.getLanguage().equals(language)) {
+                            if (Locale.CHINESE.getLanguage().equals(language)) {
                                 SoundPoolManager.getInstance().playSound(3);
-                            //}
+                            }
                             showMessage(R.string.str_voice_msg_send_success);
                         }
 
@@ -206,14 +214,6 @@ public class RecordHelper {
                         }
                     };
                     TcpClient.getInstance().sendTcp(tcpModel, false, transaction);
-
-                    /*NettyClient.Companion.getInstance().sendMsg(tcpModel.toJson()).subscribe(it-> {
-                        if (it){
-                            showMessage("留言发送成功!");
-                        } else {
-                            showMessage("留言发送失败!");
-                        }
-                    });*/
                 }
             });
         }
@@ -227,7 +227,7 @@ public class RecordHelper {
             recordRunning = false;
 
             if (cancel) {
-                showMessage("留言取消");
+                showMessage(R.string.str_voice_msg_record_cancel);
                 deleteAudioFile(audiofilePath);
             } else {
                 sendChannelVoiceMsg(audiofilePath);

BIN
android_mobile/src/main/yd_watch_2/res/drawable/checked_20.png


BIN
android_mobile/src/main/yd_watch_2/res/drawable/unchecked_20.png


+ 2 - 2
android_mobile/src/main/yd_watch_2/res/layout/activity_app_update.xml

@@ -13,7 +13,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerInParent="true"
-            android:text="正在升级中,请勿操作..."
+            android:text="@string/updating"
             android:textColor="#3D3D63"
             android:textSize="18sp" />
 
@@ -29,7 +29,7 @@
             app:isShowDesc="false"
             app:max="100"
             app:progress="0"
-            app:progressDesc="进度:"
+            app:progressDesc="progress:"
             app:progressRadius="10dp" />
 
     </RelativeLayout>

+ 1 - 1
android_mobile/src/main/yd_watch_2/res/layout/activity_call_list.xml

@@ -29,7 +29,7 @@
         android:gravity="center"
         android:textSize="24sp"
         android:textColor="@color/warn_orange"
-        android:text="没有呼叫"
+        android:text="@string/str_empty"
         android:background="@color/color_white"
         android:visibility="gone"/>
 </FrameLayout>

+ 1 - 1
android_mobile/src/main/yd_watch_2/res/layout/activity_channel_im_list.xml

@@ -37,7 +37,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:gravity="center"
-                android:text="按住说话"
+                android:text="@string/str_voice_msg_btn_text"
                 android:textColor="#B4B4B4"
                 android:textSize="16sp"/>
 

+ 6 - 8
android_mobile/src/main/yd_watch_2/res/layout/activity_sip_voip_audio.xml

@@ -10,7 +10,7 @@
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
         android:gravity="center_horizontal"
-        android:layout_marginTop="11px"
+        android:layout_marginTop="10dp"
         android:orientation="vertical">
 
         <ImageView
@@ -23,16 +23,14 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="房号"
+            android:layout_marginTop="8dp"
             android:textSize="18sp" />
         <TextView
             android:id="@+id/bao_mother_name_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="宝妈名字"
+            android:layout_marginTop="8dp"
             android:textSize="20sp" />
 
     </LinearLayout>
@@ -43,7 +41,7 @@
         android:layout_below="@id/ll_name"
         android:layout_alignParentBottom="true"
         android:layout_centerHorizontal="true"
-        android:layout_marginBottom="11px"
+        android:layout_marginBottom="10dp"
         android:orientation="vertical">
 
         <Chronometer
@@ -60,14 +58,14 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
+            android:layout_marginTop="8dp"
             android:textSize="12sp" />
 
         <ImageView
             android:id="@+id/hang_up_imagev"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="13px"
+            android:layout_marginTop="12dp"
             android:src="@drawable/yu_yin_gua_duan" />
 
     </LinearLayout>

+ 9 - 12
android_mobile/src/main/yd_watch_2/res/layout/activity_sip_voip_audio_ringing.xml

@@ -8,7 +8,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="11px"
+        android:layout_marginTop="10dp"
         android:gravity="center_horizontal"
         android:orientation="vertical">
 
@@ -22,16 +22,14 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="房号"
+            android:layout_marginTop="8dp"
             android:textSize="18sp" />
         <TextView
             android:id="@+id/bao_mother_name_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="宝妈名字"
+            android:layout_marginTop="8dp"
             android:textSize="20sp" />
 
         <TextView
@@ -39,7 +37,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
+            android:layout_marginTop="8dp"
             android:text=""
             android:textSize="20sp" />
 
@@ -62,8 +60,8 @@
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="13px"
-        android:layout_marginBottom="11px"
+        android:layout_marginTop="12dp"
+        android:layout_marginBottom="12dp"
         android:orientation="horizontal">
         <RelativeLayout
             android:id="@+id/change_over_relayout"
@@ -80,16 +78,15 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerInParent="true"
-                android:textSize="14dp"
-                android:textColor="#ffffff"
-                android:text="转接"/>
+                android:textSize="14sp"
+                android:textColor="#ffffff" />
 
         </RelativeLayout>
         <ImageView
             android:id="@+id/hang_up_imagev"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginRight="28px"
+            android:layout_marginRight="28dp"
             android:src="@drawable/yu_yin_gua_duan"
             android:visibility="gone"/>
 

+ 5 - 6
android_mobile/src/main/yd_watch_2/res/layout/activity_sos_emergency_call.xml

@@ -10,7 +10,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="11px"
+        android:layout_marginTop="10dp"
         android:gravity="center_horizontal"
         android:orientation="vertical">
 
@@ -25,8 +25,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="宝妈名字"
+            android:layout_marginTop="8dp"
             android:textSize="20sp" />
 
         <TextView
@@ -34,7 +33,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
+            android:layout_marginTop="8dp"
             android:textColor="#FF0000"
             android:text=""
             android:textSize="25sp" />
@@ -58,8 +57,8 @@
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="13px"
-        android:layout_marginBottom="11px"
+        android:layout_marginTop="12dp"
+        android:layout_marginBottom="12dp"
         android:orientation="horizontal">
 
         <ImageView

+ 1 - 1
android_mobile/src/main/yd_watch_2/res/layout/activity_voice_msg.xml

@@ -29,7 +29,7 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="20dp"
         android:gravity="center"
-        android:text="按住说话"
+        android:text="@string/str_voice_msg_btn_text"
         android:textColor="#B4B4B4"
         android:textSize="28dp"/>
 </LinearLayout>

+ 5 - 7
android_mobile/src/main/yd_watch_2/res/layout/activity_web_rtc_voip_audio.xml

@@ -11,7 +11,7 @@
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
         android:gravity="center_horizontal"
-        android:layout_marginTop="11px"
+        android:layout_marginTop="10dp"
         android:orientation="vertical">
 
         <ImageView
@@ -24,16 +24,14 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="房号"
+            android:layout_marginTop="8dp"
             android:textSize="18sp" />
         <TextView
             android:id="@+id/bao_mother_name_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="宝妈名字"
+            android:layout_marginTop="8dp"
             android:textSize="20sp" />
 
     </LinearLayout>
@@ -43,7 +41,7 @@
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
         android:layout_centerHorizontal="true"
-        android:layout_marginBottom="11px"
+        android:layout_marginBottom="10dp"
         android:orientation="vertical">
 
         <Chronometer
@@ -60,7 +58,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
+            android:layout_marginTop="8dp"
             android:textSize="12sp" />
 
         <LinearLayout

+ 8 - 11
android_mobile/src/main/yd_watch_2/res/layout/activity_web_rtc_voip_audio_ringing.xml

@@ -9,7 +9,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="11px"
+        android:layout_marginTop="10dp"
         android:gravity="center_horizontal"
         android:orientation="vertical">
 
@@ -23,16 +23,14 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="房号"
+            android:layout_marginTop="8dp"
             android:textSize="18sp" />
         <TextView
             android:id="@+id/bao_mother_name_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="宝妈名字"
+            android:layout_marginTop="8dp"
             android:textSize="20sp" />
 
         <TextView
@@ -40,7 +38,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
+            android:layout_marginTop="8dp"
             android:text=""
             android:textSize="20sp" />
 
@@ -63,8 +61,8 @@
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="13px"
-        android:layout_marginBottom="11px"
+        android:layout_marginTop="12dp"
+        android:layout_marginBottom="12dp"
         android:orientation="horizontal">
         <RelativeLayout
             android:id="@+id/change_over_relayout"
@@ -81,9 +79,8 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerInParent="true"
-                android:textSize="14dp"
-                android:textColor="#ffffff"
-                android:text="转接"/>
+                android:textSize="14sp"
+                android:textColor="#ffffff" />
 
         </RelativeLayout>
         <ImageView

+ 6 - 8
android_mobile/src/main/yd_watch_2/res/layout/adapter_client_list.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="50px">
+    android:layout_height="50dp">
 
     <RelativeLayout
         android:layout_width="match_parent"
@@ -12,28 +12,26 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
-            android:layout_marginLeft="13px"
-            android:text="玫瑰房"
+            android:layout_marginLeft="12dp"
             android:textColor="#F78B8F"
-            android:textSize="16px" />
+            android:textSize="16sp" />
 
         <TextView
             android:id="@+id/name_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
-            android:layout_marginLeft="20px"
+            android:layout_marginLeft="20dp"
             android:layout_toRightOf="@+id/room_number_tv"
-            android:text="张女士"
             android:textColor="#F78B8F"
-            android:textSize="16px" />
+            android:textSize="16sp" />
 
         <ImageView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:src="@drawable/zhe_die"
             android:layout_centerVertical="true"
-            android:layout_marginRight="12px"
+            android:layout_marginRight="12dp"
             android:layout_alignParentRight="true"/>
 
     </RelativeLayout>

+ 15 - 13
android_mobile/src/main/yd_watch_2/res/layout/adapter_watch_call_records_item.xml

@@ -3,15 +3,15 @@
 
     <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="70dp"
+        android:layout_height="88dp"
         android:background="@drawable/item_selector"
-        android:layout_marginTop="2dp">
+        android:layout_marginTop="6dp">
 
         <LinearLayout
             android:id="@+id/tab_linyout"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginStart="5dp"
+            android:layout_marginStart="4dp"
             android:layout_centerVertical="true"
             android:orientation="vertical">
 
@@ -27,7 +27,7 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_marginTop="4dp"
-            android:layout_marginEnd="9dp"
+            android:layout_marginEnd="8dp"
             android:layout_toEndOf="@+id/tab_linyout">
 
             <RelativeLayout
@@ -40,14 +40,15 @@
                     android:id="@+id/sickbed_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:textSize="14sp" />
+                    android:textColor="#07689f"
+                    android:textSize="18sp" />
 
                 <TextView
                     android:id="@+id/call_time_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_alignParentEnd="true"
-                    android:textSize="12sp" />
+                    android:textSize="14sp" />
 
             </RelativeLayout>
 
@@ -64,7 +65,8 @@
                     android:id="@+id/name_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:textSize="14sp" />
+                    android:textColor="#11999e"
+                    android:textSize="18sp" />
 
                 <LinearLayout
                     android:id="@+id/incident_linlyou"
@@ -75,11 +77,11 @@
 
                     <ImageView
                         android:id="@+id/treatment_state_imagev"
-                        android:layout_width="12dp"
-                        android:layout_height="12dp"
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
                         android:layout_gravity="center"
                         android:layout_marginEnd="6dp"
-                        android:src="@drawable/checked_100" />
+                        android:src="@drawable/checked_20" />
                     <TextView
                         android:id="@+id/project_tv"
                         android:layout_width="wrap_content"
@@ -87,7 +89,7 @@
                         android:paddingLeft="5dp"
                         android:paddingRight="5dp"
                         android:gravity="center"
-                        android:textSize="12sp" />
+                        android:textSize="14sp" />
 
                     <ImageView
                         android:id="@+id/play_tv"
@@ -113,14 +115,14 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginEnd="10dp"
-                    android:textSize="12sp" />
+                    android:textSize="14sp" />
 
                 <TextView
                     android:id="@+id/processing_time_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:textColor="#F78B8F"
-                    android:textSize="12sp" />
+                    android:textSize="14sp" />
             </LinearLayout>
         </RelativeLayout>
     </RelativeLayout>

+ 50 - 58
android_mobile/src/main/yd_watch_2/res/layout/adapter_watch_contacts_item.xml

@@ -1,71 +1,63 @@
 <?xml version="1.0" encoding="utf-8"?>
 <layout>
 
-    <RelativeLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
+    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/item_relayout"
         android:layout_width="match_parent"
         android:layout_height="60dp"
-        android:layout_marginTop="4dp"
-        android:background="#FFFFFF">
+        android:layout_marginTop="6dp"
+        android:background="@drawable/item_selector"
+        android:paddingTop="6dp"
+        android:paddingBottom="6dp">
 
-        <RelativeLayout
-            android:id="@+id/item_relayout"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/item_selector"
-            >
+        <TextView
+            android:id="@+id/room_number_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8dp"
+            android:textColor="@color/header"
+            android:textSize="18sp" />
 
-            <TextView
-                android:id="@+id/room_number_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="5dp"
-                android:text="-房"
-                android:textColor="@color/header"
-                android:textSize="12dp" />
+        <TextView
+            android:id="@+id/name_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@+id/room_number_tv"
+            android:layout_marginLeft="8dp"
+            android:textColor="#F78B8F"
+            android:textSize="18sp" />
 
-            <TextView
-                android:id="@+id/name_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="5dp"
-                android:layout_toRightOf="@+id/room_number_tv"
-                android:text="张--"
-                android:textColor="#F78B8F"
-                android:textSize="16dp" />
+        <ImageView
+            android:id="@+id/awci_voice_recorder"
+            android:layout_width="44dp"
+            android:layout_height="22dp"
+            android:layout_centerVertical="true"
+            android:layout_marginEnd="15dp"
+            android:layout_toLeftOf="@+id/awci_btn_call_out"
+            android:src="@drawable/voice_recorder"
+            android:visibility="gone" />
 
-            <ImageView
-                android:id="@+id/awci_voice_recorder"
-                android:src="@drawable/voice_recorder"
-                android:layout_toLeftOf="@+id/awci_btn_call_out"
-                android:layout_marginEnd="15dp"
-                android:layout_centerVertical="true"
-                android:layout_width="35dp"
-                android:layout_height="22dp"
-                android:visibility="gone"/>
-            <Button
-                android:id="@+id/awci_btn_call_out"
-                android:layout_marginRight="15dp"
-                android:layout_toLeftOf="@+id/right_arrow"
-                android:textSize="13dp"
-                android:layout_centerVertical="true"
-                android:textColor="@color/grgray"
-                android:layout_width="38dp"
-                android:layout_height="22dp"
-                android:background="@drawable/javashop_btn_balck_line_bg"
-                android:text="呼叫" />
+        <Button
+            android:id="@+id/awci_btn_call_out"
+            android:layout_width="44dp"
+            android:layout_height="22dp"
+            android:layout_centerVertical="true"
+            android:layout_marginRight="15dp"
+            android:layout_toLeftOf="@+id/right_arrow"
+            android:background="@drawable/javashop_btn_balck_line_bg"
+            android:singleLine="true"
+            android:text="@string/str_call"
+            android:textColor="@color/grgray"
+            android:textSize="12sp" />
 
-            <ImageView
-                android:id="@+id/right_arrow"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentRight="true"
-                android:layout_centerVertical="true"
-                android:layout_marginRight="10dp"
-                android:src="@drawable/zhe_die" />
+        <ImageView
+            android:id="@+id/right_arrow"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:layout_marginRight="6dp"
+            android:src="@drawable/zhe_die" />
 
-        </RelativeLayout>
     </RelativeLayout>
 </layout>

+ 0 - 3
android_mobile/src/main/yd_watch_2/res/layout/av_p2p_audio_incoming.xml

@@ -33,7 +33,6 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="转接"
                 android:textColor="@android:color/white" />
 
         </LinearLayout>
@@ -57,7 +56,6 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="挂断"
                 android:textColor="@android:color/white" />
 
         </LinearLayout>
@@ -80,7 +78,6 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="接听"
                 android:textColor="@android:color/white" />
 
         </LinearLayout>

+ 3 - 3
android_mobile/src/main/yd_watch_2/res/layout/av_p2p_audio_outgoing.xml

@@ -39,7 +39,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="静音"
+                android:text="@string/str_call_mute"
                 android:textColor="@android:color/white" />
 
         </LinearLayout>
@@ -61,7 +61,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="挂断"
+                android:text="@string/str_call_handoff"
                 android:textColor="@android:color/white" />
 
         </LinearLayout>
@@ -85,7 +85,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="免提"
+                android:text="@string/str_call_speaker"
                 android:textColor="@android:color/white" />
 
         </LinearLayout>

+ 3 - 3
android_mobile/src/main/yd_watch_2/res/layout/av_p2p_video_connected_action.xml

@@ -36,7 +36,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="切到语音通话"
+                android:text=""
                 android:textColor="@android:color/white" />
 
         </LinearLayout>
@@ -58,7 +58,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="挂断"
+                android:text=""
                 android:textColor="@android:color/white" />
 
         </LinearLayout>
@@ -81,7 +81,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="旋转摄像头"
+                android:text=""
                 android:textColor="@android:color/white" />
 
         </LinearLayout>

+ 3 - 3
android_mobile/src/main/yd_watch_2/res/layout/av_p2p_video_incoming_action.xml

@@ -28,7 +28,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
-            android:text="切换到语音接听"
+            android:text=""
             android:textColor="@android:color/white" />
 
     </LinearLayout>
@@ -54,7 +54,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
-            android:text="挂断"
+            android:text=""
             android:textColor="@android:color/white" />
 
     </LinearLayout>
@@ -80,7 +80,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
-            android:text="接听"
+            android:text=""
             android:textColor="@android:color/white" />
 
     </LinearLayout>

+ 2 - 2
android_mobile/src/main/yd_watch_2/res/layout/av_p2p_video_outgoing_action.xml

@@ -22,7 +22,7 @@
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="切换到语音"
+            android:text=""
             android:textColor="@android:color/white"
             android:textSize="10sp" />
 
@@ -45,7 +45,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="5dp"
-            android:text="取消"
+            android:text=""
             android:textColor="@android:color/white"
             android:textSize="12sp" />
 

+ 1 - 1
android_mobile/src/main/yd_watch_2/res/layout/back_layout.xml

@@ -13,5 +13,5 @@
         android:gravity="center_vertical"
         android:drawableLeft="@drawable/ic_arrow_back"
         android:drawablePadding="10dp"
-        android:text="返回" />
+        android:text="Back" />
 </LinearLayout>

+ 12 - 11
android_mobile/src/main/yd_watch_2/res/layout/event_list_item.xml

@@ -14,7 +14,6 @@
             android:layout_height="wrap_content"
             android:orientation="horizontal">
 
-
             <LinearLayout
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
@@ -35,8 +34,9 @@
                         android:layout_marginStart="3dp"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="房号"
-                        android:textSize="14sp"/>
+                        android:textColor="#07689f"
+                        android:text=""
+                        android:textSize="18sp"/>
 
                 </LinearLayout>
 
@@ -44,20 +44,21 @@
                     android:id="@+id/eli_member_name"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="5dp"
-                    android:text="客户姓名"
-                    android:textSize="12sp"/>
+                    android:layout_marginTop="4dp"
+                    android:textColor="#11999e"
+                    android:text=""
+                    android:textSize="18sp"/>
                 <TextView
                     android:id="@+id/eli_event_time"
-                    android:layout_marginTop="5dp"
+                    android:layout_marginTop="4dp"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="事件时间"
-                    android:textSize="12sp"/>
+                    android:text=""
+                    android:textSize="16sp"/>
             </LinearLayout>
 
             <LinearLayout
-                android:layout_width="wrap_content"
+                android:layout_width="0dp"
                 android:layout_height="match_parent"
                 android:orientation="horizontal"
                 android:layout_marginEnd="10dp"
@@ -82,7 +83,7 @@
             android:layout_height="wrap_content"
             android:orientation="horizontal">
             <LinearLayout
-                android:layout_width="wrap_content"
+                android:layout_width="0dp"
                 android:layout_height="wrap_content"
                 android:orientation="horizontal"
                 android:layout_marginEnd="5dp"

+ 1 - 1
android_mobile/src/main/yd_watch_2/res/layout/float_call_window_layout.xml

@@ -15,7 +15,7 @@
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="有通话"
+        android:text="@string/call_window_title"
         android:textSize="24sp"
         android:textColor="@color/color_red" />
 

+ 1 - 1
android_mobile/src/main/yd_watch_2/res/layout/fragment_audio.xml

@@ -41,7 +41,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="5dp"
-            android:text="邀请你进行语音通话"
+            android:text=""
             android:textColor="@android:color/white" />
     </LinearLayout>
 

+ 1 - 1
android_mobile/src/main/yd_watch_2/res/layout/fragment_video.xml

@@ -64,7 +64,7 @@
                     android:id="@+id/descTextView"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="等待对方接通..."
+                    android:text=""
                     android:textColor="@android:color/white" />
             </LinearLayout>
         </LinearLayout>

+ 2 - 2
android_mobile/src/main/yd_watch_2/res/layout/im_dialog_lay.xml

@@ -10,7 +10,7 @@
         android:layout_height="wrap_content"
         android:paddingTop="20dp"
         android:gravity="center"
-        android:text="留言中..."
+        android:text="@string/str_voice_msg_started"
         android:textSize="24sp" />
 
     <Button
@@ -18,7 +18,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="20dp"
-        android:text="结束"
+        android:text="@string/str_voice_msg_end"
         android:textSize="20sp"/>
 
 </LinearLayout>

+ 1 - 1
android_mobile/src/main/yd_watch_2/res/layout/im_play_dialog_lay.xml

@@ -37,7 +37,7 @@
         android:id="@+id/btn_im_stop"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="停止"
+        android:text="@string/str_im_stop"
         android:textSize="18sp"/>
 
 </LinearLayout>

+ 91 - 0
android_mobile/src/main/yd_watch_2/res/layout/language_set_dialog.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:padding="10dp"
+    android:gravity="center">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <TextView
+            android:id="@+id/tv_language_title"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:text="@string/language_set_mode"
+            android:textSize="16sp" />
+
+        <RadioGroup
+            android:id="@+id/group_language_mode"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="6dp"
+            android:orientation="horizontal">
+
+            <RadioButton
+                android:id="@+id/rb_language_yes"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="16sp"
+                android:text="@string/str_yes" />
+
+            <RadioButton
+                android:id="@+id/rb_language_no"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="4dp"
+                android:textSize="16sp"
+                android:text="@string/str_no" />
+        </RadioGroup>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="6dp"
+            android:orientation="vertical">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="@string/language_set_title"
+                android:textSize="16sp" />
+
+            <Spinner
+                android:id="@+id/spinner_language_select"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="6dp" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="8dp"
+            android:gravity="center_horizontal"
+            android:orientation="vertical">
+
+            <Button
+                android:id="@+id/confirm_button"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:padding="4dp"
+                android:text="@string/str_confirm"
+                android:textSize="12sp" />
+
+            <Button
+                android:id="@+id/cancel_button"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:padding="4dp"
+                android:text="@string/str_cancel"
+                android:textSize="12sp" />
+        </LinearLayout>
+
+    </LinearLayout>
+
+</ScrollView>

+ 9 - 0
android_mobile/src/main/yd_watch_2/res/layout/spinner_item.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:singleLine="true"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:gravity="center"
+    android:ellipsize="marquee"
+    android:textAlignment="inherit"
+    android:textSize="18sp"/>

+ 9 - 8
android_mobile/src/main/yd_watch_2/res/layout/takeover_item.xml

@@ -17,7 +17,6 @@
                 android:id="@+id/clerk_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
                 android:layout_marginLeft="10dp"
                 android:textColor="#F78B8F"
                 android:textSize="16sp" />
@@ -27,7 +26,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginLeft="10dp"
-                android:text="暂无"
+                android:text="@string/str_empty"
                 android:textSize="12sp" />
         </LinearLayout>
 
@@ -48,22 +47,24 @@
 
             <Button
                 android:id="@id/btn_user_change"
-                android:layout_width="38dp"
+                android:layout_width="44dp"
                 android:layout_height="22dp"
                 android:background="@drawable/javashop_btn_balck_line_bg"
-                android:text="替换"
+                android:singleLine="true"
+                android:text="@string/str_replace"
                 android:textColor="@color/grgray"
-                android:textSize="13dp" />
+                android:textSize="12sp" />
 
             <Button
                 android:id="@+id/btn_call_out"
-                android:layout_width="38dp"
+                android:layout_width="44dp"
                 android:layout_height="22dp"
                 android:layout_marginLeft="5dp"
                 android:background="@drawable/javashop_btn_balck_line_bg"
-                android:text="呼叫"
+                android:singleLine="true"
+                android:text="@string/str_call"
                 android:textColor="@color/grgray"
-                android:textSize="13dp" />
+                android:textSize="12sp" />
 
         </LinearLayout>
 

+ 106 - 37
android_mobile/src/main/yd_watch_2/res/layout/user_setting_layout.xml

@@ -31,7 +31,7 @@
                     android:layout_height="wrap_content"
                     android:orientation="horizontal">
                     <TextView
-                        android:text="版本"
+                        android:text="@string/version_title"
                         android:textSize="14sp"
                         android:textColor="@color/javashop_color_searcher_tv_gray"
                         android:layout_width="wrap_content"
@@ -54,7 +54,7 @@
                     android:layout_height="wrap_content"
                     android:orientation="horizontal">
                     <TextView
-                        android:text="设备ID"
+                        android:text="@string/device_id"
                         android:textSize="14sp"
                         android:textColor="@color/javashop_color_searcher_tv_gray"
                         android:layout_width="wrap_content"
@@ -78,7 +78,7 @@
                     android:layout_height="wrap_content"
                     android:orientation="horizontal">
                     <TextView
-                        android:text="设备标识码"
+                        android:text="@string/device_identifier"
                         android:textSize="14sp"
                         android:textColor="@color/javashop_color_searcher_tv_gray"
                         android:layout_width="wrap_content"
@@ -102,7 +102,7 @@
                     android:layout_height="wrap_content"
                     android:orientation="horizontal">
                     <TextView
-                        android:text="服务器"
+                        android:text="@string/server_title"
                         android:textSize="14sp"
                         android:textColor="@color/javashop_color_searcher_tv_gray"
                         android:layout_width="wrap_content"
@@ -126,7 +126,7 @@
                     android:layout_height="wrap_content"
                     android:orientation="horizontal">
                     <TextView
-                        android:text="设备IP"
+                        android:text="@string/device_ip"
                         android:textSize="14sp"
                         android:textColor="@color/javashop_color_searcher_tv_gray"
                         android:layout_width="wrap_content"
@@ -154,7 +154,7 @@
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="TTS状态"
+                        android:text="@string/tts_state"
                         android:textColor="@color/javashop_color_searcher_tv_gray"
                         android:textSize="14sp" />
 
@@ -176,7 +176,7 @@
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="通话方式"
+                        android:text="@string/call_type"
                         android:textColor="@color/javashop_color_searcher_tv_gray"
                         android:textSize="14sp" />
 
@@ -220,73 +220,89 @@
                 android:padding="20dp"
                 android:orientation="vertical">
 
+                <View
+                    android:id="@+id/view_center_base"
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_centerInParent="true"/>
+
                 <Button
                     android:id="@+id/btn_user_change"
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:padding="2dp"
+                    android:layout_toLeftOf="@id/view_center_base"
+                    android:layout_marginRight="10dp"
                     android:layout_gravity="center_horizontal"
                     android:background="@drawable/javashop_btn_balck_line_bg"
-                    android:text="PC关联"
+                    android:text="@string/str_user_change"
                     android:textSize="14sp" />
 
                 <Button
                     android:id="@+id/btn_app_restart"
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="20dp"
+                    android:padding="2dp"
+                    android:layout_marginLeft="10dp"
                     android:layout_gravity="center_horizontal"
-                    android:layout_toRightOf="@id/btn_user_change"
+                    android:layout_toRightOf="@id/view_center_base"
                     android:background="@drawable/javashop_btn_balck_line_bg"
-                    android:text="APP重启"
+                    android:text="@string/register_restart"
                     android:textSize="14sp" />
 
                 <Button
                     android:id="@+id/btn_check_update"
-                    android:layout_marginTop="10dp"
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_gravity="center_horizontal"
+                    android:padding="2dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_toLeftOf="@id/view_center_base"
                     android:layout_below="@id/btn_user_change"
                     android:background="@drawable/javashop_btn_balck_line_bg"
-                    android:text="检查升级"
+                    android:text="@string/check_update"
                     android:textSize="14sp" />
 
                 <Button
                     android:id="@+id/btn_system_setting"
-                    android:layout_marginTop="10dp"
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="20dp"
+                    android:padding="2dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginTop="10dp"
                     android:layout_gravity="center_horizontal"
                     android:layout_below="@id/btn_user_change"
-                    android:layout_toRightOf="@id/btn_check_update"
+                    android:layout_toRightOf="@id/view_center_base"
                     android:background="@drawable/javashop_btn_balck_line_bg"
-                    android:text="系统设置"
+                    android:text="@string/str_system_settings"
                     android:textSize="14sp" />
 
                 <Button
                     android:id="@+id/btn_reboot"
-                    android:layout_marginTop="10dp"
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_gravity="center_horizontal"
+                    android:padding="2dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_toLeftOf="@id/view_center_base"
                     android:layout_below="@id/btn_check_update"
                     android:background="@drawable/javashop_btn_balck_line_bg"
-                    android:text="设备重启"
+                    android:text="@string/register_reboot"
                     android:textSize="14sp"
                     android:visibility="gone"/>
 
                 <Button
                     android:id="@+id/btn_shutdown"
-                    android:layout_marginTop="10dp"
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="20dp"
+                    android:padding="2dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginTop="10dp"
                     android:layout_gravity="center_horizontal"
                     android:layout_below="@id/btn_system_setting"
-                    android:layout_toRightOf="@id/btn_reboot"
+                    android:layout_toRightOf="@id/view_center_base"
                     android:background="@drawable/javashop_btn_balck_line_bg"
-                    android:text="设备关机"
+                    android:text="@string/register_power_off"
                     android:textSize="14sp"
                     android:visibility="gone"/>
 
@@ -296,15 +312,14 @@
                     android:layout_height="wrap_content"
                     android:layout_below="@id/btn_reboot"
                     android:layout_marginTop="16dp"
-                    android:text="呼叫转移:"
-                    android:textSize="16sp" />
+                    android:text="@string/str_call_transfer_title"
+                    android:textSize="18sp" />
 
                 <RadioGroup
                     android:id="@+id/group_call"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_below="@id/btn_reboot"
-                    android:layout_toRightOf="@id/tv_call_title"
+                    android:layout_below="@id/tv_call_title"
                     android:layout_marginTop="10dp"
                     android:layout_marginLeft="4dp"
                     android:orientation="horizontal">
@@ -312,15 +327,69 @@
                         android:id="@+id/rb_call_yes"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="是"/>
+                        android:text="@string/str_yes"
+                        android:textSize="16sp"/>
                     <RadioButton
                         android:id="@+id/rb_call_no"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="4dp"
-                        android:text="否"/>
+                        android:text="@string/str_no"
+                        android:textSize="16sp"/>
+                </RadioGroup>
+
+                <TextView
+                    android:id="@+id/tv_language_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/group_call"
+                    android:layout_marginTop="10dp"
+                    android:text="@string/language_set_mode"
+                    android:textSize="18sp" />
+
+                <RadioGroup
+                    android:id="@+id/group_language_mode"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/tv_language_title"
+                    android:layout_marginTop="10dp"
+                    android:orientation="horizontal">
+                    <RadioButton
+                        android:id="@+id/rb_language_yes"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/str_yes"
+                        android:textSize="16sp"/>
+                    <RadioButton
+                        android:id="@+id/rb_language_no"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:text="@string/str_no"
+                        android:textSize="16sp"/>
                 </RadioGroup>
 
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="10dp"
+                    android:layout_below="@id/group_language_mode"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/language_set_title"
+                        android:textSize="18sp" />
+
+                    <Spinner
+                        android:id="@+id/spinner_language_select"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:padding="2dp"
+                        android:layout_marginTop="10dp"/>
+                </LinearLayout>
+
             </RelativeLayout>
 
         </LinearLayout>

+ 0 - 41
android_mobile/src/main/yd_watch_2/res/layout/videoroom_item.xml

@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical">
-
-    <org.webrtc.SurfaceViewRenderer
-        android:id="@+id/surfaceviewrender"
-        android:layout_width="match_parent"
-        android:layout_height="180dp" />
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-
-        <TextView
-            android:id="@+id/tv_mute"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="5dp"
-            android:text="静音" />
-
-        <TextView
-            android:id="@+id/tv_userid"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerInParent="true"
-            tools:text="我" />
-
-        <TextView
-            android:id="@+id/tv_switch_camera"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentRight="true"
-            android:layout_marginRight="5dp"
-            android:text="切换摄像头" />
-
-    </RelativeLayout>
-
-</LinearLayout>

+ 2 - 2
android_mobile/src/main/yd_watch_2/res/layout/watch_activity_call_records.xml

@@ -10,8 +10,8 @@
             android:id="@+id/refresh"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginLeft="6px"
-            android:layout_marginRight="6px"
+            android:layout_marginLeft="4dp"
+            android:layout_marginRight="4dp"
             bind:srlEnableLoadMore="true"
             bind:srlEnableRefresh="true">
 

+ 8 - 8
android_mobile/src/main/yd_watch_2/res/layout/watch_activity_dialing_voice.xml

@@ -10,7 +10,7 @@
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
         android:gravity="center_horizontal"
-        android:layout_marginTop="11px"
+        android:layout_marginTop="10dp"
         android:orientation="vertical">
 
         <ImageView
@@ -23,16 +23,16 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="房号"
+            android:layout_marginTop="8dp"
+            android:text=""
             android:textSize="18sp" />
         <TextView
             android:id="@+id/bao_mother_name_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="宝妈名字"
+            android:layout_marginTop="8dp"
+            android:text=""
             android:textSize="20sp" />
 
     </LinearLayout>
@@ -43,7 +43,7 @@
         android:layout_below="@id/ll_name"
         android:layout_alignParentBottom="true"
         android:layout_centerHorizontal="true"
-        android:layout_marginBottom="11px"
+        android:layout_marginBottom="10dp"
         android:orientation="vertical">
 
         <Chronometer
@@ -59,14 +59,14 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
+            android:layout_marginTop="8dp"
             android:textSize="12sp" />
 
         <ImageView
             android:id="@+id/hang_up_imagev"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="13px"
+            android:layout_marginTop="12dp"
             android:src="@drawable/yu_yin_gua_duan" />
 
     </LinearLayout>

+ 24 - 24
android_mobile/src/main/yd_watch_2/res/layout/watch_activity_event.xml

@@ -11,7 +11,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
-            android:layout_marginLeft="9px"
+            android:layout_marginLeft="8dp"
             android:orientation="vertical">
 
             <ImageView
@@ -24,29 +24,29 @@
                 android:id="@+id/call_status_imagev"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="2px"
+                android:layout_marginTop="2dp"
                 android:visibility="gone" />
         </LinearLayout>
 
         <RelativeLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginTop="4px"
-            android:layout_marginRight="9px"
+            android:layout_marginTop="4dp"
+            android:layout_marginRight="8dp"
             android:layout_toRightOf="@+id/tab_linyout">
 
             <RelativeLayout
                 android:id="@+id/room_name_linlyout"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="6px">
+                android:layout_marginLeft="6dp">
 
                 <TextView
                     android:id="@+id/sickbed_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="05房01床"
-                    android:textSize="14px" />
+                    android:text=""
+                    android:textSize="14sp" />
 
                 <TextView
                     android:id="@+id/call_time_tv"
@@ -54,7 +54,7 @@
                     android:layout_height="wrap_content"
                     android:layout_alignParentRight="true"
                     android:text="12:00:00"
-                    android:textSize="12px" />
+                    android:textSize="12sp" />
 
             </RelativeLayout>
 
@@ -63,16 +63,16 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_below="@+id/room_name_linlyout"
-                android:layout_marginLeft="6px"
-                android:layout_marginTop="4px"
+                android:layout_marginLeft="6dp"
+                android:layout_marginTop="4dp"
                 android:orientation="vertical">
 
                 <TextView
                     android:id="@+id/name_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="zhangx"
-                    android:textSize="14px" />
+                    android:text=""
+                    android:textSize="14sp" />
 
                 <LinearLayout
                     android:id="@+id/incident_linlyou"
@@ -86,19 +86,19 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_gravity="center"
-                        android:layout_marginRight="6px"
+                        android:layout_marginRight="6dp"
                         android:src="@drawable/yi_chu_li"
                         android:visibility="gone" />
 
 
                     <TextView
                         android:id="@+id/project_tv"
-                        android:layout_width="59px"
-                        android:layout_height="20px"
+                        android:layout_width="60dp"
+                        android:layout_height="20dp"
                         android:background="@drawable/sp_event_undo"
                         android:gravity="center"
-                        android:text="啊哈哈"
-                        android:textSize="12px" />
+                        android:text=""
+                        android:textSize="12sp" />
 
                     <ImageView
                         android:id="@+id/play_tv"
@@ -116,16 +116,16 @@
                 android:layout_height="wrap_content"
                 android:layout_below="@+id/nursing_project_relalyout"
                 android:layout_alignParentRight="true"
-                android:layout_marginTop="4px"
+                android:layout_marginTop="4dp"
                 android:orientation="horizontal">
 
                 <TextView
                     android:id="@+id/conductor_name_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginRight="10px"
-                    android:text="处理人"
-                    android:textSize="12px"
+                    android:layout_marginRight="10dp"
+                    android:text=""
+                    android:textSize="12sp"
                     android:visibility="gone" />
 
                 <TextView
@@ -133,7 +133,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:text="12:00:00"
-                    android:textSize="12px" />
+                    android:textSize="12sp" />
             </LinearLayout>
         </RelativeLayout>
 
@@ -150,8 +150,8 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerInParent="true"
-                android:text="未处理"
-                android:textSize="8sp" />
+                android:text=""
+                android:textSize="12sp" />
 
 
         </RelativeLayout>

+ 9 - 8
android_mobile/src/main/yd_watch_2/res/layout/watch_activity_home2.xml

@@ -39,7 +39,7 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="10dp"
-                        android:text="顾客列表"
+                        android:text="@string/custom_title"
                         android:textColor="#ffffff"
                         android:textSize="16sp"
                         android:textStyle="bold"/>
@@ -83,7 +83,7 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="10dp"
-                        android:text="通话记录"
+                        android:text="@string/call_list"
                         android:textColor="#ffffff"
                         android:textSize="16sp"
                         android:textStyle="bold" />
@@ -129,7 +129,7 @@
                             android:textColor="#ffffff"
                             android:textSize="16sp"
                             android:textStyle="bold"
-                            android:text="群留言"/>
+                            android:text="@string/group_message"/>
 
                     </LinearLayout>
 
@@ -170,7 +170,8 @@
                             android:layout_marginTop="6dp"
                             android:textColor="#ffffff"
                             android:textSize="16sp"
-                            android:textStyle="bold" />
+                            android:textStyle="bold"
+                            android:visibility="gone" />
 
                         <TextView
                             android:id="@+id/watch_user_phone_tv"
@@ -223,7 +224,7 @@
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
                                 android:textColor="#ffffff"
-                                android:textSize="12sp" />
+                                android:textSize="14sp" />
                         </LinearLayout>
 
 
@@ -245,9 +246,9 @@
                             <TextView
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:text="同事"
+                                android:text="@string/colleague"
                                 android:textColor="#ffffff"
-                                android:textSize="16sp"
+                                android:textSize="12sp"
                                 android:textStyle="bold" />
 
                         </LinearLayout>
@@ -318,7 +319,7 @@
                                 android:id="@+id/tv_net_reconnect_text"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:text="重连中"
+                                android:text="@string/reconnect"
                                 android:textSize="12sp"
                                 android:textColor="@color/warn_orange"
                                 android:visibility="gone"/>

+ 21 - 8
android_mobile/src/main/yd_watch_2/res/layout/watch_activity_register.xml

@@ -20,7 +20,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="8dp"
-                android:text="服务器IP: "
+                android:text="@string/register_server_ip"
                 android:textColor="@color/grgray"
                 android:textSize="15sp" />
 
@@ -37,7 +37,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="10dp"
-                android:text="识别码: "
+                android:text="@string/register_device_identifier"
                 android:textColor="@color/grgray"
                 android:textSize="15sp" />
 
@@ -67,7 +67,7 @@
                 android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
-                android:text="注册完成"
+                android:text="@string/register_done"
                 android:textSize="18sp" />
 
             <TextView
@@ -80,7 +80,20 @@
                 android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
-                android:text="系统设置"
+                android:text="@string/str_system_settings"
+                android:textSize="18sp" />
+
+            <TextView
+                android:id="@+id/tv_language_settings"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:layout_marginLeft="30dp"
+                android:layout_marginTop="20dp"
+                android:layout_marginRight="30dp"
+                android:layout_marginBottom="20dp"
+                android:background="#ffffff"
+                android:gravity="center"
+                android:text="@string/str_language_settings"
                 android:textSize="18sp" />
 
             <TextView
@@ -119,7 +132,7 @@
                 android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
-                android:text="取消设备管理"
+                android:text="@string/register_cancel_device_admin"
                 android:textSize="18sp" />
 
             <TextView
@@ -132,7 +145,7 @@
                 android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
-                android:text="文件管理"
+                android:text="@string/register_file_manager"
                 android:textSize="18sp" />
 
             <TextView
@@ -145,7 +158,7 @@
                 android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
-                android:text="关机"
+                android:text="@string/register_power_off"
                 android:textSize="18sp" />
 
             <TextView
@@ -158,7 +171,7 @@
                 android:layout_marginBottom="20dp"
                 android:background="#ffffff"
                 android:gravity="center"
-                android:text="重启"
+                android:text="@string/register_reboot"
                 android:textSize="18sp" />
         </LinearLayout>
     </ScrollView>

+ 14 - 15
android_mobile/src/main/yd_watch_2/res/layout/watch_activity_voice_calls.xml

@@ -8,7 +8,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="11px"
+        android:layout_marginTop="10dp"
         android:gravity="center_horizontal"
         android:orientation="vertical">
 
@@ -22,16 +22,16 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="房号"
+            android:layout_marginTop="8dp"
+            android:text=""
             android:textSize="18sp" />
         <TextView
             android:id="@+id/bao_mother_name_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
-            android:text="宝妈名字"
+            android:layout_marginTop="8dp"
+            android:text=""
             android:textSize="20sp" />
 
         <TextView
@@ -39,7 +39,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
-            android:layout_marginTop="8px"
+            android:layout_marginTop="8dp"
             android:text=""
             android:textSize="20sp" />
 
@@ -62,34 +62,33 @@
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="13px"
-        android:layout_marginBottom="11px"
+        android:layout_marginTop="12dp"
+        android:layout_marginBottom="12dp"
         android:orientation="horizontal">
       <RelativeLayout
           android:id="@+id/change_over_relayout"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
-          android:layout_marginRight="28px"
+          android:layout_marginRight="28dp"
           android:layout_gravity="center" >
         <ImageView
             android:id="@+id/change_over_image"
-            android:layout_width="45px"
-            android:layout_height="45px"
+            android:layout_width="45dp"
+            android:layout_height="45dp"
             android:src="@drawable/yu_yin_wei_chu_li" />
       <TextView
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:layout_centerInParent="true"
-          android:textSize="14px"
-          android:textColor="#ffffff"
-          android:text="转接"/>
+          android:textSize="14sp"
+          android:textColor="#ffffff" />
 
       </RelativeLayout>
         <ImageView
             android:id="@+id/hang_up_imagev"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginRight="28px"
+            android:layout_marginRight="28dp"
             android:src="@drawable/yu_yin_gua_duan"
             android:visibility="gone"/>
         <ImageView

+ 1 - 0
app/src/main/AndroidManifest.xml

@@ -21,6 +21,7 @@
     <uses-permission android:name="android.permission.READ_CALL_LOG" />
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
     <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
 
     <!--  亮屏和解锁权限   -->
     <uses-permission android:name="android.permission.WAKE_LOCK" />

+ 1 - 0
app/src/main/gionee/AndroidManifest.xml

@@ -22,6 +22,7 @@
     <uses-permission android:name="android.permission.READ_CALL_LOG" />
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
     <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
 
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
 

+ 1 - 0
app/src/main/sharedUserId/AndroidManifest.xml

@@ -21,6 +21,7 @@
     <uses-permission android:name="android.permission.READ_CALL_LOG" />
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
     <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
 
     <!--  亮屏和解锁权限   -->
     <uses-permission android:name="android.permission.WAKE_LOCK" />

+ 5 - 0
resource/src/main/res/values-es/strings.xml

@@ -55,6 +55,10 @@
     <string name="register_done">Registro correcto</string>
     <string name="register_restart">Reiniciar aplicación</string>
     <string name="register_config_server">Configuración de servidor</string>
+    <string name="register_cancel_device_admin">Cancel device admin</string>
+    <string name="register_file_manager">File manager</string>
+    <string name="register_power_off">Power off</string>
+    <string name="register_reboot">Reboot</string>
     <string name="custom_title">Pacientes</string>
     <string name="call_list">Historico llamadas</string>
     <string name="colleague">Colegas</string>
@@ -153,6 +157,7 @@
     <string name="str_set_resposible_success">Establecido responsable</string>
     <string name="str_set_resposible_fail">Error al establecer responsable</string>
     <string name="str_event_handle_warning">El evento necesita ser manejado</string>
+    <string name="str_call_handle_warning">Calls need todo</string>
     <string name="str_event_response">Contestado: %s %s</string>
     <string name="str_event_cancel">Evento cancelado</string>
     <string name="str_event_done">Evento realizado</string>

+ 5 - 0
resource/src/main/res/values-ru/strings.xml

@@ -56,6 +56,10 @@
     <string name="register_done">Зарегистрировать OK</string>
     <string name="register_restart">Перезапустить приложение</string>
     <string name="register_config_server">Сервер конфигурации</string>
+    <string name="register_cancel_device_admin">Cancel device admin</string>
+    <string name="register_file_manager">File manager</string>
+    <string name="register_power_off">Power off</string>
+    <string name="register_reboot">Reboot</string>
     <string name="custom_title">Клиенты</string>
     <string name="call_list">журналы вызовов</string>
     <string name="colleague">Коллеги</string>
@@ -147,6 +151,7 @@
     <string name="str_set_resposible_success">Установлена отвественность</string>
     <string name="str_set_resposible_fail">Не удалось установить ответственного</string>
     <string name="str_event_handle_warning">Необходимо обработать событие</string>
+    <string name="str_call_handle_warning">Calls need todo</string>
     <string name="str_event_response">Ответ: %s %s</string>
     <string name="str_event_cancel">Событие отменено</string>
     <string name="str_event_done">Событие выполнено</string>

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

@@ -55,6 +55,10 @@
     <string name="register_done">注册完成</string>
     <string name="register_restart">重启app</string>
     <string name="register_config_server">配置服务器</string>
+    <string name="register_cancel_device_admin">取消设备管理</string>
+    <string name="register_file_manager">文件管理</string>
+    <string name="register_power_off">关机</string>
+    <string name="register_reboot">重启</string>
     <string name="custom_title">顾客列表</string>
     <string name="call_list">通话记录</string>
     <string name="colleague">同事</string>
@@ -153,6 +157,7 @@
     <string name="str_set_resposible_success">分配处理人员成功</string>
     <string name="str_set_resposible_fail">分配处理人员失败</string>
     <string name="str_event_handle_warning">您还有事件未处理</string>
+    <string name="str_call_handle_warning">您还有呼叫未处理</string>
     <string name="str_event_response">已响应: %s %s</string>
     <string name="str_event_cancel">事件已取消</string>
     <string name="str_event_done">事件已完成</string>

+ 5 - 0
resource/src/main/res/values/strings.xml

@@ -55,6 +55,10 @@
     <string name="register_done">Register OK</string>
     <string name="register_restart">Restart app</string>
     <string name="register_config_server">Config server</string>
+    <string name="register_cancel_device_admin">Cancel device admin</string>
+    <string name="register_file_manager">File manager</string>
+    <string name="register_power_off">Power off</string>
+    <string name="register_reboot">Reboot</string>
     <string name="custom_title">Customers</string>
     <string name="call_list">Call logs</string>
     <string name="colleague">Colleagues</string>
@@ -153,6 +157,7 @@
     <string name="str_set_resposible_success">Set responsible success</string>
     <string name="str_set_resposible_fail">Set responsible failed</string>
     <string name="str_event_handle_warning">Event need todo</string>
+    <string name="str_call_handle_warning">Calls need todo</string>
     <string name="str_event_response">Responsed: %s %s</string>
     <string name="str_event_cancel">Event canceled</string>
     <string name="str_event_done">Event done</string>