Merge branch 'master' of gitlab.navinfo.com:CollectVehicle/OneMapQS

This commit is contained in:
xiaoyan 2023-05-06 11:04:32 +08:00
commit 7a09721dc8
43 changed files with 397 additions and 189 deletions

View File

@ -1,7 +1,10 @@
package com.navinfo.omqs.bean
import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize
@Parcelize
data class EvaluationInfo(
@SerializedName("evaluationTaskId")
val evaluationTaskId: String = "",//测评任务id
@ -46,5 +49,5 @@ data class EvaluationInfo(
@SerializedName("evaluationWay")
val evaluationWay: String = ""//测评方式
)
) : Parcelable

View File

@ -24,6 +24,7 @@ import io.realm.Realm
import kotlinx.coroutines.*
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import java.util.concurrent.TimeUnit
@ -66,7 +67,7 @@ class GlobalModule {
}.apply {
level = if (Constant.DEBUG) {
//坑 下载文件时打印log 内存不足
HttpLoggingInterceptor.Level.BASIC
HttpLoggingInterceptor.Level.BODY
} else {
HttpLoggingInterceptor.Level.NONE
}
@ -92,9 +93,12 @@ class GlobalModule {
@Singleton
fun provideGson(): Gson = GsonBuilder()
// 解决解析Json时将int类型自动转换为Double的问题
.registerTypeAdapter(object : TypeToken<Map<String, Any?>>() {}.getType(), IntTypeAdapter())
.registerTypeAdapter(object : TypeToken<Map<String, Any>>() {}.getType(), IntTypeAdapter())
.registerTypeAdapter(object : TypeToken<Map<Any, Any>>() {}.getType(), IntTypeAdapter())
.registerTypeAdapter(object : TypeToken<Map<String, Any?>>() {}.type, IntTypeAdapter())
.registerTypeAdapter(object : TypeToken<Map<String, Any>>() {}.type, IntTypeAdapter())
.registerTypeAdapter(object : TypeToken<Map<Any, Any>>() {}.type, IntTypeAdapter())
// .registerTypeAdapter(Call::class.java, object : TypeToken<Call<*>>(){
//
// })
.create()
@Provides

View File

@ -58,7 +58,7 @@ interface RetrofitNetworkServiceAPI {
@Headers("Content-Type: application/json")
@POST("/devcp/upload")
suspend fun postRequest(@Body listEvaluationInfo: List<EvaluationInfo>?): Call<ResponseBody>
suspend fun postRequest(@Body listEvaluationInfo: List<EvaluationInfo>?): Response<ResponseBody>
/**
* @FormUrlEncoded 请求格式注解请求实体是一个From表单每个键值对需要使用@Field注解

View File

@ -9,6 +9,7 @@ import androidx.lifecycle.Observer
import com.navinfo.collect.library.data.entity.QsRecordBean
import com.navinfo.omqs.bean.EvaluationInfo
import com.navinfo.omqs.bean.TaskBean
import com.navinfo.omqs.http.NetResult
import com.navinfo.omqs.tools.FileManager
import com.navinfo.omqs.tools.FileManager.Companion.FileUploadStatus
import io.realm.Realm
@ -114,9 +115,16 @@ class TaskUploadScope(
taskBean.hadLinkDvoList.forEach { hadLinkDvoBean ->
val objects = realm.where(QsRecordBean::class.java)
.equalTo("linkId", /*"84207223282277331"*/hadLinkDvoBean.linkPid).findAll()
if(objects.size == 0){
// change(FileUploadStatus.NONE)
return
}
val bodyList: MutableList<EvaluationInfo> = ArrayList()
if (objects != null) {
objects.forEach{
val copyList =realm.copyFromRealm(objects)
copyList.forEach {
val evaluationInfo = EvaluationInfo(
taskBean.id.toString(),
hadLinkDvoBean.linkPid,//"84207223282277331"
@ -137,26 +145,20 @@ class TaskUploadScope(
bodyList.add(evaluationInfo)
}
uploadManager.netApi.postRequest(bodyList).enqueue(object :
Callback<ResponseBody> {
override fun onResponse(
call: Call<ResponseBody>,
response: Response<ResponseBody>
) {
if (response.code() == 200) {
taskBean.syncStatus = FileUploadStatus.DONE
// handle the response
Log.e("qj", "")
change(FileUploadStatus.DONE)
}
}
override fun onFailure(call: Call<ResponseBody>, t: Throwable) {
val result = uploadManager.netApi.postRequest(bodyList)// .enqueue(object :
// Callback<ResponseBody> {
if (result.isSuccessful) {
if (result.code() == 200) {
taskBean.syncStatus = FileUploadStatus.DONE
// handle the response
change(FileUploadStatus.DONE)
} else {
// handle the failure
Log.e("qj", "")
change(FileUploadStatus.ERROR)
}
})
} else {
change(FileUploadStatus.ERROR)
}
}
}

View File

@ -60,22 +60,20 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
onBackPressed()
}
//返回按钮点击
binding.evaluationBar.setNavigationOnClickListener {
binding.evaluationBar.setOnClickListener() {
onBackPressed()
}
//标题栏按钮
binding.evaluationBar.setOnMenuItemClickListener {
when (it.itemId) {
R.id.save -> {
viewModel.saveData()
true
}
R.id.delete -> {
viewModel.deleteData()
true
}
else -> true
}
//保存事件
binding.evaluationBarSave.setOnClickListener() {
viewModel.saveData()
}
//删除事件
binding.evaluationBarDelete.setOnClickListener() {
viewModel.deleteData()
}

View File

@ -91,6 +91,8 @@ class EvaluationResultViewModel @Inject constructor(
var mSoundMeter: SoundMeter? = null
var classTypeTemp: String = ""
init {
liveDataQsRecordBean.value = QsRecordBean(id = UUID.randomUUID().toString())
Log.e("jingo", "EvaluationResultViewModel 创建了 ${hashCode()}")
@ -128,6 +130,7 @@ class EvaluationResultViewModel @Inject constructor(
geoPoint?.let {
liveDataQsRecordBean.value!!.geometry = GeometryTools.createGeometry(it).toText()
mapController.markerHandle.addMarker(geoPoint, markerTitle)
mapController.animationHandler.animationByLonLat(geoPoint.latitude,geoPoint.longitude)
viewModelScope.launch {
captureLink(geoPoint.longitude, geoPoint.latitude)
}
@ -148,6 +151,8 @@ class EvaluationResultViewModel @Inject constructor(
}
}
val point = GeometryTools.createGeoPoint(bean.geometry)
liveDataQsRecordBean.value!!.geometry = GeometryTools.createGeometry(point).toText()
mapController.animationHandler.animationByLonLat(point.latitude,point.longitude)
mapController.markerHandle.addMarker(point, markerTitle)
}
@ -196,6 +201,7 @@ class EvaluationResultViewModel @Inject constructor(
if (liveDataQsRecordBean.value!!.classType.isEmpty()) {
Log.e("jingo", "getClassTypeList $classType")
liveDataQsRecordBean.value!!.classType = classType
classTypeTemp = classType
}
getProblemList(classType)
}
@ -285,12 +291,14 @@ class EvaluationResultViewModel @Inject constructor(
viewModelScope.launch(Dispatchers.IO) {
getProblemList(classType)
}
classTypeTemp = classType
}
/**
* 监听右侧栏的点击事件修改数据
*/
fun setPhenomenonMiddleBean(adapterBean: RightBean) {
liveDataQsRecordBean.value!!.classType = classTypeTemp
liveDataQsRecordBean.value!!.phenomenon = adapterBean.text
liveDataQsRecordBean.value!!.problemType = adapterBean.title
liveDataQsRecordBean.postValue(liveDataQsRecordBean.value)
@ -305,7 +313,6 @@ class EvaluationResultViewModel @Inject constructor(
fun saveData() {
viewModelScope.launch(Dispatchers.IO) {
val realm = Realm.getDefaultInstance()
Log.e("jingo", "realm hashCOde ${realm.hashCode()}")
realm.executeTransaction {
it.copyToRealmOrUpdate(liveDataQsRecordBean.value)
}
@ -327,6 +334,7 @@ class EvaluationResultViewModel @Inject constructor(
}
// realm.close()
mapController.markerHandle.removeQsRecordMark(liveDataQsRecordBean.value!!)
mapController.mMapView.vtmMap.updateMap(true)
liveDataFinish.postValue(true)
}
}

View File

@ -29,9 +29,11 @@ class LeftAdapter(private var itemListener: ((Int, String) -> Unit?)? = null) :
val title = data[position]
bd.itemId.text = title
if (selectTitle == title) {
bd.itemId.setBackgroundColor(holder.viewBinding.root.context.getColor(R.color.cv_gray_153))
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_tittle_blue_bg_4_radius)
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.highFontColor))
} else {
bd.itemId.setBackgroundColor(holder.viewBinding.root.context.getColor(R.color.white))
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_white_bg_4_radius)
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.black))
}
bd.root.setOnClickListener {
if (selectTitle != title) {

View File

@ -28,10 +28,15 @@ class MiddleAdapter(private var itemListener: ((Int, String) -> Unit?)? = null)
val bd = holder.viewBinding as TextItemSelectBinding
val title = data[position]
bd.itemId.text = title
val layoutParams: ViewGroup.LayoutParams = holder.viewBinding.itemLayout.layoutParams
layoutParams.width = 115
bd.itemLayout.layoutParams = layoutParams
if (selectTitle == title) {
bd.itemId.setBackgroundColor(holder.viewBinding.root.context.getColor(R.color.cv_gray_153))
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_blue_bg_4_radius)
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.white))
} else {
bd.itemId.setBackgroundColor(holder.viewBinding.root.context.getColor(R.color.white))
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_white_bg_4_radius)
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.black))
}
bd.root.setOnClickListener {
if (selectTitle != title) {

View File

@ -102,7 +102,8 @@ class PhenomenonFragment :
//中间菜单
binding.phenomenonMiddleRecyclerview.setHasFixedSize(true)
binding.phenomenonMiddleRecyclerview.layoutManager = LinearLayoutManager(requireContext())
binding.phenomenonMiddleRecyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
binding.phenomenonMiddleRecyclerview.adapter = middleAdapter
//中间侧菜单查询结果监听
viewModel.liveDataMiddleTypeList.observe(viewLifecycleOwner) {

View File

@ -5,15 +5,19 @@ import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.graphics.Rect
import android.os.Build
import android.view.View
import androidx.annotation.RequiresApi
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ItemDecoration
import com.navinfo.omqs.R
/**
* 自定义装饰器实现分组+吸顶效果
*/
@RequiresApi(Build.VERSION_CODES.M)
class RightGroupHeaderDecoration(context: Context) : ItemDecoration() {
//头部的高
private val mItemHeaderHeight: Int
@ -31,7 +35,7 @@ class RightGroupHeaderDecoration(context: Context) : ItemDecoration() {
mTextPaddingLeft = dp2px(context, 6f)
mTextRect = Rect()
mItemHeaderPaint = Paint(Paint.ANTI_ALIAS_FLAG)
mItemHeaderPaint.color = Color.GRAY
mItemHeaderPaint.color = context.getColor(R.color.btn_bg_blue)
mTextPaint = Paint(Paint.ANTI_ALIAS_FLAG)
mTextPaint.textSize = 46f
mTextPaint.color = Color.WHITE
@ -84,7 +88,6 @@ class RightGroupHeaderDecoration(context: Context) : ItemDecoration() {
(view.top - 1).toFloat(), right.toFloat(),
view.top.toFloat(), mLinePaint
)
}
}
}

View File

@ -1,6 +1,53 @@
<vector android:height="24dp" android:tint="#1717E0"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path android:fillColor="@android:color/white" android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0">
<aapt:attr name="android:fillColor">
<gradient
android:angle="0"
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#FF6D0BBD"
android:startColor="#FF445FF5"
android:type="linear"
android:useLevel="false"
/>
</aapt:attr>
</path>
<path android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z">
<aapt:attr name="android:fillColor">
<gradient
android:angle="0"
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#FF6D0BBD"
android:startColor="#FF445FF5"
android:type="linear"
android:useLevel="false"
/>
</aapt:attr>
</path>
</vector>

View File

@ -1,5 +1,34 @@
<vector android:height="24dp" android:tint="#1717E0"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,15c1.66,0 2.99,-1.34 2.99,-3L15,6c0,-1.66 -1.34,-3 -3,-3S9,4.34 9,6v6c0,1.66 1.34,3 3,3zM17.3,12c0,3 -2.54,5.1 -5.3,5.1S6.7,15 6.7,12L5,12c0,3.42 2.72,6.23 6,6.72L11,22h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z"/>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,15c1.66,0 2.99,-1.34 2.99,-3L15,6c0,-1.66 -1.34,-3 -3,-3S9,4.34 9,6v6c0,1.66 1.34,3 3,3zM17.3,12c0,3 -2.54,5.1 -5.3,5.1S6.7,15 6.7,12L5,12c0,3.42 2.72,6.23 6,6.72L11,22h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z">
<aapt:attr name="android:fillColor">
<gradient
android:angle="90"
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#FF6D0BBD"
android:startColor="#00000000"
android:gradientRadius="10"
android:type="radial"
android:useLevel="false"
/>
</aapt:attr>
</path>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/blue" />
<solid android:color="@color/btn_bg_blue" />
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/high_item_color" />
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp"/>
</shape>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/white" />
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/ripple_color">
<item android:drawable="@drawable/shape_btn_video_normal"/>
</ripple>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/ripple_btn_video_normal"></item>
<item android:state_checked="true" android:drawable="@drawable/ripple_btn_video_normal"/>
<item android:state_pressed="true" android:drawable="@drawable/ripple_btn_video_normal"/>
<item android:state_selected="true" android:drawable="@drawable/ripple_btn_video_normal"></item>
<item android:drawable="@drawable/ripple_btn_video_normal"/>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/shade_btn_gray_bg_4_radius_hd"></item>
<item android:state_checked="true" android:drawable="@drawable/drawable_bg_blue_bg_4_radius"/>
<item android:state_pressed="true" android:drawable="@drawable/drawable_bg_blue_bg_4_radius"/>
<item android:state_selected="true" android:drawable="@drawable/drawable_bg_blue_bg_4_radius"></item>
<item android:drawable="@drawable/drawable_bg_white_bg_4_radius"/>
</selector>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="8dp"
android:bottomRightRadius="8dp"
android:radius="20dp"
android:topLeftRadius="8dp"
android:topRightRadius="0dp" />
<gradient
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#ff6d0bbd"
android:startColor="#ff445ff5"
android:type="linear" />
</shape>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorPrimarySurface"></solid>
<stroke android:color="@color/colorSecondary"></stroke>
<corners
android:bottomLeftRadius="8dp"
android:bottomRightRadius="8dp"
android:radius="20dp"
android:topLeftRadius="8dp"
android:topRightRadius="0dp" />
</shape>

View File

@ -56,10 +56,70 @@
app:layout_constraintLeft_toLeftOf="@id/main_activity_person_center"
app:layout_constraintTop_toBottomOf="@id/main_activity_person_center" />
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:layout_marginBottom="108dp"
app:layout_constraintRight_toLeftOf="@+id/main_activity_right_fragment"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:ignore="MissingConstraints">
<ImageButton
android:id="@+id/main_activity_voice"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/icon_add_voice"
android:background="@null" />
<ImageButton
android:id="@+id/main_activity_line"
android:layout_width="48dp"
android:layout_height="48dp"
android:onClick="@{()->mainActivity.voiceOnclick()}"
android:src="@drawable/icon_add_data"
android:background="@null" />
<ImageButton
android:id="@+id/main_activity_location"
android:layout_width="48dp"
android:layout_height="48dp"
android:onClick="@{()->viewModel.onClickLocationButton()}"
android:src="@drawable/icon_location"
android:background="@null" />
</LinearLayout>
<fragment
android:id="@+id/main_activity_middle_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="6"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/main_activity_right_fragment"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/middle_fragment_nav_graph" />
<fragment
android:id="@id/main_activity_right_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/main_activity_middle_fragment"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/right_fragment_nav_graph" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintRight_toLeftOf="@+id/main_activity_right_fragment"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
app:layout_constraintTop_toTopOf="parent"
@ -123,67 +183,6 @@
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:layout_marginBottom="108dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:ignore="MissingConstraints">
<ImageButton
android:id="@+id/main_activity_voice"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/icon_add_voice"
android:background="@null" />
<ImageButton
android:id="@+id/main_activity_line"
android:layout_width="48dp"
android:layout_height="48dp"
android:onClick="@{()->mainActivity.voiceOnclick()}"
android:src="@drawable/icon_add_data"
android:background="@null" />
<ImageButton
android:id="@+id/main_activity_location"
android:layout_width="48dp"
android:layout_height="48dp"
android:onClick="@{()->viewModel.onClickLocationButton()}"
android:src="@drawable/icon_location"
android:background="@null" />
</LinearLayout>
<fragment
android:id="@+id/main_activity_middle_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="6"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/main_activity_right_fragment"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/middle_fragment_nav_graph" />
<fragment
android:id="@id/main_activity_right_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2.5"
app:layout_constraintLeft_toRightOf="@id/main_activity_middle_fragment"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/right_fragment_nav_graph" />
<ImageButton
android:id="@+id/main_activity_camera2"

View File

@ -1,21 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/ivory"
android:background="@color/white"
android:paddingLeft="10dp"
android:paddingTop="5dp"
android:paddingRight="10dp"
android:paddingBottom="5dp"
tools:context="com.navinfo.omqs.ui.fragment.evaluationresult.SoundListAdapter">
<LinearLayout
<RelativeLayout
android:id="@+id/rl_sound_content"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_select_sound_xml"
android:background="@drawable/selector_bg_video_button"
android:gravity="center_vertical"
android:minWidth="50dp"
android:orientation="horizontal"
@ -26,20 +27,22 @@
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="6dp"
android:gravity="left|center"
android:layout_alignParentLeft="true"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:lineSpacingExtra="2dp"
android:text=""
android:textColor="@color/font_blue_reg"
android:textColor="@color/white"
android:textSize="15sp" />
<ImageView
android:id="@+id/iv_sound_anim"
android:paddingLeft="10dp"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sound_anim" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -15,7 +15,7 @@
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_width="256dp"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".ui.fragment.evaluationresult.EvaluationResultFragment">
@ -26,14 +26,38 @@
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/evaluation_bar"
style="@style/card_title_font_default"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white"
app:menu="@menu/evaluation_bar_mean"
app:title="Mark" />
android:layout_height="match_parent">
<TextView
android:padding="10dp"
android:id="@+id/evaluation_bar"
style="@style/card_title_font_default"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="Mark" />
<ImageButton
android:id="@+id/evaluation_bar_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_alignParentRight="true"
android:background="@drawable/icon_save" />
<ImageButton
android:id="@+id/evaluation_bar_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:layout_centerInParent="true"
android:layout_toLeftOf="@+id/evaluation_bar_save"
android:background="@drawable/btn_delete_xml" />
</RelativeLayout>
</com.google.android.material.appbar.AppBarLayout>

View File

@ -5,7 +5,8 @@
android:layout_height="match_parent"
android:gravity="right|center_vertical"
android:orientation="horizontal"
android:paddingLeft="30dp"
android:paddingTop="@dimen/fragment_margin_top"
android:paddingLeft="@dimen/fragment_margin_left"
tools:context="com.navinfo.omqs.ui.fragment.evaluationresult.PhenomenonFragment">
<ImageView
@ -25,42 +26,37 @@
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/phenomenon_title_bg"
android:layout_width="match_parent"
android:layout_height="65dp"
android:background="@color/default_blue"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="问题列表"
android:textColor="@color/white"
android:textSize="20sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/phenomenon_left_recyclerview"
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:background="@color/white" />
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/phenomenon_middle_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white" />
<androidx.recyclerview.widget.RecyclerView
android:layout_below="@id/phenomenon_middle_recyclerview"
android:id="@+id/phenomenon_left_recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white" />
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/phenomenon_middle_recyclerview"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/phenomenon_right_recyclerview"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:layout_weight="3"
android:background="@color/white" />
</LinearLayout>
</LinearLayout>

View File

@ -5,10 +5,12 @@
android:layout_height="match_parent"
android:gravity="right|center_vertical"
android:orientation="horizontal"
android:paddingLeft="100dp"
android:paddingTop="@dimen/fragment_margin_top"
android:paddingLeft="@dimen/fragment_margin_left"
tools:context="com.navinfo.omqs.ui.fragment.evaluationresult.ProblemLinkFragment">
<ImageView
android:visibility="gone"
android:id="@+id/link_drawer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -25,18 +27,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/link_title_bg"
android:layout_width="match_parent"
android:layout_height="65dp"
android:background="@color/default_blue"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="问题列表"
android:textColor="@color/white"
android:textSize="20sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -45,6 +35,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/link_middle_recyclerview"
android:layout_width="0dp"
android:visibility="invisible"
android:layout_height="match_parent"
android:layout_weight="2"
android:background="@color/white" />

View File

@ -1,11 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/item_id"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/item_layout"
android:background="@color/white"
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:padding="5dp"
android:textColor="@color/black"
android:textSize="18sp">
android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/item_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:padding = "3dp"
android:gravity="center"
android:textColor="@color/black"
android:textSize="18sp">
</TextView>
</RelativeLayout>

View File

@ -163,7 +163,8 @@
<color name="cv_gray_153">#999999</color>
<color name="cvm_red">#FF3B30</color>
<color name="btn_blue_solid">#108ee9</color>
<color name="titleColor">#2631DD</color>
<color name="highFontColor">#2631DD</color>
<color name="high_item_color">#FFF5F7FE</color>
<color name="contentColor">#000000</color>
<!-- 一键连接对话框背景色 -->
<color name="bg_gray2">#d1d1d1</color>
@ -171,5 +172,6 @@
<color name="bg_dark">#999999</color>
<color name="gray_121">#797979</color>
<color name="gray_59">#595959</color>
<color name="btn_bg_blue">#FF3266F1</color>
<color name="text_hint_gray" comment="输入框内默认字体颜色,输入框边框颜色">#c1c1c1</color>
</resources>

View File

@ -28,6 +28,8 @@
<dimen name="twenty">20dp</dimen>
<dimen name="twenty_two">22dp</dimen>
<dimen name="twenty_four">24dp</dimen>
<dimen name="fragment_margin_top">64dp</dimen>
<dimen name="fragment_margin_left">400dp</dimen>
<!-- 相机设置iv距离上方间距-->
<dimen name="camear_dialog_iv_margin_top" comment="相机设置窗体高度">25dp</dimen>
<!-- 相机设置窗体高度-->

View File

@ -27,7 +27,7 @@
<style name="card_title_font_default">
<item name="android:gravity">center_vertical</item>
<item name="android:textSize">@dimen/card_title_font_size</item>
<item name="android:textColor">@color/titleColor</item>
<item name="android:textColor">@color/highFontColor</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
@ -46,7 +46,7 @@
<style name="card_text_font_default">
<item name="android:gravity">center_vertical</item>
<item name="android:textSize">@dimen/card_title_font_2size</item>
<item name="android:textColor">@color/titleColor</item>
<item name="android:textColor">@color/highFontColor</item>
<item name="android:padding">10dp</item>
<item name="android:drawableRight">@drawable/icon_down_arrow</item>
<item name="android:background">@drawable/fm_card_map_down_status_bg</item>

View File

@ -591,8 +591,9 @@ public final class NIMapView extends RelativeLayout {
BASE(0)/*底图图层组*/,
VECTOR_TILE(1)/*矢量瓦片组*/,
VECTOR(2)/*高亮组*/,
OPERATE(3)/*操作图层组*/,
NAVIGATION(4)/*定位导航组*/;
OPERATE_LINE(3)/*操作图层组*/,
OPERATE_MARKER(4)/*操作图层组*/,
NAVIGATION(5)/*定位导航组*/;
int groupIndex;

View File

@ -110,7 +110,7 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
.strokeColor(context.resources.getColor(R.color.draw_line_red_color, null))
.fixed(true).randomOffset(false).build()
mDefaultPathLayer = PathLayer(mMapView.vtmMap, defaultLineStyle)
addLayer(mDefaultPathLayer, NIMapView.LAYER_GROUPS.OPERATE)
addLayer(mDefaultPathLayer, NIMapView.LAYER_GROUPS.OPERATE_LINE)
mPathLayer = PathLayer(mMapView.vtmMap, lineStyle)
// addLayer(mPathLayer, NIMapView.LAYER_GROUPS.OPERATE)

View File

@ -93,7 +93,7 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
//初始化之间数据图层
initQsRecordDataLayer()
addLayer(mDefaultMarkerLayer, NIMapView.LAYER_GROUPS.OPERATE);
addLayer(mDefaultMarkerLayer, NIMapView.LAYER_GROUPS.OPERATE_MARKER);
// 设置矢量图层均在12级以上才显示
mMapView.vtmMap.events.bind(Map.UpdateListener { e, mapPosition ->
if (e == Map.SCALE_EVENT) {
@ -259,7 +259,7 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
return true
}
})
addLayer(itemizedLayer, NIMapView.LAYER_GROUPS.OPERATE)
addLayer(itemizedLayer, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
mContext.lifecycleScope.launch(Dispatchers.IO) {
var list = mutableListOf<QsRecordBean>()
val realm = Realm.getDefaultInstance()

View File

@ -116,7 +116,7 @@ open class MeasureLayerHandler(context: AppCompatActivity, mapView: NIMapView) :
mPathLayer = PathLayer(mMapView.vtmMap, lineStyle)
addLayer(mPathLayer, NIMapView.LAYER_GROUPS.OPERATE)
addLayer(mPathLayer, NIMapView.LAYER_GROUPS.OPERATE_LINE)
}