解决代码冲突
This commit is contained in:
parent
1726c93c9d
commit
4b3adaaa97
@ -1,10 +1,12 @@
|
|||||||
package com.navinfo.omqs.ui.activity.map
|
package com.navinfo.omqs.ui.activity.map
|
||||||
|
|
||||||
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.activity.viewModels
|
import androidx.activity.viewModels
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.core.view.WindowCompat
|
import androidx.core.view.WindowCompat
|
||||||
import androidx.databinding.DataBindingUtil
|
import androidx.databinding.DataBindingUtil
|
||||||
import androidx.navigation.findNavController
|
import androidx.navigation.findNavController
|
||||||
@ -45,7 +47,7 @@ class MainActivity : BaseActivity() {
|
|||||||
// )
|
// )
|
||||||
// rightController.navigate(directions)
|
// rightController.navigate(directions)
|
||||||
rightController.currentDestination?.let {
|
rightController.currentDestination?.let {
|
||||||
if(it.id == R.id.EvaluationResultFragment){
|
if (it.id == R.id.EvaluationResultFragment) {
|
||||||
val bundle = Bundle()
|
val bundle = Bundle()
|
||||||
bundle.putParcelable("SignBean", signBean)
|
bundle.putParcelable("SignBean", signBean)
|
||||||
rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||||
@ -76,15 +78,15 @@ class MainActivity : BaseActivity() {
|
|||||||
binding.mainActivityVoice.setOnTouchListener(object : View.OnTouchListener {
|
binding.mainActivityVoice.setOnTouchListener(object : View.OnTouchListener {
|
||||||
@RequiresApi(Build.VERSION_CODES.Q)
|
@RequiresApi(Build.VERSION_CODES.Q)
|
||||||
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
|
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
|
||||||
Log.e("qj",event?.action.toString())
|
Log.e("qj", event?.action.toString())
|
||||||
when (event?.action) {
|
when (event?.action) {
|
||||||
MotionEvent.ACTION_DOWN ->{
|
MotionEvent.ACTION_DOWN -> {
|
||||||
voiceOnTouchStart()//Do Something
|
voiceOnTouchStart()//Do Something
|
||||||
Log.e("qj","voiceOnTouchStart")
|
Log.e("qj", "voiceOnTouchStart")
|
||||||
}
|
}
|
||||||
MotionEvent.ACTION_UP ->{
|
MotionEvent.ACTION_UP -> {
|
||||||
voiceOnTouchStop()//Do Something
|
voiceOnTouchStop()//Do Something
|
||||||
Log.e("qj","voiceOnTouchStop")
|
Log.e("qj", "voiceOnTouchStop")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,14 +156,14 @@ class MainActivity : BaseActivity() {
|
|||||||
naviController.navigate(R.id.EvaluationResultFragment)*/
|
naviController.navigate(R.id.EvaluationResultFragment)*/
|
||||||
}
|
}
|
||||||
|
|
||||||
fun voiceOnTouchStart(){
|
fun voiceOnTouchStart() {
|
||||||
viewModel!!.startSoundMetter(this,binding.mainActivityVoice)
|
viewModel.startSoundMetter(this, binding.mainActivityVoice)
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.Q)
|
@RequiresApi(Build.VERSION_CODES.Q)
|
||||||
fun voiceOnTouchStop(){
|
fun voiceOnTouchStop() {
|
||||||
if(Constant.IS_VIDEO_SPEED){
|
if (Constant.IS_VIDEO_SPEED) {
|
||||||
viewModel!!.stopSoundMeter()
|
viewModel.stopSoundMeter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ import com.navinfo.collect.library.map.NIMapController
|
|||||||
import com.navinfo.collect.library.map.handler.OnQsRecordItemClickListener
|
import com.navinfo.collect.library.map.handler.OnQsRecordItemClickListener
|
||||||
import com.navinfo.collect.library.utils.GeometryTools
|
import com.navinfo.collect.library.utils.GeometryTools
|
||||||
import com.navinfo.collect.library.utils.GeometryToolsKt
|
import com.navinfo.collect.library.utils.GeometryToolsKt
|
||||||
|
import com.navinfo.omqs.Constant
|
||||||
import com.navinfo.omqs.R
|
import com.navinfo.omqs.R
|
||||||
import com.navinfo.omqs.bean.SignBean
|
import com.navinfo.omqs.bean.SignBean
|
||||||
import com.navinfo.omqs.db.RealmOperateHelper
|
import com.navinfo.omqs.db.RealmOperateHelper
|
||||||
|
@ -82,15 +82,15 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
|
|||||||
binding.evaluationVoice.setOnTouchListener(object : View.OnTouchListener {
|
binding.evaluationVoice.setOnTouchListener(object : View.OnTouchListener {
|
||||||
@RequiresApi(Build.VERSION_CODES.Q)
|
@RequiresApi(Build.VERSION_CODES.Q)
|
||||||
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
|
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
|
||||||
Log.e("qj",event?.action.toString())
|
Log.e("qj", event?.action.toString())
|
||||||
when (event?.action) {
|
when (event?.action) {
|
||||||
MotionEvent.ACTION_DOWN ->{
|
MotionEvent.ACTION_DOWN -> {
|
||||||
voiceOnTouchStart()//Do Something
|
voiceOnTouchStart()//Do Something
|
||||||
Log.e("qj","voiceOnTouchStart")
|
Log.e("qj", "voiceOnTouchStart")
|
||||||
}
|
}
|
||||||
MotionEvent.ACTION_UP ->{
|
MotionEvent.ACTION_UP -> {
|
||||||
voiceOnTouchStop()//Do Something
|
voiceOnTouchStop()//Do Something
|
||||||
Log.e("qj","voiceOnTouchStop")
|
Log.e("qj", "voiceOnTouchStop")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return v?.onTouchEvent(event) ?: true
|
return v?.onTouchEvent(event) ?: true
|
||||||
@ -103,8 +103,10 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
|
|||||||
// val id = args.qsId
|
// val id = args.qsId
|
||||||
var id: String = ""
|
var id: String = ""
|
||||||
var signBean: SignBean? = null
|
var signBean: SignBean? = null
|
||||||
|
var filePath: String = ""
|
||||||
arguments?.let {
|
arguments?.let {
|
||||||
id = it.getString("QsId", "")
|
id = it.getString("QsId", "")
|
||||||
|
filePath = it.getString("filePath", "")
|
||||||
try {
|
try {
|
||||||
signBean = it.getParcelable("SignBean")
|
signBean = it.getParcelable("SignBean")
|
||||||
} catch (e: java.lang.Exception) {
|
} catch (e: java.lang.Exception) {
|
||||||
@ -112,7 +114,7 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (id == null || id.isEmpty()) {
|
if (id == null || id.isEmpty()) {
|
||||||
viewModel.initNewData(signBean)
|
viewModel.initNewData(signBean, filePath)
|
||||||
} else {
|
} else {
|
||||||
viewModel.initData(id)
|
viewModel.initData(id)
|
||||||
}
|
}
|
||||||
@ -277,13 +279,13 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun voiceOnTouchStart(){
|
fun voiceOnTouchStart() {
|
||||||
viewModel!!.startSoundMetter(requireActivity(),binding.evaluationVoice)
|
viewModel!!.startSoundMetter(requireActivity(), binding.evaluationVoice)
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.Q)
|
@RequiresApi(Build.VERSION_CODES.Q)
|
||||||
fun voiceOnTouchStop(){
|
fun voiceOnTouchStop() {
|
||||||
if(Constant.IS_VIDEO_SPEED){
|
if (Constant.IS_VIDEO_SPEED) {
|
||||||
viewModel!!.stopSoundMeter()
|
viewModel!!.stopSoundMeter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@ class EvaluationResultViewModel @Inject constructor(
|
|||||||
|
|
||||||
fun addChatMsgEntity(filePath: String) {
|
fun addChatMsgEntity(filePath: String) {
|
||||||
|
|
||||||
if(filePath!=null){
|
if(filePath.isNotEmpty()){
|
||||||
var chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
|
var chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
|
||||||
if(listDataChatMsgEntityList.value?.isEmpty() == false){
|
if(listDataChatMsgEntityList.value?.isEmpty() == false){
|
||||||
chatMsgEntityList = listDataChatMsgEntityList.value!!
|
chatMsgEntityList = listDataChatMsgEntityList.value!!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user