fix: 合并冲突
@ -6,6 +6,12 @@ plugins {
|
||||
id 'kotlin-parcelize' // 序列化
|
||||
id 'androidx.navigation.safeargs.kotlin'//Safe Args传递数据
|
||||
}
|
||||
|
||||
//定义时间
|
||||
def releaseTime() {
|
||||
return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.navinfo.omqs'
|
||||
compileSdk 33
|
||||
|
@ -1,13 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:versionCode="3"
|
||||
android:versionName="1.4"
|
||||
package="com.navinfo.omqs">
|
||||
<!-- 这个权限用于进行网络定位-->
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<!-- 这个权限用于访问GPS定位-->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<!-- 这个权限用于访问GPS定位-->
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||
<!-- 用于访问wifi网络信息,wifi信息会用于进行网络定位-->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<!-- 获取运营商信息,用于支持提供运营商信息相关的接口-->
|
||||
@ -57,11 +59,10 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activity.map.MainActivity"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="landscape"
|
||||
android:exported="false"
|
||||
android:theme="@style/Theme.OMQualityInspection" />
|
||||
|
||||
<meta-data
|
||||
android:name="ScopedStorage"
|
||||
android:value="true" />
|
||||
|
@ -1,6 +1,11 @@
|
||||
package com.navinfo.omqs
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.Application
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.content.res.Configuration
|
||||
import android.view.Surface
|
||||
import android.view.WindowManager
|
||||
import com.navinfo.omqs.tools.FileManager
|
||||
import com.navinfo.omqs.ui.manager.TakePhotoManager
|
||||
import com.navinfo.omqs.util.NetUtils
|
||||
@ -23,5 +28,4 @@ class OMQSApplication : Application() {
|
||||
val hashBytes = messageDigest.digest(inputString.toByteArray())
|
||||
return hashBytes.joinToString("") { "%02x".format(it) };
|
||||
}
|
||||
|
||||
}
|
@ -12,7 +12,7 @@ data class EvaluationInfo(
|
||||
val linkPid: String = "",//Link号
|
||||
|
||||
@SerializedName("linkStatus")
|
||||
val linkStatus: Int = 0,//Link状态
|
||||
val linkStatus: Int = 0,//Link状态 ;0未测评 1已测评 2原库新增 3现场新增
|
||||
|
||||
@SerializedName("markId")
|
||||
val markId: String = "",//Link状态
|
||||
@ -27,7 +27,7 @@ data class EvaluationInfo(
|
||||
val featureName: String = "",//问题类型
|
||||
|
||||
@SerializedName("problemType")
|
||||
val problemType: String = "",//问题现象 0错误 1多余 2遗漏 服务字段定义为Integer,使用包装类,对应无值情况为空
|
||||
val problemType: Int = 0,//问题现象 0错误 1多余 2遗漏 服务字段定义为Integer,使用包装类,对应无值情况为空
|
||||
|
||||
@SerializedName("problemPhenomenon")
|
||||
val problemPhenomenon: String = "",//问题现象
|
||||
@ -48,7 +48,7 @@ data class EvaluationInfo(
|
||||
val evaluationDate: String = "",//测评日期(yyyy-mm-dd)
|
||||
|
||||
@SerializedName("evaluationWay")
|
||||
val evaluationWay: String = "2",//测评方式 1生产测评 2现场测评 服务字段定义为Integer,使用包装类,对应无值情况为空
|
||||
val evaluationWay: Int = 2,//测评方式 1生产测评 2现场测评 服务字段定义为Integer,使用包装类,对应无值情况为空
|
||||
|
||||
@SerializedName("roadClassfcation")
|
||||
val roadClassfcation: String = "",//道路种别
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.navinfo.omqs.http
|
||||
|
||||
class DefaultTaskResponse<T> {
|
||||
class DefaultResponse<T> {
|
||||
var success: Boolean = false
|
||||
var msg: String = ""
|
||||
var obj: T? = null
|
@ -1,7 +0,0 @@
|
||||
package com.navinfo.omqs.http
|
||||
|
||||
class DefaultUserResponse<T> {
|
||||
var success: Boolean = false
|
||||
var msg: String = ""
|
||||
var obj: T? = null
|
||||
}
|
@ -19,10 +19,10 @@ interface NetworkService {
|
||||
/**
|
||||
* 获取任务列表
|
||||
*/
|
||||
suspend fun getTaskList(evaluatorNo:String): NetResult<DefaultTaskResponse<List<TaskBean>>>
|
||||
suspend fun getTaskList(evaluatorNo:String): NetResult<DefaultResponse<List<TaskBean>>>
|
||||
|
||||
/**
|
||||
* 登录接口
|
||||
*/
|
||||
suspend fun loginUser(loginUserBean: LoginUserBean): NetResult<DefaultUserResponse<SysUserBean>>
|
||||
suspend fun loginUser(loginUserBean: LoginUserBean): NetResult<DefaultResponse<SysUserBean>>
|
||||
}
|
@ -38,7 +38,7 @@ class NetworkServiceImpl @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun getTaskList(evaluatorNo: String): NetResult<DefaultTaskResponse<List<TaskBean>>> =
|
||||
override suspend fun getTaskList(evaluatorNo: String): NetResult<DefaultResponse<List<TaskBean>>> =
|
||||
//在IO线程中运行
|
||||
withContext(Dispatchers.IO) {
|
||||
return@withContext try {
|
||||
@ -57,7 +57,7 @@ class NetworkServiceImpl @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun loginUser(loginUserBean: LoginUserBean): NetResult<DefaultUserResponse<SysUserBean>> =
|
||||
override suspend fun loginUser(loginUserBean: LoginUserBean): NetResult<DefaultResponse<SysUserBean>> =
|
||||
//在IO线程中运行
|
||||
withContext(Dispatchers.IO) {
|
||||
return@withContext try {
|
||||
|
@ -47,7 +47,7 @@ interface RetrofitNetworkServiceAPI {
|
||||
*/
|
||||
@Headers("Content-Type: application/json")
|
||||
@POST("/devcp/loginUser")
|
||||
suspend fun retrofitLoginUser(@Body loginUserBean: LoginUserBean): Response<DefaultUserResponse<SysUserBean>>
|
||||
suspend fun retrofitLoginUser(@Body loginUserBean: LoginUserBean): Response<DefaultResponse<SysUserBean>>
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
@ -62,11 +62,11 @@ interface RetrofitNetworkServiceAPI {
|
||||
@GET("/devcp/getEvaluationTask?evaluatType=2")
|
||||
suspend fun retrofitGetTaskList(
|
||||
@Query("evaluatorNo") evaluatorNo: String,
|
||||
): Response<DefaultTaskResponse<List<TaskBean>>>
|
||||
): Response<DefaultResponse<List<TaskBean>>>
|
||||
|
||||
@Headers("Content-Type: application/json")
|
||||
@POST("/devcp/uploadSceneProblem")
|
||||
suspend fun postRequest(@Body listEvaluationInfo: List<EvaluationInfo>?): Response<ResponseBody>
|
||||
suspend fun postRequest(@Body listEvaluationInfo: List<EvaluationInfo>?): Response<DefaultResponse<*>>
|
||||
|
||||
/**
|
||||
* @FormUrlEncoded 请求格式注解,请求实体是一个From表单,每个键值对需要使用@Field注解
|
||||
|
@ -2,6 +2,7 @@ package com.navinfo.omqs.http.taskupload
|
||||
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
@ -9,6 +10,8 @@ import androidx.lifecycle.Observer
|
||||
import com.navinfo.collect.library.data.entity.QsRecordBean
|
||||
import com.navinfo.omqs.bean.EvaluationInfo
|
||||
import com.navinfo.collect.library.data.entity.TaskBean
|
||||
import com.navinfo.omqs.bean.SysUserBean
|
||||
import com.navinfo.omqs.http.DefaultResponse
|
||||
import com.navinfo.omqs.tools.FileManager.Companion.FileUploadStatus
|
||||
import io.realm.Realm
|
||||
import kotlinx.coroutines.*
|
||||
@ -68,6 +71,7 @@ class TaskUploadScope(
|
||||
private fun change(status: Int, message: String = "") {
|
||||
if (taskBean.syncStatus != status) {
|
||||
taskBean.syncStatus = status
|
||||
taskBean.errMsg = message
|
||||
uploadData.postValue(taskBean)
|
||||
//同步中不进行状态记录,只做界面变更显示
|
||||
if(status!=FileUploadStatus.UPLOADING){
|
||||
@ -121,15 +125,15 @@ class TaskUploadScope(
|
||||
if (objects != null&&objects.size>0) {
|
||||
val copyList = realm.copyFromRealm(objects)
|
||||
copyList.forEach {
|
||||
var problemType = "0"
|
||||
var problemType = 0
|
||||
if(it.problemType=="错误"){
|
||||
problemType = "0"
|
||||
problemType = 0
|
||||
}else if(it.problemType=="多余"){
|
||||
problemType = "1"
|
||||
problemType = 1
|
||||
}else if(it.problemType=="遗漏"){
|
||||
problemType = "2"
|
||||
problemType = 2
|
||||
}
|
||||
var evaluationWay = "2";
|
||||
var evaluationWay = 2
|
||||
/* if(it.evaluationWay=="生产测评"){
|
||||
evaluationWay = "1"
|
||||
}else if(it.evaluationWay=="现场测评"){
|
||||
@ -170,14 +174,14 @@ class TaskUploadScope(
|
||||
trackPhotoNumber = "",
|
||||
markGeometry = "",
|
||||
featureName = "",
|
||||
problemType = "",
|
||||
problemType = 0,
|
||||
problemPhenomenon = "",
|
||||
problemDesc = "",
|
||||
problemLink = "",
|
||||
problemReason = "",
|
||||
evaluatorName = "",
|
||||
evaluationDate = "",
|
||||
evaluationWay = "",
|
||||
evaluationWay = 2,
|
||||
roadClassfcation = "",
|
||||
roadFunctionGrade = "",
|
||||
noEvaluationreason = "",
|
||||
@ -193,10 +197,13 @@ class TaskUploadScope(
|
||||
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)
|
||||
if (result.code() == 200&&result.body()!=null) {
|
||||
val defaultUserResponse = result.body() as DefaultResponse<*>
|
||||
if(defaultUserResponse.success){
|
||||
change(FileUploadStatus.DONE,"上传成功")
|
||||
}else{
|
||||
change(FileUploadStatus.ERROR,"${defaultUserResponse.msg}")
|
||||
}
|
||||
} else {
|
||||
// handle the failure
|
||||
change(FileUploadStatus.ERROR)
|
||||
|
@ -13,10 +13,15 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
open class BaseActivity : AppCompatActivity() {
|
||||
private var loadingDialog: AlertDialog? = null
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE//横屏
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示loading dialog
|
||||
*/
|
||||
|
@ -13,7 +13,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.navinfo.omqs.R
|
||||
import com.navinfo.omqs.databinding.ActivityLoginBinding
|
||||
import com.navinfo.omqs.ui.activity.CheckPermissionsActivity
|
||||
import com.navinfo.omqs.ui.activity.PermissionsActivity
|
||||
import com.navinfo.omqs.ui.activity.map.MainActivity
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
|
@ -12,7 +12,7 @@ import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.bean.LoginUserBean
|
||||
import com.navinfo.omqs.bean.SysUserBean
|
||||
import com.navinfo.omqs.db.RoomAppDatabase
|
||||
import com.navinfo.omqs.http.DefaultUserResponse
|
||||
import com.navinfo.omqs.http.DefaultResponse
|
||||
import com.navinfo.omqs.http.NetResult
|
||||
import com.navinfo.omqs.http.NetworkService
|
||||
import com.navinfo.omqs.tools.FileManager
|
||||
@ -119,7 +119,7 @@ class LoginViewModel @Inject constructor(
|
||||
is NetResult.Success<*> ->{
|
||||
if (result.data!=null) {
|
||||
try {
|
||||
val defaultUserResponse = result.data as DefaultUserResponse<SysUserBean>
|
||||
val defaultUserResponse = result.data as DefaultResponse<SysUserBean>
|
||||
if(defaultUserResponse.success){
|
||||
if(defaultUserResponse.obj==null|| defaultUserResponse.obj!!.userCode==null){
|
||||
withContext(Dispatchers.Main) {
|
||||
|
@ -12,12 +12,9 @@ import android.widget.EditText
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.activity.viewModels
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.NavDestination
|
||||
import androidx.navigation.findNavController
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
@ -30,6 +27,10 @@ import com.navinfo.omqs.databinding.ActivityMainBinding
|
||||
import com.navinfo.omqs.http.offlinemapdownload.OfflineMapDownloadManager
|
||||
import com.navinfo.omqs.tools.LayerConfigUtils
|
||||
import com.navinfo.omqs.ui.activity.BaseActivity
|
||||
import com.navinfo.omqs.ui.fragment.console.ConsoleFragment
|
||||
import com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapFragment
|
||||
import com.navinfo.omqs.ui.fragment.qsrecordlist.QsRecordListFragment
|
||||
import com.navinfo.omqs.ui.fragment.tasklist.TaskManagerFragment
|
||||
import com.navinfo.omqs.ui.widget.RecyclerViewSpacesItemDecoration
|
||||
import com.navinfo.omqs.util.FlowEventBus
|
||||
import com.navinfo.omqs.util.SpeakMode
|
||||
@ -49,6 +50,14 @@ class MainActivity : BaseActivity() {
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
private val viewModel by viewModels<MainViewModel>()
|
||||
|
||||
/**
|
||||
* 左侧fragment
|
||||
*/
|
||||
private var leftFragment: Fragment? = null
|
||||
|
||||
/**
|
||||
* 是否开启右侧面板
|
||||
*/
|
||||
var switchFragment = false
|
||||
|
||||
/**
|
||||
@ -79,7 +88,7 @@ class MainActivity : BaseActivity() {
|
||||
* 提前显示要素看板
|
||||
*/
|
||||
private val signAdapter by lazy {
|
||||
SignAdapter { position, autoSave,signBean ->
|
||||
SignAdapter { _, autoSave, signBean ->
|
||||
rightController.currentDestination?.let {
|
||||
if (it.id == R.id.RightEmptyFragment) {
|
||||
val bundle = Bundle()
|
||||
@ -95,7 +104,7 @@ class MainActivity : BaseActivity() {
|
||||
* 道路信息看板
|
||||
*/
|
||||
private val topSignAdapter by lazy {
|
||||
TopSignAdapter { position, signBean ->
|
||||
TopSignAdapter { _, signBean ->
|
||||
rightController.currentDestination?.let {
|
||||
if (it.id == R.id.RightEmptyFragment) {
|
||||
val bundle = Bundle()
|
||||
@ -108,7 +117,6 @@ class MainActivity : BaseActivity() {
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val checkIntent = Intent()
|
||||
@ -138,22 +146,19 @@ class MainActivity : BaseActivity() {
|
||||
//给xml传递viewModel对象
|
||||
binding.viewModel = viewModel
|
||||
|
||||
binding.mainActivityVoice.setOnTouchListener(object : View.OnTouchListener {
|
||||
@RequiresApi(Build.VERSION_CODES.Q)
|
||||
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
|
||||
when (event?.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
voiceOnTouchStart()//Do Something
|
||||
Log.e("qj", "voiceOnTouchStart")
|
||||
}
|
||||
MotionEvent.ACTION_UP -> {
|
||||
voiceOnTouchStop()//Do Something
|
||||
Log.e("qj", "voiceOnTouchStop")
|
||||
}
|
||||
binding.mainActivityVoice.setOnTouchListener { v, event ->
|
||||
when (event?.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
voiceOnTouchStart()//Do Something
|
||||
Log.e("qj", "voiceOnTouchStart")
|
||||
}
|
||||
MotionEvent.ACTION_UP -> {
|
||||
voiceOnTouchStop()//Do Something
|
||||
Log.e("qj", "voiceOnTouchStop")
|
||||
}
|
||||
return v?.onTouchEvent(event) ?: true
|
||||
}
|
||||
})
|
||||
v?.onTouchEvent(event) ?: true
|
||||
}
|
||||
|
||||
viewModel.liveDataQsRecordIdList.observe(this) {
|
||||
//处理页面跳转
|
||||
@ -200,12 +205,19 @@ class MainActivity : BaseActivity() {
|
||||
}
|
||||
//监听地图中点变化
|
||||
viewModel.liveDataCenterPoint.observe(this) {
|
||||
binding.mainActivityGeometry.text = "经纬度:${
|
||||
BigDecimal(it.longitude).setScale(
|
||||
7,
|
||||
RoundingMode.HALF_UP
|
||||
)
|
||||
},${BigDecimal(it.latitude).setScale(7, RoundingMode.HALF_UP)}"
|
||||
Log.e("qj","${it.longitude}")
|
||||
try{
|
||||
if(it!=null&&it.longitude!=null&&it.latitude!=null){
|
||||
binding.mainActivityGeometry.text = "经纬度:${
|
||||
BigDecimal(it.longitude).setScale(
|
||||
7,
|
||||
RoundingMode.HALF_UP
|
||||
)
|
||||
},${BigDecimal(it.latitude).setScale(7, RoundingMode.HALF_UP)}"
|
||||
}
|
||||
}catch (e:Exception){
|
||||
Log.e("qj","异常")
|
||||
}
|
||||
}
|
||||
|
||||
lifecycleScope.launch {
|
||||
@ -217,7 +229,7 @@ class MainActivity : BaseActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
findNavController(R.id.main_activity_right_fragment).addOnDestinationChangedListener { controller, destination, arguments ->
|
||||
findNavController(R.id.main_activity_right_fragment).addOnDestinationChangedListener { _, destination, arguments ->
|
||||
if (destination.id == R.id.RightEmptyFragment) {
|
||||
binding.mainActivityRightVisibilityButtonsGroup.visibility = View.VISIBLE
|
||||
} else {
|
||||
@ -226,6 +238,9 @@ class MainActivity : BaseActivity() {
|
||||
binding.mainActivitySelectLine.isSelected = false
|
||||
}
|
||||
}
|
||||
|
||||
supportFragmentManager.beginTransaction()
|
||||
.add(R.id.console_fragment_layout, ConsoleFragment()).commit()
|
||||
}
|
||||
|
||||
//根据输入的经纬度跳转坐标
|
||||
@ -266,9 +281,6 @@ class MainActivity : BaseActivity() {
|
||||
//开启定位
|
||||
mapController.locationLayerHandler.startLocation()
|
||||
mapController.mMapView.setLogoVisable(View.GONE)
|
||||
//启动轨迹存储
|
||||
// viewModel.startSaveTraceThread(this)
|
||||
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
@ -292,7 +304,15 @@ class MainActivity : BaseActivity() {
|
||||
* 打开个人中菜单
|
||||
*/
|
||||
fun openMenu() {
|
||||
binding.mainActivityDrawer.open()
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.console_fragment_layout, ConsoleFragment()).commit()
|
||||
if (leftFragment != null) {
|
||||
supportFragmentManager.beginTransaction().remove(leftFragment!!).commit()
|
||||
leftFragment = null
|
||||
binding.mainActivityBottomSheetGroup.visibility = View.GONE
|
||||
binding.mainActivityLeftFragment.visibility = View.GONE
|
||||
}
|
||||
// binding.mainActivityDrawer.open()
|
||||
}
|
||||
|
||||
/**
|
||||
@ -328,7 +348,7 @@ class MainActivity : BaseActivity() {
|
||||
/**
|
||||
* 点击搜索
|
||||
*/
|
||||
fun onClickSerach() {
|
||||
fun onClickSearch() {
|
||||
|
||||
}
|
||||
|
||||
@ -389,18 +409,89 @@ class MainActivity : BaseActivity() {
|
||||
binding.mainActivitySelectLine.isSelected = viewModel.isSelectRoad()
|
||||
}
|
||||
|
||||
fun voiceOnTouchStart() {
|
||||
viewModel.startSoundMetter(this, binding.mainActivityVoice)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.Q)
|
||||
fun voiceOnTouchStop() {
|
||||
if (Constant.IS_VIDEO_SPEED) {
|
||||
viewModel.stopSoundMeter()
|
||||
/**
|
||||
* 打开或关闭底部导航栏
|
||||
*/
|
||||
fun onSwitchSheet() {
|
||||
if (binding.mainActivityBottomSheetGroup.visibility == View.VISIBLE) {
|
||||
binding.mainActivityBottomSheetGroup.visibility = View.GONE
|
||||
} else {
|
||||
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
// override fun onBackPressed() {
|
||||
// super.onBackPressed()
|
||||
// }
|
||||
private fun voiceOnTouchStart() {
|
||||
viewModel.startSoundMetter(this, binding.mainActivityVoice)
|
||||
}
|
||||
|
||||
private fun voiceOnTouchStop() {
|
||||
if (Constant.IS_VIDEO_SPEED) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
viewModel.stopSoundMeter()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开测评任务面板
|
||||
*/
|
||||
fun onClickTaskFragment() {
|
||||
if (leftFragment !is TaskManagerFragment) {
|
||||
if (leftFragment == null) {
|
||||
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
|
||||
binding.mainActivityLeftFragment.visibility = View.VISIBLE
|
||||
}
|
||||
leftFragment = TaskManagerFragment {
|
||||
binding.mainActivityLeftFragment.visibility = View.GONE
|
||||
supportFragmentManager.beginTransaction()
|
||||
.remove(leftFragment!!).commit()
|
||||
leftFragment = null
|
||||
null
|
||||
}
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.main_activity_left_fragment, leftFragment!!).commit()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开测评结果面板
|
||||
*/
|
||||
fun onClickResFragment() {
|
||||
if (leftFragment !is QsRecordListFragment) {
|
||||
if (leftFragment == null) {
|
||||
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
|
||||
binding.mainActivityLeftFragment.visibility = View.VISIBLE
|
||||
}
|
||||
leftFragment = QsRecordListFragment {
|
||||
binding.mainActivityLeftFragment.visibility = View.GONE
|
||||
supportFragmentManager.beginTransaction()
|
||||
.remove(leftFragment!!).commit()
|
||||
leftFragment = null
|
||||
null
|
||||
}
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.main_activity_left_fragment, leftFragment!!).commit()
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 打开离线地图
|
||||
*/
|
||||
fun onClickOfflineMapFragment(){
|
||||
if (leftFragment !is OfflineMapFragment) {
|
||||
if (leftFragment == null) {
|
||||
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
|
||||
binding.mainActivityLeftFragment.visibility = View.VISIBLE
|
||||
}
|
||||
leftFragment = OfflineMapFragment {
|
||||
binding.mainActivityLeftFragment.visibility = View.GONE
|
||||
supportFragmentManager.beginTransaction()
|
||||
.remove(leftFragment!!).commit()
|
||||
leftFragment = null
|
||||
null
|
||||
}
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.main_activity_left_fragment, leftFragment!!).commit()
|
||||
}
|
||||
}
|
||||
}
|
@ -78,6 +78,9 @@ class MainViewModel @Inject constructor(
|
||||
|
||||
// var testPoint = GeoPoint(0, 0)
|
||||
|
||||
//uuid标识,用于记录轨迹组
|
||||
val uuid = UUID.randomUUID().toString()
|
||||
|
||||
//语音窗体
|
||||
private var pop: PopupWindow? = null
|
||||
|
||||
@ -160,15 +163,9 @@ class MainViewModel @Inject constructor(
|
||||
}
|
||||
|
||||
private fun initLocation() {
|
||||
// mapController.locationLayerHandler.setNiLocationListener(NiLocationListener {
|
||||
// addSaveTrace(it)
|
||||
//
|
||||
// })
|
||||
//用于定位点存储到数据库
|
||||
viewModelScope.launch(Dispatchers.Default) {
|
||||
mapController.locationLayerHandler.niLocationFlow.collect { location ->
|
||||
// location.longitude = testPoint.longitude
|
||||
// location.latitude = testPoint.latitude
|
||||
val geometry = GeometryTools.createGeometry(
|
||||
GeoPoint(
|
||||
location.latitude, location.longitude
|
||||
@ -186,7 +183,13 @@ class MainViewModel @Inject constructor(
|
||||
location.tiley = y
|
||||
}
|
||||
}
|
||||
Log.e("jingo", "定位点插入 ${Thread.currentThread().name}")
|
||||
Log.e("jingo", "定位点插入 ${location.longitude}")
|
||||
location.groupId = uuid
|
||||
try {
|
||||
location.timeStamp = DateTimeUtil.getTime(location.time).toString()
|
||||
}catch (e: Exception){
|
||||
|
||||
}
|
||||
traceDataBase.niLocationDao.insert(location)
|
||||
mapController.mMapView.vtmMap.updateMap(true)
|
||||
}
|
||||
@ -194,8 +197,6 @@ class MainViewModel @Inject constructor(
|
||||
//用于定位点捕捉道路
|
||||
viewModelScope.launch(Dispatchers.Default) {
|
||||
mapController.locationLayerHandler.niLocationFlow.collectLatest { location ->
|
||||
// location.longitude = testPoint.longitude
|
||||
// location.latitude = testPoint.latitude
|
||||
if (!isSelectRoad()) captureLink(GeoPoint(location.latitude, location.longitude))
|
||||
}
|
||||
}
|
||||
@ -292,9 +293,10 @@ class MainViewModel @Inject constructor(
|
||||
}
|
||||
linkIdCache = linkId ?: ""
|
||||
Log.e("jingo", "自动捕捉数据 共${signList.size}条")
|
||||
} else {
|
||||
mapController.lineHandler.removeLine()
|
||||
}
|
||||
}else{
|
||||
mapController.lineHandler.removeLine()
|
||||
linkIdCache = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,250 @@
|
||||
package com.navinfo.omqs.ui.fragment.console
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.View.OnClickListener
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.transition.AutoTransition
|
||||
import androidx.transition.Scene
|
||||
import androidx.transition.TransitionManager
|
||||
import com.navinfo.omqs.R
|
||||
import com.navinfo.omqs.databinding.FragmentConsoleBinding
|
||||
import com.navinfo.omqs.ui.activity.map.MainActivity
|
||||
import com.navinfo.omqs.ui.fragment.BaseFragment
|
||||
import com.navinfo.omqs.ui.fragment.evaluationresult.EvaluationResultFragment
|
||||
import com.navinfo.omqs.ui.fragment.layermanager.LayerManagerFragment
|
||||
import com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapFragment
|
||||
import com.navinfo.omqs.ui.fragment.personalcenter.PersonalCenterFragment
|
||||
import com.navinfo.omqs.ui.fragment.qsrecordlist.QsRecordListFragment
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@AndroidEntryPoint
|
||||
class ConsoleFragment : BaseFragment(), OnClickListener {
|
||||
|
||||
private var _binding: FragmentConsoleBinding? = null
|
||||
private val binding get() = _binding!!
|
||||
private var sceneFlag = true
|
||||
private val aTransition = AutoTransition()
|
||||
private val bTransition = AutoTransition()
|
||||
private var mFragment: Fragment? = null
|
||||
private val fragmentId = R.id.console_fragment
|
||||
|
||||
// 创建a场景
|
||||
private val aScene by lazy {
|
||||
Scene.getSceneForLayout(
|
||||
binding.consoleRoot, R.layout.console_on, requireContext()
|
||||
)
|
||||
}
|
||||
|
||||
// 创建b场景
|
||||
private val bScene by lazy {
|
||||
Scene.getSceneForLayout(
|
||||
binding.consoleRoot, R.layout.console_off, requireContext()
|
||||
)
|
||||
}
|
||||
|
||||
// private val mTransitionAManager: TransitionManager by lazy {
|
||||
// TransitionInflater.from(this)
|
||||
// .inflateTransitionManager(R.transition.transitionmanager_console, binding.consoleRoot)
|
||||
// }
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||
): View {
|
||||
_binding = FragmentConsoleBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
aTransition.addListener(object : androidx.transition.Transition.TransitionListener {
|
||||
override fun onTransitionStart(transition: androidx.transition.Transition) {
|
||||
sceneFlag = true
|
||||
if (mFragment != null) {
|
||||
Log.e("jingo", "动画开始B mFragment 不为null")
|
||||
childFragmentManager.beginTransaction().remove(mFragment!!).commit()
|
||||
mFragment = null
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTransitionEnd(transition: androidx.transition.Transition) {
|
||||
Log.e("jingo", "动画A结束")
|
||||
initOnClickListener()
|
||||
}
|
||||
|
||||
override fun onTransitionCancel(transition: androidx.transition.Transition) {
|
||||
}
|
||||
|
||||
override fun onTransitionPause(transition: androidx.transition.Transition) {
|
||||
}
|
||||
|
||||
override fun onTransitionResume(transition: androidx.transition.Transition) {
|
||||
}
|
||||
|
||||
})
|
||||
bTransition.addListener(object : androidx.transition.Transition.TransitionListener {
|
||||
override fun onTransitionStart(transition: androidx.transition.Transition) {
|
||||
sceneFlag = false
|
||||
if (mFragment != null) {
|
||||
Log.e("jingo", "动画开始A mFragment 不为null")
|
||||
childFragmentManager.beginTransaction().replace(fragmentId, mFragment!!)
|
||||
.commit()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTransitionEnd(transition: androidx.transition.Transition) {
|
||||
initOnClickListener()
|
||||
}
|
||||
|
||||
override fun onTransitionCancel(transition: androidx.transition.Transition) {
|
||||
}
|
||||
|
||||
override fun onTransitionPause(transition: androidx.transition.Transition) {
|
||||
}
|
||||
|
||||
override fun onTransitionResume(transition: androidx.transition.Transition) {
|
||||
}
|
||||
|
||||
})
|
||||
initOnClickListener()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置点击事件
|
||||
*/
|
||||
private fun initOnClickListener() {
|
||||
/**
|
||||
* 地图按钮
|
||||
*/
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_map_icon_bg)?.setOnClickListener(
|
||||
this
|
||||
)
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_map_bg)?.setOnClickListener(this)
|
||||
/**
|
||||
* 离线地图按钮
|
||||
*/
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_offline_map_icon_bg)
|
||||
?.setOnClickListener(this)
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_offline_map_bg)
|
||||
?.setOnClickListener(this)
|
||||
/**
|
||||
* 图层设置按钮
|
||||
*/
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_layer_setting_icon_bg)
|
||||
?.setOnClickListener(this)
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_layer_setting_bg)
|
||||
?.setOnClickListener(this)
|
||||
/**
|
||||
* 个人中心
|
||||
*/
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_personal_center_icon_bg)
|
||||
?.setOnClickListener(this)
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_personal_center_bg)
|
||||
?.setOnClickListener(this)
|
||||
/**
|
||||
* 测评结果列表
|
||||
*/
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_evaluation_icon_bg)
|
||||
?.setOnClickListener(this)
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_evaluation_bg)?.setOnClickListener(this)
|
||||
/**
|
||||
* 评测任务
|
||||
*/
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_task_bg)?.setOnClickListener(this)
|
||||
binding.consoleRoot.findViewById<View>(R.id.console_task_icon_bg)?.setOnClickListener(this)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
_binding = null
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
v?.let {
|
||||
when (it.id) {
|
||||
/**
|
||||
* 地图点击事件
|
||||
*/
|
||||
R.id.console_map_bg, R.id.console_map_icon_bg -> {
|
||||
activity?.let { a ->
|
||||
a.supportFragmentManager.beginTransaction().remove(this).commit()
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 离线地图点击
|
||||
*/
|
||||
R.id.console_offline_map_icon_bg, R.id.console_offline_map_bg -> {
|
||||
activity?.let { a ->
|
||||
a.supportFragmentManager.beginTransaction().remove(this).commit()
|
||||
(a as MainActivity).onClickOfflineMapFragment()
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 个人中心点击
|
||||
*/
|
||||
R.id.console_personal_center_bg, R.id.console_personal_center_icon_bg -> {
|
||||
if (sceneFlag) {
|
||||
mFragment = PersonalCenterFragment {
|
||||
TransitionManager.go(aScene, aTransition)
|
||||
}
|
||||
sceneFlag = false
|
||||
TransitionManager.go(bScene, bTransition)
|
||||
} else {
|
||||
if (mFragment !is PersonalCenterFragment) {
|
||||
mFragment = PersonalCenterFragment {
|
||||
TransitionManager.go(aScene, aTransition)
|
||||
}
|
||||
childFragmentManager.beginTransaction().replace(fragmentId, mFragment!!)
|
||||
.commit()
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 图层设置
|
||||
*/
|
||||
R.id.console_layer_setting_bg, R.id.console_layer_setting_icon_bg -> {
|
||||
if (sceneFlag) {
|
||||
mFragment = LayerManagerFragment {
|
||||
TransitionManager.go(aScene, aTransition)
|
||||
}
|
||||
sceneFlag = false
|
||||
TransitionManager.go(bScene, bTransition)
|
||||
} else {
|
||||
if (mFragment !is LayerManagerFragment) {
|
||||
mFragment = LayerManagerFragment {
|
||||
TransitionManager.go(aScene, aTransition)
|
||||
}
|
||||
childFragmentManager.beginTransaction().replace(fragmentId, mFragment!!)
|
||||
.commit()
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 测评结果列表
|
||||
*/
|
||||
R.id.console_evaluation_icon_bg, R.id.console_evaluation_bg -> {
|
||||
activity?.let { a ->
|
||||
a.supportFragmentManager.beginTransaction().remove(this).commit()
|
||||
(a as MainActivity).onClickResFragment()
|
||||
}
|
||||
}
|
||||
R.id.console_task_icon_bg, R.id.console_task_bg -> {
|
||||
activity?.let { a ->
|
||||
a.supportFragmentManager.beginTransaction().remove(this).commit()
|
||||
(a as MainActivity).onClickTaskFragment()
|
||||
}
|
||||
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -93,29 +93,26 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
|
||||
}
|
||||
|
||||
|
||||
binding.evaluationVoice.setOnTouchListener(object : View.OnTouchListener {
|
||||
@RequiresApi(Build.VERSION_CODES.Q)
|
||||
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
|
||||
Log.e("qj", event?.action.toString())
|
||||
when (event?.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
voiceOnTouchStart()//Do Something
|
||||
Log.e("qj", "voiceOnTouchStart")
|
||||
}
|
||||
|
||||
MotionEvent.ACTION_UP -> {
|
||||
voiceOnTouchStop()//Do Something
|
||||
Log.e("qj", "ACTION_UP")
|
||||
}
|
||||
|
||||
MotionEvent.ACTION_CANCEL -> {
|
||||
voiceOnTouchStop()//Do Something
|
||||
Log.e("qj", "ACTION_CANCEL")
|
||||
}
|
||||
binding.evaluationVoice.setOnTouchListener { _, event ->
|
||||
Log.e("qj", event?.action.toString())
|
||||
when (event?.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
voiceOnTouchStart()//Do Something
|
||||
Log.e("qj", "voiceOnTouchStart")
|
||||
}
|
||||
|
||||
MotionEvent.ACTION_UP -> {
|
||||
voiceOnTouchStop()//Do Something
|
||||
Log.e("qj", "ACTION_UP")
|
||||
}
|
||||
|
||||
MotionEvent.ACTION_CANCEL -> {
|
||||
voiceOnTouchStop()//Do Something
|
||||
Log.e("qj", "ACTION_CANCEL")
|
||||
}
|
||||
return true
|
||||
}
|
||||
})
|
||||
true
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取元数据
|
||||
@ -308,15 +305,16 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
|
||||
}
|
||||
}
|
||||
|
||||
fun voiceOnTouchStart() {
|
||||
private fun voiceOnTouchStart() {
|
||||
viewModel.startSoundMetter(requireActivity(), binding.evaluationVoice)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.Q)
|
||||
fun voiceOnTouchStop() {
|
||||
private fun voiceOnTouchStop() {
|
||||
Log.e("qj", "voiceOnTouchStop====${Constant.IS_VIDEO_SPEED}")
|
||||
if (Constant.IS_VIDEO_SPEED) {
|
||||
viewModel.stopSoundMeter()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
viewModel.stopSoundMeter()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,22 +4,17 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import com.blankj.utilcode.util.SPStaticUtils
|
||||
import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.databinding.FragmentEmptyBinding
|
||||
import com.navinfo.omqs.databinding.FragmentLayerManagerBinding
|
||||
import com.navinfo.omqs.ui.fragment.BaseFragment
|
||||
import com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapCityListViewModel
|
||||
|
||||
class LayermanagerFragment : BaseFragment(){
|
||||
class LayerManagerFragment(private var backListener: (() -> Unit?)? = null) : BaseFragment() {
|
||||
private var _binding: FragmentLayerManagerBinding? = null
|
||||
|
||||
private val binding get() = _binding!!
|
||||
private val viewModel by viewModels<LayerManagerViewModel>()
|
||||
// private val viewModel by lazy { viewModels<EvaluationResultViewModel>().value}
|
||||
|
||||
// private val viewModel by lazy { viewModels<EvaluationResultViewModel>().value}
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
@ -30,12 +25,13 @@ class LayermanagerFragment : BaseFragment(){
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
val adapter = LayerManagerExpandableListAdapter(requireContext(), viewModel.getLayerConfigList())
|
||||
val adapter =
|
||||
LayerManagerExpandableListAdapter(requireContext(), viewModel.getLayerConfigList())
|
||||
binding.elvLayerManager.setAdapter(adapter)
|
||||
// 默认显示第一个父项下的子类
|
||||
binding.elvLayerManager.expandGroup(0)
|
||||
binding.elvLayerManager.setGroupIndicator(null)
|
||||
binding.elvLayerManager.setOnGroupClickListener { expandableListView, view, groupPosition, l ->
|
||||
binding.elvLayerManager.setOnGroupClickListener { expandableListView, _, groupPosition, _ ->
|
||||
if (expandableListView.isGroupExpanded(groupPosition)) {
|
||||
binding.elvLayerManager.collapseGroup(groupPosition)
|
||||
} else {
|
||||
@ -43,14 +39,19 @@ class LayermanagerFragment : BaseFragment(){
|
||||
}
|
||||
}
|
||||
|
||||
binding.imgBack.setOnClickListener {
|
||||
findNavController().navigateUp()
|
||||
binding.imgConfirm.setOnClickListener {
|
||||
viewModel.saveLayerConfigList(requireContext(), adapter.parentItems)
|
||||
}
|
||||
|
||||
binding.tvTitle.text = findNavController().currentDestination?.label
|
||||
binding.imgBack.setOnClickListener {
|
||||
backListener?.invoke()
|
||||
}
|
||||
|
||||
binding.tvTitle.text = "图层管理"//findNavController().currentDestination?.label
|
||||
|
||||
binding.imgConfirm.setOnClickListener { // 用户点击确认,重新设置当前的图层显隐控制
|
||||
viewModel.saveLayerConfigList(adapter.parentItems)
|
||||
viewModel.saveLayerConfigList(requireContext(), adapter.parentItems)
|
||||
backListener?.invoke()
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,20 @@
|
||||
package com.navinfo.omqs.ui.fragment.layermanager
|
||||
|
||||
import android.content.Context
|
||||
import android.widget.Toast
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.blankj.utilcode.util.FileIOUtils
|
||||
import com.blankj.utilcode.util.SPStaticUtils
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.bean.ImportConfig
|
||||
import com.navinfo.omqs.tools.LayerConfigUtils
|
||||
import com.navinfo.omqs.util.FlowEventBus
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class LayerManagerViewModel(): ViewModel() {
|
||||
class LayerManagerViewModel() : ViewModel() {
|
||||
private val gson = Gson()
|
||||
|
||||
fun getLayerConfigList(): List<ImportConfig> {
|
||||
@ -21,11 +22,15 @@ class LayerManagerViewModel(): ViewModel() {
|
||||
return LayerConfigUtils.getLayerConfigList()
|
||||
}
|
||||
|
||||
fun saveLayerConfigList(listData: List<ImportConfig>) {
|
||||
fun saveLayerConfigList(context: Context, listData: List<ImportConfig>) {
|
||||
SPStaticUtils.put(Constant.EVENT_LAYER_MANAGER_CHANGE, gson.toJson(listData))
|
||||
// 发送新的配置数据
|
||||
viewModelScope.launch {
|
||||
FlowEventBus.post(Constant.EVENT_LAYER_MANAGER_CHANGE, listData)
|
||||
withContext(Dispatchers.Main) {
|
||||
Toast.makeText(context, "设置成功", Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,8 @@ import com.navinfo.omqs.ui.fragment.BaseFragment
|
||||
/**
|
||||
* 离线地图总页面
|
||||
*/
|
||||
class OfflineMapFragment : BaseFragment() {
|
||||
class OfflineMapFragment(private var backListener: (() -> Unit?)? = null) :
|
||||
BaseFragment() {
|
||||
|
||||
private var _binding: FragmentOfflineMapBinding? = null
|
||||
|
||||
@ -48,7 +49,7 @@ class OfflineMapFragment : BaseFragment() {
|
||||
|
||||
//处理返回按钮
|
||||
binding.offlineMapBack.setOnClickListener {
|
||||
findNavController().popBackStack()
|
||||
backListener?.invoke()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,8 @@ import javax.inject.Inject
|
||||
* 个人中心
|
||||
*/
|
||||
@AndroidEntryPoint
|
||||
class PersonalCenterFragment : BaseFragment(), FSAFActivityCallbacks {
|
||||
class PersonalCenterFragment(private var backListener: (() -> Unit?)? = null) : BaseFragment(),
|
||||
FSAFActivityCallbacks {
|
||||
|
||||
private var _binding: FragmentPersonalCenterBinding? = null
|
||||
private val binding get() = _binding!!
|
||||
|
@ -16,7 +16,7 @@ import com.navinfo.omqs.ui.fragment.tasklist.QsRecordListAdapter
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@AndroidEntryPoint
|
||||
class QsRecordListFragment : BaseFragment(){
|
||||
class QsRecordListFragment(private var backListener: (() -> Unit?)? = null) : BaseFragment() {
|
||||
private var _binding: FragmentQsRecordListBinding? = null
|
||||
private val viewModel by viewModels<QsRecordListViewModel>()
|
||||
private val binding get() = _binding!!
|
||||
@ -44,7 +44,7 @@ class QsRecordListFragment : BaseFragment(){
|
||||
binding.qsRecyclerview.adapter = adapter
|
||||
viewModel.liveDataQSList.observe(viewLifecycleOwner) {
|
||||
adapter.refreshData(it)
|
||||
binding.tvTitleCount.text = "共"+adapter.data.size+"条"
|
||||
binding.tvTitleCount.text = "共" + adapter.data.size + "条"
|
||||
}
|
||||
val itemDecoration = DividerItemDecoration(context, DividerItemDecoration.VERTICAL)
|
||||
itemDecoration.setDrawable(resources.getDrawable(R.drawable.separator))
|
||||
@ -53,13 +53,13 @@ class QsRecordListFragment : BaseFragment(){
|
||||
// itemClick
|
||||
adapter.setOnKotlinItemClickListener(object : QsRecordListAdapter.IKotlinItemClickListener {
|
||||
override fun onItemClickListener(position: Int) {
|
||||
viewModel.onItemClickListener(activity as MainActivity,position)
|
||||
findNavController().popBackStack()
|
||||
viewModel.onItemClickListener(activity as MainActivity, position)
|
||||
backListener?.invoke()
|
||||
}
|
||||
})
|
||||
|
||||
binding.imgBack.setOnClickListener{
|
||||
findNavController().navigateUp()
|
||||
binding.imgBack.setOnClickListener {
|
||||
backListener?.invoke()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.EditText
|
||||
import android.widget.Toast
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
@ -40,7 +41,11 @@ class TaskFragment : BaseFragment() {
|
||||
private val adapter: TaskAdapter by lazy {
|
||||
TaskAdapter(object : TaskAdapterCallback {
|
||||
override fun itemOnClick(bean: HadLinkDvoBean) {
|
||||
viewModel.showCurrentLink(bean)
|
||||
if(bean!=null){
|
||||
viewModel.showCurrentLink(bean)
|
||||
}else{
|
||||
Toast.makeText(context, "数据错误,无法显示!", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
||||
override fun editOnclick(position: Int, bean: HadLinkDvoBean) {
|
||||
|
@ -5,6 +5,7 @@ import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Toast
|
||||
import androidx.lifecycle.Observer
|
||||
import com.navinfo.collect.library.data.entity.TaskBean
|
||||
import com.navinfo.omqs.R
|
||||
@ -35,18 +36,24 @@ class TaskListAdapter(
|
||||
val downloadBtnClick = View.OnClickListener() {
|
||||
if (it.tag != null) {
|
||||
val taskBean = data[it.tag as Int]
|
||||
when (taskBean.status) {
|
||||
FileDownloadStatus.NONE, FileDownloadStatus.UPDATE, FileDownloadStatus.PAUSE, FileDownloadStatus.IMPORT, FileDownloadStatus.ERROR -> {
|
||||
Log.e("jingo", "开始下载 ${taskBean.status}")
|
||||
downloadManager.start(taskBean.id)
|
||||
}
|
||||
FileDownloadStatus.LOADING, FileDownloadStatus.WAITING -> {
|
||||
Log.e("jingo", "暂停 ${taskBean.status}")
|
||||
downloadManager.pause(taskBean.id)
|
||||
}
|
||||
else -> {
|
||||
Log.e("jingo", "暂停 ${taskBean.status}")
|
||||
if (taskBean.hadLinkDvoList.isNotEmpty()) {
|
||||
when (taskBean.status) {
|
||||
FileDownloadStatus.NONE, FileDownloadStatus.UPDATE, FileDownloadStatus.PAUSE, FileDownloadStatus.IMPORT, FileDownloadStatus.ERROR -> {
|
||||
Log.e("jingo", "开始下载 ${taskBean.status}")
|
||||
downloadManager.start(taskBean.id)
|
||||
}
|
||||
|
||||
FileDownloadStatus.LOADING, FileDownloadStatus.WAITING -> {
|
||||
Log.e("jingo", "暂停 ${taskBean.status}")
|
||||
downloadManager.pause(taskBean.id)
|
||||
}
|
||||
|
||||
else -> {
|
||||
Log.e("jingo", "暂停 ${taskBean.status}")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(downloadManager.context, "数据错误,无Link信息,无法执行下载!", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -55,10 +62,14 @@ class TaskListAdapter(
|
||||
if (it.tag != null) {
|
||||
val taskBean = data[it.tag as Int]
|
||||
Log.e("jingo", "开始上传 ${taskBean.syncStatus}")
|
||||
when (taskBean.syncStatus) {
|
||||
FileUploadStatus.NONE, FileUploadStatus.ERROR, FileUploadStatus.WAITING -> {
|
||||
uploadManager.start(taskBean.id)
|
||||
if (taskBean.hadLinkDvoList.isNotEmpty()) {
|
||||
when (taskBean.syncStatus) {
|
||||
FileUploadStatus.NONE, FileUploadStatus.UPLOADING, FileUploadStatus.ERROR, FileUploadStatus.WAITING -> {
|
||||
uploadManager.start(taskBean.id)
|
||||
}
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(uploadManager.context, "数据错误,无Link信息,无法执行同步!", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -159,19 +170,23 @@ class TaskListAdapter(
|
||||
binding.taskUploadBtn.setProgress(0)
|
||||
binding.taskUploadBtn.setBackgroundColor(binding.root.resources.getColor(R.color.ripple_end_color))
|
||||
}
|
||||
|
||||
FileUploadStatus.ERROR -> {
|
||||
binding.taskUploadBtn.stopAnimator()
|
||||
binding.taskUploadBtn.setText("重新同步")
|
||||
binding.taskUploadBtn.setProgress(100)
|
||||
}
|
||||
|
||||
FileUploadStatus.NONE -> {
|
||||
binding.taskUploadBtn.setText("未上传")
|
||||
binding.taskUploadBtn.setProgress(0)
|
||||
}
|
||||
|
||||
FileUploadStatus.WAITING -> {
|
||||
binding.taskUploadBtn.setText("等待同步")
|
||||
binding.taskUploadBtn.setProgress(100)
|
||||
}
|
||||
|
||||
FileUploadStatus.UPLOADING -> {
|
||||
binding.taskUploadBtn.setText("上传中")
|
||||
binding.taskUploadBtn.setProgress(100)
|
||||
@ -202,26 +217,31 @@ class TaskListAdapter(
|
||||
View.INVISIBLE
|
||||
binding.taskDownloadBtn.setText("下载")
|
||||
}
|
||||
|
||||
FileDownloadStatus.WAITING -> {
|
||||
if (binding.taskProgressText.visibility != View.VISIBLE) binding.taskProgressText.visibility =
|
||||
View.VISIBLE
|
||||
binding.taskDownloadBtn.setText("等待中")
|
||||
}
|
||||
|
||||
FileDownloadStatus.LOADING -> {
|
||||
if (binding.taskProgressText.visibility != View.VISIBLE) binding.taskProgressText.visibility =
|
||||
View.VISIBLE
|
||||
binding.taskDownloadBtn.setText("暂停")
|
||||
}
|
||||
|
||||
FileDownloadStatus.PAUSE -> {
|
||||
if (binding.taskProgressText.visibility != View.VISIBLE) binding.taskProgressText.visibility =
|
||||
View.VISIBLE
|
||||
binding.taskDownloadBtn.setText("继续")
|
||||
}
|
||||
|
||||
FileDownloadStatus.ERROR -> {
|
||||
if (binding.taskProgressText.visibility != View.VISIBLE) binding.taskProgressText.visibility =
|
||||
View.VISIBLE
|
||||
binding.taskDownloadBtn.setText("重试")
|
||||
}
|
||||
|
||||
FileDownloadStatus.DONE -> {
|
||||
if (binding.taskProgressText.visibility == View.VISIBLE) binding.taskProgressText.visibility =
|
||||
View.INVISIBLE
|
||||
@ -229,11 +249,13 @@ class TaskListAdapter(
|
||||
binding.taskDownloadBtn.visibility = View.INVISIBLE
|
||||
binding.taskUploadBtn.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
FileDownloadStatus.UPDATE -> {
|
||||
if (binding.taskProgressText.visibility == View.VISIBLE) binding.taskProgressText.visibility =
|
||||
View.INVISIBLE
|
||||
binding.taskDownloadBtn.setText("更新")
|
||||
}
|
||||
|
||||
FileDownloadStatus.IMPORTING -> {
|
||||
if (binding.taskProgressText.visibility != View.VISIBLE) binding.taskProgressText.visibility =
|
||||
View.VISIBLE
|
||||
@ -251,7 +273,12 @@ class TaskListAdapter(
|
||||
} else {
|
||||
binding.taskProgressText.text = "0%"
|
||||
}
|
||||
val errMsg = taskBean.errMsg
|
||||
if (errMsg != null && errMsg.isNotEmpty()) {
|
||||
Toast.makeText(binding.taskProgressText.context, errMsg, Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
|
||||
FileDownloadStatus.IMPORT -> {
|
||||
if (binding.taskProgressText.visibility != View.VISIBLE) binding.taskProgressText.visibility =
|
||||
View.INVISIBLE
|
||||
|
@ -6,8 +6,7 @@ import android.text.TextWatcher
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import android.widget.Toast
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.navinfo.omqs.databinding.FragmentTaskListBinding
|
||||
import com.navinfo.omqs.http.taskdownload.TaskDownloadManager
|
||||
@ -35,7 +34,10 @@ class TaskListFragment : BaseFragment() {
|
||||
private val adapter: TaskListAdapter by lazy {
|
||||
TaskListAdapter(
|
||||
downloadManager, uploadManager
|
||||
) { position, taskBean ->
|
||||
) { _, taskBean ->
|
||||
if(taskBean.hadLinkDvoList.isEmpty()){
|
||||
Toast.makeText(context, "数据错误,无Link数据!", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
viewModel.setSelectTaskBean(taskBean)
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import dagger.hilt.android.AndroidEntryPoint
|
||||
* 评测任务viewpager管理页面
|
||||
*/
|
||||
@AndroidEntryPoint
|
||||
class TaskManagerFragment : BaseFragment() {
|
||||
class TaskManagerFragment(private var backListener: ((TaskManagerFragment) -> Unit?)? = null) : BaseFragment() {
|
||||
private var _binding: FragmentTaskManagerBinding? = null
|
||||
|
||||
private val binding get() = _binding!!
|
||||
@ -53,7 +53,7 @@ class TaskManagerFragment : BaseFragment() {
|
||||
}.attach()
|
||||
viewModel.getTaskList(requireContext())
|
||||
binding.taskBack.setOnClickListener {
|
||||
findNavController().navigateUp()
|
||||
backListener?.invoke(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import io.realm.Realm
|
||||
import kotlinx.coroutines.*
|
||||
import javax.inject.Inject
|
||||
import kotlin.math.max
|
||||
|
||||
|
||||
@HiltViewModel
|
||||
@ -143,30 +144,37 @@ class TaskViewModel @Inject constructor(
|
||||
liveDataTaskLinks.value = taskBean.hadLinkDvoList
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
mapController.lineHandler.omdbTaskLinkLayer.removeAll()
|
||||
mapController.lineHandler.omdbTaskLinkLayer.addLineList(taskBean.hadLinkDvoList)
|
||||
var maxX = 0.0
|
||||
var maxY = 0.0
|
||||
var minX = 0.0
|
||||
var minY = 0.0
|
||||
for (item in taskBean.hadLinkDvoList) {
|
||||
val geometry = GeometryTools.createGeometry(item.geometry)
|
||||
val envelope = geometry.envelopeInternal
|
||||
if (envelope.maxX > maxX) {
|
||||
maxX = envelope.maxX
|
||||
if(taskBean.hadLinkDvoList.isNotEmpty()){
|
||||
mapController.lineHandler.omdbTaskLinkLayer.addLineList(taskBean.hadLinkDvoList)
|
||||
var maxX = 0.0
|
||||
var maxY = 0.0
|
||||
var minX = 0.0
|
||||
var minY = 0.0
|
||||
for (item in taskBean.hadLinkDvoList) {
|
||||
val geometry = GeometryTools.createGeometry(item.geometry)
|
||||
if(geometry!=null){
|
||||
val envelope = geometry.envelopeInternal
|
||||
if (envelope.maxX > maxX) {
|
||||
maxX = envelope.maxX
|
||||
}
|
||||
if (envelope.maxY > maxY) {
|
||||
maxY = envelope.maxY
|
||||
}
|
||||
if (envelope.minX < minX || minX == 0.0) {
|
||||
minX = envelope.minX
|
||||
}
|
||||
if (envelope.minY < minY || minY == 0.0) {
|
||||
minY = envelope.minY
|
||||
}
|
||||
}
|
||||
}
|
||||
if (envelope.maxY > maxY) {
|
||||
maxY = envelope.maxY
|
||||
}
|
||||
if (envelope.minX < minX || minX == 0.0) {
|
||||
minX = envelope.minX
|
||||
}
|
||||
if (envelope.minY < minY || minY == 0.0) {
|
||||
minY = envelope.minY
|
||||
//增加异常数据判断
|
||||
if(maxX!=0.0&&maxY!=0.0&&minX!=0.0&&minY!=0.0){
|
||||
mapController.animationHandler.animateToBox(
|
||||
maxX = maxX, maxY = maxY, minX = minX, minY = minY
|
||||
)
|
||||
}
|
||||
}
|
||||
mapController.animationHandler.animateToBox(
|
||||
maxX = maxX, maxY = maxY, minX = minX, minY = minY
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,13 +185,15 @@ class TaskViewModel @Inject constructor(
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
mapController.lineHandler.omdbTaskLinkLayer.showSelectLine(link)
|
||||
val geometry = GeometryTools.createGeometry(link.geometry)
|
||||
val envelope = geometry.envelopeInternal
|
||||
mapController.animationHandler.animateToBox(
|
||||
maxX = envelope.maxX,
|
||||
maxY = envelope.maxY,
|
||||
minX = envelope.minX,
|
||||
minY = envelope.minY
|
||||
)
|
||||
if(geometry!=null){
|
||||
val envelope = geometry.envelopeInternal
|
||||
mapController.animationHandler.animateToBox(
|
||||
maxX = envelope.maxX,
|
||||
maxY = envelope.maxY,
|
||||
minX = envelope.minX,
|
||||
minY = envelope.minY
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
10
app/src/main/res/drawable-v24/baseline_minimize_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="50dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/blue"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/blue"
|
||||
android:pathData="M6,19h12v2H6z" />
|
||||
</vector>
|
BIN
app/src/main/res/drawable-xxhdpi/console_bg.jpg
Normal file
After Width: | Height: | Size: 872 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_console_camera.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_console_evaluation.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_console_layer_setting.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_console_location.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_console_map.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_console_offline_map.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_console_route.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_console_task.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_console_track.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_main_bottom_home.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 5.4 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_main_bottom_res.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_main_bottom_route.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_main_bottom_task.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
15
app/src/main/res/drawable/shape_bottom_sheet.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 完整的矩形 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/blue" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 部分矩形,只有一侧有颜色 -->
|
||||
<item android:top="2dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
@ -3,7 +3,6 @@
|
||||
<corners
|
||||
android:bottomLeftRadius="8dp"
|
||||
android:bottomRightRadius="8dp"
|
||||
android:radius="20dp"
|
||||
android:topLeftRadius="8dp"
|
||||
android:topRightRadius="0dp" />
|
||||
<gradient
|
||||
|
13
app/src/main/res/drawable/shape_console_search_bg.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?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:topLeftRadius="8dp"
|
||||
android:topRightRadius="8dp" />
|
||||
<gradient
|
||||
android:angle="315"
|
||||
android:endColor="#C228D7"
|
||||
android:startColor="#FF9A27"
|
||||
android:type="linear" />
|
||||
</shape>
|
14
app/src/main/res/drawable/shape_console_track_bg.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?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:topLeftRadius="8dp"
|
||||
android:topRightRadius="8dp" />
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:centerColor="#8E6CFF"
|
||||
android:endColor="#3696FF"
|
||||
android:startColor="#AC40FF"
|
||||
android:type="linear" />
|
||||
</shape>
|
7
app/src/main/res/drawable/shape_oval_black_bg.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<solid android:color="@color/black" />
|
||||
|
||||
</shape>
|
7
app/src/main/res/drawable/shape_oval_gray_bg.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<solid android:color="@color/gray" />
|
||||
|
||||
</shape>
|
7
app/src/main/res/drawable/shape_oval_gray_hex_bg.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<solid android:color="#90808080" />
|
||||
|
||||
</shape>
|
13
app/src/main/res/drawable/shape_rect_black_8dp_bg.xml
Normal 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">
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="4dp"
|
||||
android:bottomRightRadius="4dp"
|
||||
android:topLeftRadius="4dp"
|
||||
android:topRightRadius="4dp" />
|
||||
|
||||
<solid android:color="#C42E303B" />
|
||||
|
||||
</shape>
|
@ -17,265 +17,397 @@
|
||||
type="com.navinfo.omqs.ui.activity.map.MainViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/main_activity_drawer"
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.activity.map.MainActivity">
|
||||
<com.navinfo.collect.library.map.NIMapView
|
||||
android:id="@+id/main_activity_map"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.navinfo.collect.library.map.NIMapView
|
||||
android:id="@+id/main_activity_map"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_camera2"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@null"
|
||||
android:onClick="@{()->mainActivity.openCamera()}"
|
||||
android:src="@drawable/baseline_person_24"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/main_activity_top_sign_recyclerview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_camera2"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@null"
|
||||
android:onClick="@{()->mainActivity.openCamera()}"
|
||||
android:src="@drawable/baseline_person_24"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/main_activity_sign_recyclerview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:maxHeight="350dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/main_activity_top_sign_recyclerview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<androidx.constraintlayout.helper.widget.Flow
|
||||
android:id="@+id/main_activity_flow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/top_right_drawer_btns_mr"
|
||||
app:constraint_referenced_ids="main_activity_serach,main_activity_2d_3d,main_activity_camera,main_activity_trace,main_activity_calc_disance,main_activity_menu"
|
||||
app:flow_horizontalGap="6dp"
|
||||
app:flow_wrapMode="aligned"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_person_center"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@null"
|
||||
android:onClick="@{()->mainActivity.openMenu()}"
|
||||
android:src="@drawable/baseline_person_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/main_activity_menu_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
app:constraint_referenced_ids="main_activity_serach,main_activity_2d_3d,main_activity_camera,main_activity_trace,main_activity_calc_disance" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/main_activity_sign_recyclerview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:maxHeight="350dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/main_activity_person_center"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_activity_person_center" />
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_serach"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.onClickSearch()}"
|
||||
android:src="@drawable/icon_serach" />
|
||||
|
||||
<androidx.constraintlayout.helper.widget.Flow
|
||||
android:id="@+id/main_activity_flow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/top_right_drawer_btns_mr"
|
||||
app:constraint_referenced_ids="main_activity_serach,main_activity_2d_3d,main_activity_camera,main_activity_trace,main_activity_calc_disance,main_activity_menu"
|
||||
app:flow_horizontalGap="6dp"
|
||||
app:flow_wrapMode="aligned"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_2d_3d"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.onClick2DOr3D()}"
|
||||
android:src="@drawable/icon_2d_3d" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/main_activity_menu_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
app:constraint_referenced_ids="main_activity_serach,main_activity_2d_3d,main_activity_camera,main_activity_trace,main_activity_calc_disance" />
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_camera"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.openCamera()}"
|
||||
android:src="@drawable/icon_page_video_a1" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_serach"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.onClickSerach()}"
|
||||
android:src="@drawable/icon_serach" />
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_trace"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.onClickTrace()}"
|
||||
android:src="@drawable/icon_trace" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_2d_3d"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.onClick2DOr3D()}"
|
||||
android:src="@drawable/icon_2d_3d" />
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_calc_disance"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.onClickCalcDisance()}"
|
||||
android:src="@drawable/icon_calc_disance" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_camera"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.openCamera()}"
|
||||
android:src="@drawable/icon_page_video_a1" />
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_menu"
|
||||
android:layout_width="@dimen/top_right_drawer_wh"
|
||||
android:layout_height="@dimen/top_right_drawer_wh"
|
||||
android:background="@drawable/chk_icon_menu_open_close_xml"
|
||||
android:elevation="2dp"
|
||||
android:onClick="@{()->mainActivity.onClickMenu()}" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_trace"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.onClickTrace()}"
|
||||
android:src="@drawable/icon_trace" />
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="end"
|
||||
app:constraint_referenced_ids="main_activity_fragment_switch" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_calc_disance"
|
||||
style="@style/top_right_drawer_btns_style"
|
||||
android:onClick="@{()->mainActivity.onClickCalcDisance()}"
|
||||
android:src="@drawable/icon_calc_disance" />
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_fragment_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/selector_fragment_switch"
|
||||
android:elevation="2dp"
|
||||
android:onClick="@{()->mainActivity.onSwitchFragment()}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/main_activity_flow"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
|
||||
app:layout_constraintTop_toTopOf="@id/main_activity_flow" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_menu"
|
||||
android:layout_width="@dimen/top_right_drawer_wh"
|
||||
android:layout_height="@dimen/top_right_drawer_wh"
|
||||
android:background="@drawable/chk_icon_menu_open_close_xml"
|
||||
android:elevation="2dp"
|
||||
android:onClick="@{()->mainActivity.onClickMenu()}" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="end"
|
||||
app:constraint_referenced_ids="main_activity_fragment_switch" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_fragment_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/selector_fragment_switch"
|
||||
android:elevation="2dp"
|
||||
android:onClick="@{()->mainActivity.onSwitchFragment()}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/main_activity_flow"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
|
||||
app:layout_constraintTop_toTopOf="@id/main_activity_flow" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/main_activity_right_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:elevation="3dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navGraph="@navigation/right_fragment_nav_graph" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_activity_geometry"
|
||||
android:layout_width="@dimen/main_activity_geometry_w"
|
||||
android:layout_height="@dimen/main_activity_geometry_h"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/shape_rect_white_8dp_bg"
|
||||
android:drawableLeft="@drawable/icon_main_geometry"
|
||||
android:elevation="2dp"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->mainActivity.jumpPosition()}"
|
||||
android:paddingLeft="9dp"
|
||||
android:text="经纬度:116.99388424,38.8403844"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_activity_middle_fragment" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_zoom_out"
|
||||
android:layout_width="@dimen/zoom_btns_w"
|
||||
android:layout_height="@dimen/zoom_btns_h"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="@drawable/selector_zoom_out_bg"
|
||||
android:elevation="2dp"
|
||||
android:onClick="@{(view)->mainActivity.zoomOutOnclick(view)}"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/icon_zoom_out"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_geometry"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_geometry" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_zoom_in"
|
||||
android:layout_width="@dimen/zoom_btns_w"
|
||||
android:layout_height="@dimen/zoom_btns_h"
|
||||
android:background="@drawable/selector_zoom_in_bg"
|
||||
android:elevation="2dp"
|
||||
android:onClick="@{(view)->mainActivity.zoomInOnclick(view)}"
|
||||
android:src="@drawable/icon_zoom_in"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_out"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_out" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_location"
|
||||
style="@style/zoom_btns_style"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:onClick="@{()->viewModel.onClickLocationButton()}"
|
||||
android:src="@drawable/icon_location"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_in"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_in" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_add_new"
|
||||
style="@style/zoom_btns_style"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:onClick="@{()->mainActivity.voiceOnclick()}"
|
||||
android:src="@drawable/icon_add_data"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_location"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_location" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_voice"
|
||||
style="@style/zoom_btns_style"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:onClick="@{()->mainActivity.voiceOnclick()}"
|
||||
android:src="@drawable/icon_add_voice"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_add_new"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_add_new" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_select_line"
|
||||
style="@style/zoom_btns_style"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="@drawable/selector_road_line_bg"
|
||||
android:onClick="@{()->mainActivity.selectLineOnclick()}"
|
||||
android:src="@drawable/selector_road_line_src"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_voice"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_voice" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/main_activity_right_visibility_buttons_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="main_activity_select_line,main_activity_voice,main_activity_add_new" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/main_activity_middle_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="-1dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_activity_flow"
|
||||
app:navGraph="@navigation/middle_fragment_nav_graph" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/main_activity_fragment_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="main_activity_right_fragment,main_activity_middle_fragment" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/main_activity_left_fragment"
|
||||
android:layout_width="@dimen/right_fragment_w"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_left_fragment_bg"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/main_activity_sign_recyclerview" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/main_activity_drawer_fragment"
|
||||
android:id="@+id/main_activity_right_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="323dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginTop="30dp"
|
||||
app:navGraph="@navigation/left_drawer_nav_graph" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:elevation="3dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navGraph="@navigation/right_fragment_nav_graph" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_activity_geometry"
|
||||
android:layout_width="@dimen/main_activity_geometry_w"
|
||||
android:layout_height="@dimen/main_activity_geometry_h"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/shape_rect_white_8dp_bg"
|
||||
android:drawableLeft="@drawable/icon_main_geometry"
|
||||
android:elevation="2dp"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->mainActivity.jumpPosition()}"
|
||||
android:paddingLeft="9dp"
|
||||
android:text="经纬度:116.99388424,38.8403844"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_activity_middle_fragment" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_zoom_out"
|
||||
android:layout_width="@dimen/zoom_btns_w"
|
||||
android:layout_height="@dimen/zoom_btns_h"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="@drawable/selector_zoom_out_bg"
|
||||
android:elevation="2dp"
|
||||
android:onClick="@{(view)->mainActivity.zoomOutOnclick(view)}"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/icon_zoom_out"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_geometry"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_geometry" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_zoom_in"
|
||||
android:layout_width="@dimen/zoom_btns_w"
|
||||
android:layout_height="@dimen/zoom_btns_h"
|
||||
android:background="@drawable/selector_zoom_in_bg"
|
||||
android:elevation="2dp"
|
||||
android:onClick="@{(view)->mainActivity.zoomInOnclick(view)}"
|
||||
android:src="@drawable/icon_zoom_in"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_out"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_out" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_location"
|
||||
style="@style/zoom_btns_style"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:onClick="@{()->viewModel.onClickLocationButton()}"
|
||||
android:src="@drawable/icon_location"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_in"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_in" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_add_new"
|
||||
style="@style/zoom_btns_style"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:onClick="@{()->mainActivity.voiceOnclick()}"
|
||||
android:src="@drawable/icon_add_data"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_location"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_location" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_voice"
|
||||
style="@style/zoom_btns_style"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:onClick="@{()->mainActivity.voiceOnclick()}"
|
||||
android:src="@drawable/icon_add_voice"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_add_new"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_add_new" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_select_line"
|
||||
style="@style/zoom_btns_style"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="@drawable/selector_road_line_bg"
|
||||
android:onClick="@{()->mainActivity.selectLineOnclick()}"
|
||||
android:src="@drawable/selector_road_line_src"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_voice"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_voice" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/main_activity_right_visibility_buttons_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="main_activity_select_line,main_activity_voice,main_activity_add_new" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/main_activity_middle_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="-1dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_activity_flow"
|
||||
app:navGraph="@navigation/middle_fragment_nav_graph" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/main_activity_fragment_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="main_activity_right_fragment,main_activity_middle_fragment" />
|
||||
|
||||
<View
|
||||
android:id="@+id/main_activity_bottom_sheet"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/baseline_minimize_24"
|
||||
android:onClick="@{()->mainActivity.onSwitchSheet()}"
|
||||
android:paddingBottom="10dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/main_activity_bottom_sheet_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/shape_bottom_sheet"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/main_bottom_task"
|
||||
style="@style/main_activity_bottom_sheet_icon"
|
||||
android:background="@drawable/icon_main_bottom_task"
|
||||
android:onClick="@{()->mainActivity.onClickTaskFragment()}"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_bottom_task_text"
|
||||
app:layout_constraintLeft_toLeftOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_bottom_res"
|
||||
app:layout_constraintTop_toTopOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_bottom_task_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{()->mainActivity.onClickTaskFragment()}"
|
||||
android:text="测评任务"
|
||||
android:textColor="@color/blue"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/main_bottom_task"
|
||||
app:layout_constraintRight_toRightOf="@id/main_bottom_task"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_bottom_task" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/main_bottom_res"
|
||||
style="@style/main_activity_bottom_sheet_icon"
|
||||
android:background="@drawable/icon_main_bottom_res"
|
||||
android:onClick="@{()->mainActivity.onClickResFragment()}"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_bottom_res_text"
|
||||
app:layout_constraintLeft_toRightOf="@id/main_bottom_task"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_bottom_home"
|
||||
app:layout_constraintTop_toTopOf="@id/main_bottom_task"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_bottom_res_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{()->mainActivity.onClickResFragment()}"
|
||||
android:text="测评结果"
|
||||
android:textColor="@color/blue"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/main_bottom_res"
|
||||
app:layout_constraintRight_toRightOf="@id/main_bottom_res"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_bottom_res" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/main_bottom_home"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:background="@drawable/icon_main_bottom_home"
|
||||
android:onClick="@{()->mainActivity.openMenu()}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/main_bottom_res"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_bottom_offline_map"
|
||||
app:layout_constraintTop_toTopOf="@id/main_activity_bottom_sheet_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/main_bottom_offline_map"
|
||||
style="@style/main_activity_bottom_sheet_icon"
|
||||
android:onClick="@{()->mainActivity.onClickOfflineMapFragment()}"
|
||||
android:background="@drawable/icon_main_bottom_offline_map"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_bottom_offline_map_text"
|
||||
app:layout_constraintLeft_toRightOf="@id/main_bottom_home"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_bottom_route"
|
||||
app:layout_constraintTop_toTopOf="@id/main_bottom_task"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_bottom_offline_map_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="离线地图"
|
||||
android:textColor="@color/blue"
|
||||
android:textSize="10sp"
|
||||
android:onClick="@{()->mainActivity.onClickOfflineMapFragment()}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/main_bottom_offline_map"
|
||||
app:layout_constraintRight_toRightOf="@id/main_bottom_offline_map"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_bottom_offline_map" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/main_bottom_route"
|
||||
style="@style/main_activity_bottom_sheet_icon"
|
||||
android:background="@drawable/icon_main_bottom_route"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_bottom_route_text"
|
||||
app:layout_constraintLeft_toRightOf="@id/main_bottom_offline_map"
|
||||
app:layout_constraintRight_toRightOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/main_bottom_task"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_bottom_route_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="路径规划"
|
||||
android:textColor="@color/blue"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/main_activity_bottom_sheet_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/main_bottom_route"
|
||||
app:layout_constraintRight_toRightOf="@id/main_bottom_route"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_bottom_route" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/main_activity_bottom_sheet_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="
|
||||
main_bottom_route_text,
|
||||
main_bottom_offline_map_text,
|
||||
main_bottom_res_text,
|
||||
main_bottom_task_text,main_bottom_route,
|
||||
main_bottom_offline_map,
|
||||
main_bottom_res,
|
||||
main_activity_bottom_sheet_bg,
|
||||
main_bottom_task,main_bottom_home" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/console_fragment_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:elevation="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
</layout>
|
@ -27,7 +27,7 @@
|
||||
android:gravity="center"
|
||||
android:text="80"
|
||||
android:textColor="#2F2F2F"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sign_bottom_text"
|
||||
@ -65,9 +65,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sign_main_fast_error"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginLeft="172dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/icon_evaluation"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -16,7 +16,7 @@
|
||||
android:paddingBottom="5dp"
|
||||
android:text="名称"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_sign_text"
|
||||
|
468
app/src/main/res/layout/console_off.xml
Normal file
@ -0,0 +1,468 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/console_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/console_bg"
|
||||
tools:context=".ui.fragment.console.ConsoleFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/console_left_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.33" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/console_right_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.66" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/console_horizontal_top_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.18" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/console_fragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/console_left_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_layer_setting_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintVertical_chainStyle="spread_inside"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_offline_map_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_left_guideline"
|
||||
app:layout_constraintRight_toLeftOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_horizontal_top_guideline" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="图层设置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_layer_setting_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_layer_setting_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_layer_setting"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_layer_setting_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_offline_map_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_task_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_layer_setting_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="离线地图"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_offline_map_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_offline_map_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_offline_map_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_offline_map_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_offline_map"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_offline_map_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_offline_map_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_offline_map_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_offline_map_icon_bg" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_camera_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintRight_toLeftOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_layer_setting_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="外接相机"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_camera_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_camera_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_camera"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_camera_icon_bg" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_personal_center_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintRight_toLeftOf="@id/console_right_guideline"
|
||||
app:layout_constraintTop_toTopOf="@id/console_layer_setting_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="个人中心"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_personal_center_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_personal_center_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_personal_center"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_personal_center_icon_bg" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_route_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_offline_map_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_offline_map_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="路径规划"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_route_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_route_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_route_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_route_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_route"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_route_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_route_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_route_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_route_icon_bg" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_location_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_offline_map_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_offline_map_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="定位设备"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_location_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_location_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_location_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_location_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_location"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_location_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_location_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_location_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_location_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_task_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
android:layout_marginBottom="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_layer_setting_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_offline_map_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="测评任务"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_task_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_task_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_task_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_task_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_task"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_task_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_task_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_evaluation_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_camera_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="测评结果"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_evaluation_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_evaluation_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_evaluation_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_evaluation_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_evaluation"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_evaluation_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_evaluation_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_evaluation_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_evaluation_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_track_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_personal_center_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="轨迹回放"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_track_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_track_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_track_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_track_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_track"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_track_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_track_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_track_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_track_icon_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_task_count_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_evaluation_count_bg"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_right_guideline"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/console_layer_setting_icon_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_task_count_icon"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@drawable/shape_oval_gray_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_count_text_title"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_task_count_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_count_text_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_task_count_text_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:text="当前测评任务"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_task_count_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_count_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_task_count_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:text="共 387 条"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_count_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_task_count_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_evaluation_count_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_search_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_task_count_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_task_count_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_task_count_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_evaluation_count_icon"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@drawable/shape_oval_gray_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_evaluation_count_text_title"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_evaluation_count_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_evaluation_count_text_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_evaluation_count_text_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:text="测评结果"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_evaluation_count_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/console_evaluation_count_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_evaluation_count_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:text="共 387 条"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_evaluation_count_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_evaluation_count_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_search_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@drawable/shape_console_search_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_task_count_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_task_count_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_evaluation_count_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_map_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_map_icon_text"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_search_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_search_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_search_bg"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_map_icon_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="地图"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_search_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_map_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_map_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_map_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_map_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_map"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_map_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_map_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_map_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_map_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_search_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_search_icon_text"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_search_bg"
|
||||
app:layout_constraintRight_toLeftOf="@id/console_map_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_search_bg"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_search_icon_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_search_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_search_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_search_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_search_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_search_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_layer_setting"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_search_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_search_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_search_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_search_icon_bg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
496
app/src/main/res/layout/console_on.xml
Normal file
@ -0,0 +1,496 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/console_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.fragment.console.ConsoleFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/console_left_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.33" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/console_right_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.66" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/console_horizontal_center_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.51" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/console_horizontal_top_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.18" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="快捷控制"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_horizontal_top_guideline"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_map_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_map_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_horizontal_center_guideline"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/console_left_guideline"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_horizontal_top_guideline"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
<View
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/shape_oval_gray_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_map_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_map_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_map_title_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="地图"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="31sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_map_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_map_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_map_bg"
|
||||
app:layout_constraintVertical_bias="0.40" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="The map home page"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_map_title_1"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_map_title_1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_on_map_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_map_bg"
|
||||
app:layout_constraintHorizontal_bias="0.85"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_map_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_map_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_map_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_map_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_map"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_on_map_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_on_map_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_on_map_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_on_map_icon_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_task_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_offline_map_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_map_bg"
|
||||
app:layout_constraintRight_toLeftOf="@id/console_evaluation_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_horizontal_center_guideline" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_task_icon"
|
||||
style="@style/console_on_left_bottom_icon"
|
||||
android:src="@drawable/icon_console_task"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_task_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_bg" />
|
||||
|
||||
<TextView
|
||||
style="@style/console_on_left_bottom_text"
|
||||
android:text="测评任务"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_task_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_evaluation_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_bg"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_task_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_map_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_evaluation_icon"
|
||||
style="@style/console_on_left_bottom_icon"
|
||||
android:src="@drawable/icon_console_evaluation"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_evaluation_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_evaluation_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_evaluation_bg" />
|
||||
|
||||
<TextView
|
||||
style="@style/console_on_left_bottom_text"
|
||||
android:text="测评结果"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_evaluation_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_evaluation_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_evaluation_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_offline_map_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_layer_setting_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_task_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_task_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_task_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_offline_map_icon"
|
||||
style="@style/console_on_left_bottom_icon"
|
||||
android:src="@drawable/icon_console_offline_map"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_offline_map_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_offline_map_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_offline_map_bg" />
|
||||
|
||||
<TextView
|
||||
style="@style/console_on_left_bottom_text"
|
||||
android:text="离线地图"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_offline_map_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_offline_map_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_offline_map_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_route_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_offline_map_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_evaluation_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_evaluation_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_offline_map_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_route_icon"
|
||||
style="@style/console_on_left_bottom_icon"
|
||||
android:src="@drawable/icon_console_route"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_route_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_route_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_route_bg" />
|
||||
|
||||
<TextView
|
||||
style="@style/console_on_left_bottom_text"
|
||||
android:text="路径规划"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_route_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_route_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_route_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_layer_setting_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_offline_map_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_offline_map_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_offline_map_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_layer_setting_icon"
|
||||
style="@style/console_on_left_bottom_icon"
|
||||
android:src="@drawable/icon_console_layer_setting"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_layer_setting_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_layer_setting_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_layer_setting_bg" />
|
||||
|
||||
<TextView
|
||||
style="@style/console_on_left_bottom_text"
|
||||
android:text="图层设置"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_layer_setting_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_layer_setting_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_layer_setting_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_personal_center_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_layer_setting_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_route_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_route_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_layer_setting_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_personal_center_icon"
|
||||
style="@style/console_on_left_bottom_icon"
|
||||
android:src="@drawable/icon_console_personal_center"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_personal_center_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_personal_center_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_personal_center_bg" />
|
||||
|
||||
<TextView
|
||||
style="@style/console_on_left_bottom_text"
|
||||
android:text="个人中心"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_personal_center_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_personal_center_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_personal_center_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="消息中心"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_horizontal_top_guideline"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_task_count_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_task_count_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_evaluation_count_bg"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_left_guideline"
|
||||
app:layout_constraintRight_toLeftOf="@id/console_right_guideline"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_horizontal_top_guideline" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_task_count_icon"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@drawable/shape_oval_gray_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_count_text_title"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_task_count_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_count_text_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_task_count_text_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:text="当前测评任务"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_task_count_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/console_task_count_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_task_count_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:text="共 387 条"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_task_count_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_task_count_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_evaluation_count_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@drawable/shape_rect_black_8dp_bg"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_horizontal_center_guideline"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_left_guideline"
|
||||
app:layout_constraintRight_toRightOf="@id/console_task_count_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_task_count_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_evaluation_count_icon"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@drawable/shape_oval_gray_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_evaluation_count_text_title"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_evaluation_count_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_evaluation_count_text_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_evaluation_count_text_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:text="测评结果"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_evaluation_count_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/console_evaluation_count_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_evaluation_count_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:text="共 387 条"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_evaluation_count_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_evaluation_count_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_search_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/shape_console_search_bg"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_placeholder"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_right_guideline"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_horizontal_top_guideline" />
|
||||
|
||||
<androidx.constraintlayout.widget.Placeholder
|
||||
android:id="@+id/console_placeholder"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/console_track_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_search_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_search_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_search_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_on_camera_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_placeholder"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_placeholder"
|
||||
app:layout_constraintRight_toLeftOf="@id/console_on_location_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_camera_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_camera"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_on_camera_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_on_camera_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_on_camera_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_on_camera_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="外接相机"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_on_camera_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_on_camera_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_on_camera_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_on_location_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_on_camera_icon_bg"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_on_camera_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_placeholder"
|
||||
app:layout_constraintTop_toTopOf="@id/console_on_camera_icon_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_location_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/icon_console_location"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_on_location_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_on_location_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_on_location_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_on_location_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="定位设备"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_on_location_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_on_location_icon_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_on_location_icon_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/console_track_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@drawable/shape_console_track_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_search_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_search_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/console_placeholder" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_on_track_icon_bg"
|
||||
style="@style/console_off_right_bottom_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_track_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_track_bg"
|
||||
app:layout_constraintRight_toLeftOf="@id/console_track_text"
|
||||
app:layout_constraintTop_toTopOf="@id/console_track_bg"
|
||||
app:layout_constraintVertical_chainStyle="spread" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/console_track_icon"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="22dp"
|
||||
android:src="@drawable/icon_console_track"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_on_track_icon_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/console_on_track_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_on_track_icon_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_on_track_icon_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/console_track_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="轨迹回放"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/console_track_bg"
|
||||
app:layout_constraintLeft_toRightOf="@id/console_on_track_icon_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/console_track_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/console_track_bg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
12
app/src/main/res/layout/fragment_console.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:clickable="true"
|
||||
android:id="@+id/console_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/console_bg"
|
||||
tools:context=".ui.fragment.console.ConsoleFragment">
|
||||
|
||||
<include layout="@layout/console_on" />
|
||||
</FrameLayout>
|
@ -1,64 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/bg_left_pannel"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_left_pannel"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/title_layout"
|
||||
style="@style/left_pannel_title_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
style="@style/left_pannel_title_layout">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_back"
|
||||
style="@style/btn_round"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="@drawable/selector_bg_round_button"
|
||||
android:foreground="@drawable/ripple_btn_press"
|
||||
android:src="@drawable/ic_baseline_keyboard_arrow_left_24"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"></androidx.appcompat.widget.AppCompatImageView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_confirm"
|
||||
style="@style/btn_round"
|
||||
android:src="@drawable/ic_baseline_keyboard_arrow_left_24"></androidx.appcompat.widget.AppCompatImageView>
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/selector_bg_round_button"
|
||||
android:foreground="@drawable/ripple_btn_press"
|
||||
android:src="@drawable/ic_baseline_check_24"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"></androidx.appcompat.widget.AppCompatImageView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/left_pannel_title_font"
|
||||
android:textColor="@color/highFontColor"
|
||||
android:textSize="@dimen/left_pannel_title_font"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"></androidx.appcompat.widget.AppCompatTextView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="@drawable/selector_bg_round_button"
|
||||
android:foreground="@drawable/ripple_btn_press"
|
||||
style="@style/btn_round"
|
||||
android:src="@drawable/ic_baseline_check_24"></androidx.appcompat.widget.AppCompatImageView>
|
||||
app:layout_constraintTop_toTopOf="parent"></androidx.appcompat.widget.AppCompatTextView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
style="@style/default_card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_layout"
|
||||
style="@style/default_card_view">
|
||||
app:layout_constraintTop_toBottomOf="@id/title_layout">
|
||||
|
||||
<ExpandableListView
|
||||
android:id="@+id/elv_layer_manager"
|
||||
android:divider="@android:drawable/divider_horizontal_dim_dark"
|
||||
android:dividerHeight="0.1dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@android:drawable/divider_horizontal_dim_dark"
|
||||
android:dividerHeight="0.1dp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
@ -7,92 +7,72 @@
|
||||
android:background="@color/bg_left_pannel"
|
||||
tools:context=".ui.fragment.offlinemap.OfflineMapFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/title_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/offline_map_back"
|
||||
style="@style/btn_round"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
style="@style/left_pannel_title_layout">
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/selector_bg_round_button"
|
||||
android:foreground="@drawable/ripple_btn_press"
|
||||
android:src="@drawable/ic_baseline_keyboard_arrow_left_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/offline_map_back"
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="离线地图"
|
||||
android:textColor="@color/default_blue_text_color"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/offline_map_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/fragment_tabLayout_height"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@color/transparent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
app:tabBackground="@drawable/selector_bg_gradient_checkbox"
|
||||
app:tabGravity="center"
|
||||
app:tabIndicator="@null"
|
||||
app:tabIndicatorHeight="0dp"
|
||||
app:tabMaxWidth="150dp"
|
||||
app:tabMinWidth="150dp"
|
||||
app:tabMode="scrollable"
|
||||
app:tabPaddingEnd="6dp"
|
||||
app:tabPaddingStart="6dp"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:tabTextAppearance="@style/TabLayoutTextStyle"
|
||||
app:tabTextColor="@color/black">
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="@drawable/selector_bg_round_button"
|
||||
android:foreground="@drawable/ripple_btn_press"
|
||||
style="@style/btn_round"
|
||||
android:src="@drawable/ic_baseline_keyboard_arrow_left_24">
|
||||
android:text="下载管理" />
|
||||
|
||||
</androidx.appcompat.widget.AppCompatImageView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_title"
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/left_pannel_title_font"
|
||||
android:text="离线地图"
|
||||
android:textColor="@color/highFontColor"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
android:text="城市列表" />
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
</androidx.appcompat.widget.AppCompatTextView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/offline_map_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_layout"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
style="@style/default_card_view">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/offline_map_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:tabBackground="@drawable/selector_bg_gradient_checkbox"
|
||||
app:tabTextColor="@color/black"
|
||||
app:tabGravity="center"
|
||||
app:tabPadding="0dp"
|
||||
app:tabIndicator="@null"
|
||||
app:tabMode="scrollable"
|
||||
app:tabMinWidth="120dp"
|
||||
app:tabIndicatorHeight="0dp"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_layout">
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="下载管理" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="城市列表" />
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
app:layout_constraintTop_toBottomOf="@id/offline_map_tab_layout" />
|
||||
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/offline_map_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/offline_map_tab_layout" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -4,6 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/shape_rect_white_6dp_bg"
|
||||
android:padding="@dimen/default_widget_padding"
|
||||
tools:context=".ui.fragment.offlinemap.OfflineMapCityListFragment">
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_left_pannel"
|
||||
android:background="@drawable/shape_rect_white_6dp_bg"
|
||||
tools:context=".ui.fragment.qsrecordlist.QsRecordListFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -34,7 +34,7 @@
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/task_manager_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="26dp"
|
||||
android:layout_height="@dimen/fragment_tabLayout_height"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginRight="8dp"
|
||||
|
18
app/src/main/res/navigation/console_nav_graph.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation 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"
|
||||
app:startDestination="@id/ConsoleEmptyFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/ConsoleEmptyFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.empty.EmptyFragment"
|
||||
android:label="中控空页面"
|
||||
tools:layout="@layout/fragment_empty"></fragment>
|
||||
<fragment
|
||||
android:id="@+id/OfflineMapFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapFragment"
|
||||
android:label="离线地图"
|
||||
tools:layout="@layout/fragment_offline_map">
|
||||
</fragment>
|
||||
</navigation>
|
@ -39,7 +39,7 @@
|
||||
|
||||
<fragment
|
||||
android:id="@+id/QsLayerManagerFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.layermanager.LayermanagerFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.layermanager.LayerManagerFragment"
|
||||
android:label="图层管理"
|
||||
tools:layout="@layout/fragment_qs_record_list">
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<transitionManager xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<transition
|
||||
android:toScene="@layout/console_off"
|
||||
android:transition="@transition/transitionset_console_on" />
|
||||
</transitionManager>
|
10
app/src/main/res/transition/transitionset_console_on.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<changeBounds />
|
||||
<fade android:fadingMode="fade_out">
|
||||
<targets>
|
||||
<target android:targetId="@+id/console_map_icon_bg" />
|
||||
</targets>
|
||||
</fade>
|
||||
|
||||
</transitionSet>
|
@ -40,5 +40,5 @@
|
||||
<dimen name="main_activity_geometry_w" comment="地图主页坐标框宽度">230dp</dimen>
|
||||
<dimen name="main_activity_geometry_h" comment="地图主页坐标框高度">28dp</dimen>
|
||||
<dimen name="fragment_problem_link_width" comment="问题原因面板宽度">213dp</dimen>
|
||||
|
||||
<dimen name="fragment_tabLayout_height">32dp</dimen>
|
||||
</resources>
|
@ -1,5 +1,32 @@
|
||||
<resources>
|
||||
|
||||
<style name="main_activity_bottom_sheet_icon" comment="主控页面下方按钮样式">
|
||||
<item name="android:layout_width">36dp</item>
|
||||
<item name="android:layout_height">36dp</item>
|
||||
</style>
|
||||
|
||||
<style name="console_on_left_bottom_icon" comment="主控页面左侧右下角按钮样式">
|
||||
<item name="android:layout_width">24dp</item>
|
||||
<item name="android:layout_height">24dp</item>
|
||||
<item name="android:layout_margin">5dp</item>
|
||||
<item name="android:padding">4dp</item>
|
||||
</style>
|
||||
|
||||
<style name="console_off_right_bottom_icon" comment="主控页面右侧按钮样式">
|
||||
<item name="android:layout_width">57dp</item>
|
||||
<item name="android:layout_height">57dp</item>
|
||||
<item name="android:padding">15dp</item>
|
||||
<item name="android:background">@drawable/shape_oval_gray_hex_bg</item>
|
||||
</style>
|
||||
|
||||
<style name="console_on_left_bottom_text" comment="主控页面左侧右下角按钮样式">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:layout_margin">5dp</item>
|
||||
</style>
|
||||
|
||||
<style name="title_default_style" comment="默认顶标题样式">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">20dp</item>
|
||||
|
@ -13,6 +13,7 @@ plugins {
|
||||
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
|
||||
id 'com.google.dagger.hilt.android' version '2.44' apply false
|
||||
}
|
||||
|
||||
static def androidCompileSdk() { return 33 }
|
||||
allprojects {
|
||||
ext.gdxVersion = "1.11.0"
|
||||
|
@ -1636,54 +1636,52 @@
|
||||
|
||||
<!--常规点限速-->
|
||||
<m v="OMDB_SPEEDLIMIT">
|
||||
<m k="speedFlag">
|
||||
<m v="0">
|
||||
<m k="speedFlag" v="0">
|
||||
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="16" stroke="#ffffff"
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
<symbol src="assets:omdb/icon_4002_0.png" symbol-width="46" symbol-height="46"></symbol>
|
||||
<symbol src="assets:omdb/icon_4002_0.svg" symbol-width="46" symbol-height="46"></symbol>
|
||||
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
</m>
|
||||
<m v="1">
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
<symbol src="assets:omdb/icon_4002_1.png" symbol-width="46" symbol-height="46"></symbol>
|
||||
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
</m>
|
||||
</m>
|
||||
<m k="speedFlag" v="1">
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
<symbol src="assets:omdb/icon_4002_1.svg" symbol-width="46" symbol-height="46"></symbol>
|
||||
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
</m>
|
||||
</m>
|
||||
<!--条件点限速-->
|
||||
<m v="OMDB_SPEEDLIMIT_COND">
|
||||
<m k="speedFlag" v="0">
|
||||
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
<symbol src="assets:omdb/icon_4003_0.png" symbol-width="46" symbol-height="46"></symbol>
|
||||
<symbol src="assets:omdb/icon_4003_0.svg" symbol-width="46" symbol-height="46"></symbol>
|
||||
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
</m>
|
||||
<m k="speedFlag" v="0">
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
<m k="speedFlag" v="1">
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
<symbol src="assets:omdb/icon_4003_1.png" symbol-width="46" symbol-height="46"></symbol>
|
||||
<symbol src="assets:omdb/icon_4003_1.svg" symbol-width="46" symbol-height="46"></symbol>
|
||||
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
</m>
|
||||
</m>
|
||||
<!--可变点限速-->
|
||||
<m v="OMDB_SPEEDLIMIT_VAR">
|
||||
<m v="0">
|
||||
<m k="speedFlag" v="0">
|
||||
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
<symbol src="assets:omdb/icon_4004_0.png" symbol-width="46" symbol-height="46"></symbol>
|
||||
<symbol src="assets:omdb/icon_4004_0.svg" symbol-width="46" symbol-height="46"></symbol>
|
||||
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
</m>
|
||||
<m v="1">
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
<m k="speedFlag" v="1">
|
||||
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
|
||||
stroke-width="1.0"></caption>
|
||||
<symbol src="assets:omdb/icon_4004_1.png" symbol-width="46" symbol-height="46"></symbol>
|
||||
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
|
||||
@ -1773,25 +1771,19 @@
|
||||
</m>
|
||||
<!--交通灯-->
|
||||
<m v="OMDB_TRAFFICLIGHT">
|
||||
<symbol src="assets:omdb/icon_4022_0.png" repeat="false" symbol-width="14" symbol-height="40" rotate="false"></symbol>
|
||||
<symbol src="assets:omdb/icon_4022_0.svg" repeat="false" symbol-width="46" symbol-height="46" rotate="false"></symbol>
|
||||
</m>
|
||||
<!--普通交限-->
|
||||
<m v="OMDB_RESTRICTION">
|
||||
<m k="angle">
|
||||
<symbol src="assets:omdb/icon_4006_0.png" repeat="false" symbol-width="35" symbol-height="35" rotate="false" repeat-start="0" ></symbol>
|
||||
<symbol src="assets:omdb/icon_4004_0.png" repeat="false" symbol-width="35" symbol-height="35" rotate="false" repeat-start="0" ></symbol>
|
||||
<symbol src="assets:omdb/icon_4004_1.png" repeat="false" symbol-width="35" symbol-height="35" rotate="false" repeat-start="0" ></symbol>
|
||||
<symbol src="assets:omdb/icon_4006_0.svg" repeat="false" symbol-width="46" symbol-height="46" rotate="false" repeat-start="0" ></symbol>
|
||||
</m>
|
||||
<m k="type" v="angle">
|
||||
<symbol src="assets:omdb/icon_arrow_right.svg" repeat-start="0" repeat-gap="2000" symbol-percent="45" repeat="false" rotate="true"></symbol>
|
||||
</m>
|
||||
<m k="type" v="s_2_e">
|
||||
<line stroke="#14582c" width="0.1" dasharray="1,1" repeat-gap="3" repeat-start="0"/>
|
||||
</m>
|
||||
<!-- <m k="type" v="angle">-->
|
||||
<!-- <symbol src="assets:omdb/icon_arrow_right.png" repeat-start="0" repeat-gap="2000" symbol-percent="45" repeat="false" rotate="true"></symbol>-->
|
||||
<!-- </m>-->
|
||||
<!-- <m k="type" v="s_2_e">-->
|
||||
<!-- <line stroke="#14582c" width="0.1" dasharray="1,1" repeat-gap="3" repeat-start="0"/>-->
|
||||
<!-- </m>-->
|
||||
</m>
|
||||
<!--交通灯-->
|
||||
<m v="OMDB_AREA">
|
||||
<area stroke="#ff0000" stroke-width="2" src="assets:omdb/area_test.jpg"></area>
|
||||
</m>
|
||||
</m>
|
||||
</rendertheme>
|
Before Width: | Height: | Size: 7.3 KiB |
1
collect-library/src/main/assets/omdb/icon_4002_0.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="136" viewBox="0 0 136 136"><defs><style>.a,.f{fill:#fff;}.a{opacity:0;}.b{fill:#ff5f4c;opacity:0.304;}.c{fill:#a74d4b;opacity:0.708;}.d{fill:url(#a);}.e{fill:url(#b);}.f{stroke:#db4646;stroke-width:3px;}.g{stroke:none;}.h{fill:none;}</style><radialGradient id="a" cx="0.21" cy="0.134" r="1.274" gradientTransform="matrix(0.849, 0.529, -0.307, 0.493, 0.073, -0.043)" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#ff9287"/><stop offset="0.786" stop-color="#ff5f4c"/><stop offset="1" stop-color="#ff5f4c"/></radialGradient><radialGradient id="b" cx="0.5" cy="0.5" r="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#e75545"/><stop offset="0.793" stop-color="#c4483b"/><stop offset="1" stop-color="#983b31"/></radialGradient></defs><g transform="translate(-956 -396)"><rect class="a" width="136" height="136" transform="translate(956 396)"/><g transform="translate(989.164 429.346)"><g transform="translate(10.653 81.66)"><ellipse class="b" cx="24.183" cy="8.497" rx="24.183" ry="8.497"/><ellipse class="c" cx="8.497" cy="3.268" rx="8.497" ry="3.268" transform="translate(15.687 5.229)"/></g><g transform="translate(0 0)"><path class="d" d="M22.956,71.538q-.792-.8-1.543-1.533A36.466,36.466,0,0,1,0,36.4C0,16.3,15.6,0,34.837,0S69.673,16.3,69.673,36.4c0,15.235-8.954,28.283-21.664,33.711q-.588.673-1.219,1.424A73.582,73.582,0,0,0,35.337,90.157S30.335,78.981,22.956,71.538Z" transform="translate(0 0)"/><circle class="e" cx="27.451" cy="27.451" r="27.451" transform="translate(7.029 7.568)"/></g></g><g transform="translate(10174 7640)"><g class="f" transform="translate(-9178 -7204)"><circle class="g" cx="28" cy="28" r="28"/><circle class="h" cx="28" cy="28" r="26.5"/></g></g></g></svg>
|
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 8.9 KiB |
1
collect-library/src/main/assets/omdb/icon_4002_1.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="136" viewBox="0 0 136 136"><defs><style>.a,.h,.j{fill:none;}.a{opacity:0;}.b{fill:#4d4d4d;opacity:0.304;}.c{fill:#363333;opacity:0.708;}.d{fill:url(#a);}.e{fill:url(#b);}.f,.g{fill:#fff;stroke-width:3px;}.f{stroke:#db4646;}.g,.h{stroke:#2f2f2f;}.h{stroke-linecap:round;stroke-width:2px;}.i{stroke:none;}</style><radialGradient id="a" cx="0.21" cy="0.134" r="1.274" gradientTransform="matrix(0.849, 0.529, -0.307, 0.493, 0.073, -0.043)" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#b5b4b4"/><stop offset="0.697" stop-color="#6e6c6c"/><stop offset="1" stop-color="#2f2f2f"/></radialGradient><radialGradient id="b" cx="0.5" cy="0.5" r="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#e75545"/><stop offset="0.793" stop-color="#c4483b"/><stop offset="1" stop-color="#983b31"/></radialGradient></defs><g transform="translate(-832 -256)"><g transform="translate(-124 -140)"><rect class="a" width="136" height="136" transform="translate(956 396)"/><g transform="translate(989.164 429.346)"><g transform="translate(10.653 81.66)"><ellipse class="b" cx="24.183" cy="8.497" rx="24.183" ry="8.497"/><ellipse class="c" cx="8.497" cy="3.268" rx="8.497" ry="3.268" transform="translate(15.687 5.229)"/></g><g transform="translate(0 0)"><path class="d" d="M22.956,71.538q-.792-.8-1.543-1.533A36.466,36.466,0,0,1,0,36.4C0,16.3,15.6,0,34.837,0S69.673,16.3,69.673,36.4c0,15.235-8.954,28.283-21.664,33.711q-.588.673-1.219,1.424A73.582,73.582,0,0,0,35.337,90.157S30.335,78.981,22.956,71.538Z" transform="translate(0 0)"/><circle class="e" cx="27.451" cy="27.451" r="27.451" transform="translate(7.029 7.568)"/></g></g><g transform="translate(10174 7640)"><g class="f" transform="translate(-9178 -7204)"><circle class="i" cx="28" cy="28" r="28"/><circle class="j" cx="28" cy="28" r="26.5"/></g></g><g transform="translate(573 -37)"><g transform="translate(423 473)"><g class="g"><circle class="i" cx="28" cy="28" r="28"/><circle class="j" cx="28" cy="28" r="26.5"/></g></g><g transform="translate(427.138 478.332)"><line class="h" y1="34.047" x2="33.845" transform="translate(0 0)"/><line class="h" y1="36.376" x2="36.552" transform="translate(4.81 4.168)"/><path class="h" d="M0,35.11,18.688,16.458,35.178,0" transform="translate(11.84 11.226)"/></g></g></g></g></svg>
|
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 9.0 KiB |
1
collect-library/src/main/assets/omdb/icon_4003_0.svg
Normal file
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 10 KiB |
1
collect-library/src/main/assets/omdb/icon_4003_1.svg
Normal file
After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 8.1 KiB |
1
collect-library/src/main/assets/omdb/icon_4004_0.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="136" viewBox="0 0 136 136"><defs><style>.a,.f{fill:#fff;}.a{opacity:0;}.b{fill:#ff5f4c;opacity:0.304;}.c{fill:#a74d4b;opacity:0.708;}.d{fill:url(#a);}.e{fill:url(#b);}.g{fill:#2a23f5;stroke:#db4646;stroke-linecap:square;stroke-width:3px;stroke-dasharray:9 10;}.h{stroke:none;}.i{fill:none;}</style><radialGradient id="a" cx="0.21" cy="0.134" r="1.274" gradientTransform="matrix(0.849, 0.529, -0.307, 0.493, 0.073, -0.043)" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#ff9287"/><stop offset="0.786" stop-color="#ff5f4c"/><stop offset="1" stop-color="#ff5f4c"/></radialGradient><radialGradient id="b" cx="0.5" cy="0.5" r="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#e75545"/><stop offset="0.793" stop-color="#c4483b"/><stop offset="1" stop-color="#983b31"/></radialGradient></defs><g transform="translate(-956 -396)"><rect class="a" width="136" height="136" transform="translate(956 396)"/><g transform="translate(989.164 429.346)"><g transform="translate(10.653 81.66)"><ellipse class="b" cx="24.183" cy="8.497" rx="24.183" ry="8.497"/><ellipse class="c" cx="8.497" cy="3.268" rx="8.497" ry="3.268" transform="translate(15.687 5.229)"/></g><g transform="translate(0 0)"><path class="d" d="M22.956,71.538q-.792-.8-1.543-1.533A36.466,36.466,0,0,1,0,36.4C0,16.3,15.6,0,34.837,0S69.673,16.3,69.673,36.4c0,15.235-8.954,28.283-21.664,33.711q-.588.673-1.219,1.424A73.582,73.582,0,0,0,35.337,90.157S30.335,78.981,22.956,71.538Z" transform="translate(0 0)"/><circle class="e" cx="27.451" cy="27.451" r="27.451" transform="translate(7.029 7.568)"/></g></g><g transform="translate(10096 7643)"><circle class="f" cx="28" cy="28" r="28" transform="translate(-9100 -7207)"/><g class="g" transform="translate(-9096 -7203)"><circle class="h" cx="24" cy="24" r="24"/><circle class="i" cx="24" cy="24" r="25.5"/></g></g></g></svg>
|
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.5 KiB |
1
collect-library/src/main/assets/omdb/icon_4006_0.svg
Normal file
After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 26 KiB |
162
collect-library/src/main/assets/omdb/icon_4022_0.svg
Normal file
@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="_图层_2" data-name="图层 2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 29.88 85.54">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: url(#_未命名的渐变_457);
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
fill: url(#_未命名的渐变_322);
|
||||
}
|
||||
|
||||
.cls-3 {
|
||||
fill: url(#_未命名的渐变_150);
|
||||
}
|
||||
|
||||
.cls-4 {
|
||||
fill: url(#_未命名的渐变_264);
|
||||
}
|
||||
|
||||
.cls-5 {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.cls-6 {
|
||||
fill: #3d444c;
|
||||
}
|
||||
|
||||
.cls-7 {
|
||||
fill: url(#_未命名的渐变_178);
|
||||
stroke: #161b20;
|
||||
}
|
||||
|
||||
.cls-7, .cls-8, .cls-9, .cls-10, .cls-11 {
|
||||
stroke-miterlimit: 10;
|
||||
}
|
||||
|
||||
.cls-8 {
|
||||
fill: url(#_未命名的渐变_507);
|
||||
stroke: #8ba0ae;
|
||||
}
|
||||
|
||||
.cls-12 {
|
||||
fill: #272d35;
|
||||
isolation: isolate;
|
||||
opacity: .2;
|
||||
}
|
||||
|
||||
.cls-9 {
|
||||
fill: url(#_未命名的渐变_4);
|
||||
stroke: #d15f6a;
|
||||
}
|
||||
|
||||
.cls-10 {
|
||||
stroke: #18873b;
|
||||
}
|
||||
|
||||
.cls-10, .cls-11 {
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.cls-11 {
|
||||
stroke: #d5b725;
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="_未命名的渐变_150" data-name="未命名的渐变 150" x1="12.68" y1="70.45" x2="17.45" y2="70.45" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#999899"/>
|
||||
<stop offset=".17" stop-color="#7e7e80"/>
|
||||
<stop offset=".43" stop-color="#5b5d60"/>
|
||||
<stop offset=".64" stop-color="#46494d"/>
|
||||
<stop offset=".78" stop-color="#3f4246"/>
|
||||
<stop offset=".96" stop-color="#404247"/>
|
||||
<stop offset=".99" stop-color="#43434a"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="_未命名的渐变_507" data-name="未命名的渐变 507" x1=".5" y1="34.3" x2="29.38" y2="34.3" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#b1bbcb"/>
|
||||
<stop offset=".15" stop-color="#c2cddb"/>
|
||||
<stop offset=".38" stop-color="#dbe7f0"/>
|
||||
<stop offset=".53" stop-color="#e4f1f9"/>
|
||||
<stop offset=".64" stop-color="#deeaf3"/>
|
||||
<stop offset=".8" stop-color="#cdd9e5"/>
|
||||
<stop offset=".98" stop-color="#b1bccd"/>
|
||||
<stop offset="1" stop-color="#aeb9ca"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="_未命名的渐变_178" data-name="未命名的渐变 178" x1=".81" y1="35.42" x2="29.06" y2="35.42" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#403c42"/>
|
||||
<stop offset=".14" stop-color="#3c4353"/>
|
||||
<stop offset=".27" stop-color="#3a475d"/>
|
||||
<stop offset=".46" stop-color="#344256"/>
|
||||
<stop offset=".73" stop-color="#233445"/>
|
||||
<stop offset="1" stop-color="#0d212d"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="_未命名的渐变_4" data-name="未命名的渐变 4" cx="15.03" cy="21.36" fx="15.03" fy="21.36" r="9.07" gradientTransform="translate(.15 -2.95) scale(.98 .95)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset=".34" stop-color="#ed7474"/>
|
||||
<stop offset=".52" stop-color="#ea5a59"/>
|
||||
<stop offset=".7" stop-color="#ea514f"/>
|
||||
<stop offset=".77" stop-color="#e5312c"/>
|
||||
<stop offset=".78" stop-color="#e12e2a"/>
|
||||
<stop offset="1" stop-color="#ce2320"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="_未命名的渐变_264" data-name="未命名的渐变 264" cx="15.03" cy="21.36" fx="15.03" fy="21.36" r="8.62" gradientTransform="translate(.15 -2.95) scale(.98 .95)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset=".38" stop-color="#ea514f"/>
|
||||
<stop offset=".75" stop-color="#e12e2a"/>
|
||||
<stop offset=".91" stop-color="#c62f2d"/>
|
||||
<stop offset="1" stop-color="#a11715"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="_未命名的渐变_322" data-name="未命名的渐变 322" cx="15.03" cy="41.14" fx="15.03" fy="41.14" r="8.37" gradientTransform="translate(.15 -2.95) scale(.98 .95)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#f5d12a"/>
|
||||
<stop offset="0" stop-color="#f5d430"/>
|
||||
<stop offset=".02" stop-color="#f6de46"/>
|
||||
<stop offset=".04" stop-color="#f7e757"/>
|
||||
<stop offset=".07" stop-color="#f8ec63"/>
|
||||
<stop offset=".11" stop-color="#f8f06a"/>
|
||||
<stop offset=".21" stop-color="#f9f16c"/>
|
||||
<stop offset=".9" stop-color="#f8cf00"/>
|
||||
<stop offset="1" stop-color="#ffe200"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="_未命名的渐变_457" data-name="未命名的渐变 457" cx="14.94" cy="60.92" fx="14.94" fy="60.92" r="8.48" gradientTransform="translate(0 -2.95) scale(1 .95)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#ed7474"/>
|
||||
<stop offset="0" stop-color="#8fc31f"/>
|
||||
<stop offset=".38" stop-color="#8fc31f"/>
|
||||
<stop offset=".7" stop-color="#58b431"/>
|
||||
<stop offset=".83" stop-color="#24a239"/>
|
||||
<stop offset="1" stop-color="#0c6735"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<g id="_图层_1-2" data-name="图层 1">
|
||||
<g>
|
||||
<ellipse id="_椭圆形" data-name="椭圆形" class="cls-12" cx="14.94" cy="81.84" rx="14.37" ry="3.7"/>
|
||||
<ellipse id="_椭圆形-2" data-name="椭圆形" class="cls-6" cx="14.94" cy="81.84" rx="7.55" ry="2.96"/>
|
||||
<path class="cls-3" d="M14.94,58.28h0c1.45,0,2.63,1.18,2.63,2.63v19.21c0,1.38-1.12,2.5-2.5,2.5h-.29c-1.36,0-2.46-1.1-2.46-2.46v-19.25c0-1.45,1.18-2.63,2.63-2.63Z"/>
|
||||
<rect class="cls-8" x=".5" y=".5" width="28.88" height="67.6" rx="14.44" ry="14.44"/>
|
||||
<rect class="cls-7" x=".81" y="3.51" width="28.25" height="63.82" rx="14.13" ry="14.13"/>
|
||||
<g>
|
||||
<path class="cls-9" d="M6.01,17.23c0,4.73,4,8.58,8.93,8.58s8.93-3.84,8.93-8.58-4-8.58-8.93-8.58-8.93,3.84-8.93,8.58Z"/>
|
||||
<path class="cls-4" d="M6.46,17.23c0,4.5,3.8,8.15,8.48,8.15s8.48-3.65,8.48-8.15-3.8-8.15-8.48-8.15-8.48,3.65-8.48,8.15Z"/>
|
||||
</g>
|
||||
<path id="_形状" data-name="形状" class="cls-5" d="M5.94,11.25c-.31,0-.59-.16-.72-.43s-.09-.59,.11-.81c1.31-1.55,2.91-2.85,4.71-3.85,.19-.09,.41-.11,.61-.04,.2,.06,.37,.2,.46,.39,.19,.38,.04,.83-.34,1.04-1.62,.86-3.05,2.02-4.22,3.4-.15,.17-.38,.27-.61,.27v.04Zm-1.74,2.47c-.15,0-.29-.04-.41-.12-.18-.1-.31-.27-.36-.47-.05-.2-.01-.41,.1-.58l.26-.41c.11-.17,.28-.3,.49-.35,.2-.05,.42-.01,.6,.1,.18,.11,.31,.28,.36,.48s.01,.41-.1,.59l-.26,.4c-.14,.23-.4,.37-.67,.37h0Z"/>
|
||||
<g>
|
||||
<path class="cls-11" d="M6.28,35.93c0,4.59,3.88,8.32,8.66,8.32s8.66-3.73,8.66-8.32-3.88-8.32-8.66-8.32-8.66,3.73-8.66,8.32Z"/>
|
||||
<path class="cls-2" d="M6.71,35.93c0,4.36,3.69,7.91,8.23,7.91s8.23-3.54,8.23-7.91-3.69-7.91-8.23-7.91-8.23,3.54-8.23,7.91Z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="cls-10" d="M6.01,54.63c0,4.66,4,8.44,8.93,8.44s8.93-3.78,8.93-8.44-4-8.44-8.93-8.44-8.93,3.78-8.93,8.44Z"/>
|
||||
<path class="cls-1" d="M6.46,54.63c0,4.42,3.8,8.01,8.48,8.01s8.48-3.59,8.48-8.01-3.8-8.01-8.48-8.01-8.48,3.59-8.48,8.01Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 1.0 KiB |
40
collect-library/src/main/assets/omdb/icon_arrow_right.svg
Normal file
@ -0,0 +1,40 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="140"
|
||||
height="140" viewBox="0 0 140 140">
|
||||
<defs>
|
||||
<style>
|
||||
.a{fill:none;}.b{fill:#898989;opacity:0;}.c{opacity:0.14;mix-blend-mode:multiply;isolation:isolate;}.d{clip-path:url(#a);}.e{fill:#b2250a;}.f{fill:#ea7626;}.g{fill:#fae8c8;}
|
||||
</style>
|
||||
<clipPath id="a">
|
||||
<rect class="a" width="54.796" height="40.392" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g transform="translate(-1333 -1090)">
|
||||
<g transform="translate(251 665)">
|
||||
<rect class="b" width="140" height="140" transform="translate(1082 425)" />
|
||||
<g transform="translate(229.467 -611)">
|
||||
<g transform="translate(937.713 1086)">
|
||||
<g transform="translate(0 0)">
|
||||
<g class="c" transform="translate(0)">
|
||||
<g transform="translate(0)">
|
||||
<g class="d">
|
||||
<path
|
||||
d="M38.035,31.807l-16.7-13a3.818,3.818,0,0,0-6.163,3.014v3.908h-26.39A4.066,4.066,0,0,0-15.287,29.8V39.844a4.066,4.066,0,0,0,4.066,4.066h26.39v3.908a3.818,3.818,0,0,0,6.163,3.014l16.7-13a3.819,3.819,0,0,0,0-6.027"
|
||||
transform="translate(15.287 -18)" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<path class="e"
|
||||
d="M39.533,29.22H37.54L21.332,41.831a3.819,3.819,0,0,1-6.163-3.014V34.909h-26.39a4.066,4.066,0,0,1-4.066-4.066V20.8a4.066,4.066,0,0,1,4.066-4.066h26.39V12.825a3.818,3.818,0,0,1,6.163-3.014l16.7,13a3.791,3.791,0,0,1,1.448,2.581l.049.005Z"
|
||||
transform="translate(15.287 -5.889)" />
|
||||
<path class="f"
|
||||
d="M38.028,13.807l-16.7-13a3.818,3.818,0,0,0-6.163,3.014V7.733H-11.253A4.066,4.066,0,0,0-15.318,11.8V21.844a4.066,4.066,0,0,0,4.066,4.066H15.162v3.908a3.818,3.818,0,0,0,6.163,3.014l16.7-13a3.819,3.819,0,0,0,0-6.027"
|
||||
transform="translate(15.318 6.457)" />
|
||||
</g>
|
||||
<path class="g"
|
||||
d="M75.8,20.234a2.381,2.381,0,0,1-1.511-.539L71.346,17.29a2.392,2.392,0,1,1,3.025-3.706l2.948,2.406A2.392,2.392,0,0,1,75.8,20.234"
|
||||
transform="translate(-35.64 -1.875)" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
@ -8,6 +8,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.room.Database;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
import androidx.room.migration.Migration;
|
||||
import androidx.sqlite.db.SupportSQLiteDatabase;
|
||||
|
||||
import com.navinfo.collect.library.data.entity.NiLocation;
|
||||
@ -18,7 +19,7 @@ import com.tencent.wcdb.repair.RecoverKit;
|
||||
import com.tencent.wcdb.room.db.WCDBDatabase;
|
||||
import com.tencent.wcdb.room.db.WCDBOpenHelperFactory;
|
||||
|
||||
@Database(entities = { NiLocation.class},version = 1, exportSchema = false)
|
||||
@Database(entities = { NiLocation.class},version = 2, exportSchema = false)
|
||||
public abstract class TraceDataBase extends RoomDatabase {
|
||||
// marking the instance as volatile to ensure atomic access to the variable
|
||||
/**
|
||||
@ -63,7 +64,7 @@ public abstract class TraceDataBase extends RoomDatabase {
|
||||
// Wipes and rebuilds instead of migrating if no Migration object.
|
||||
// Migration is not part of this codelab.
|
||||
.fallbackToDestructiveMigration()
|
||||
.addCallback(sRoomDatabaseCallback)
|
||||
.addCallback(sRoomDatabaseCallback).addMigrations(MIGRATION_1_2)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@ -71,6 +72,18 @@ public abstract class TraceDataBase extends RoomDatabase {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
*扩充字段
|
||||
*/
|
||||
public static final Migration MIGRATION_1_2 = new Migration(1, 2) {
|
||||
@Override
|
||||
public void migrate(SupportSQLiteDatabase database) {
|
||||
// 增加字段
|
||||
database.execSQL("ALTER TABLE niLocation " + " ADD COLUMN groupId " + " TEXT");
|
||||
database.execSQL("ALTER TABLE niLocation " + " ADD COLUMN timeStamp " + " TEXT");
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Override the onOpen method to populate the database.
|
||||
* For this sample, we clear the database every time it is created or opened.
|
||||
|
@ -61,6 +61,11 @@ public class NiLocation extends Feature{
|
||||
private int tilex;
|
||||
@ColumnInfo(name = "tiley")
|
||||
private int tiley;
|
||||
@ColumnInfo(name = "groupId")
|
||||
private String groupId;
|
||||
@ColumnInfo(name = "timeStamp")
|
||||
private String timeStamp;
|
||||
|
||||
private boolean isAccouracy;
|
||||
private boolean isSpeed;
|
||||
private boolean isAltitude;
|
||||
@ -297,4 +302,20 @@ public class NiLocation extends Feature{
|
||||
public void setErrorCode(String errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getTimeStamp() {
|
||||
return timeStamp;
|
||||
}
|
||||
|
||||
public void setTimeStamp(String timeStamp) {
|
||||
this.timeStamp = timeStamp;
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,8 @@ open class TaskBean @JvmOverloads constructor(
|
||||
|
||||
@Ignore
|
||||
var message: String = "",
|
||||
@Ignore
|
||||
var errMsg: String = "",
|
||||
var color: Int = 0xFF00AA
|
||||
) : RealmObject() {
|
||||
fun getDownLoadUrl(): String {
|
||||
|
@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
@ -224,6 +225,8 @@ public final class NIMapView extends RelativeLayout {
|
||||
getVtmMap().events.bind(new Map.UpdateListener() {
|
||||
@Override
|
||||
public void onMapEvent(Event e, MapPosition mapPosition) {
|
||||
//Log.e("qj",Thread.currentThread()+"");
|
||||
|
||||
//旋转
|
||||
if (mLastRotateZ != mapPosition.bearing) {
|
||||
mRotateAnimation.startRotationZ(mLastRotateZ, mapPosition.bearing);
|
||||
@ -593,7 +596,8 @@ public final class NIMapView extends RelativeLayout {
|
||||
VECTOR(2)/*高亮组*/,
|
||||
OPERATE_LINE(3)/*操作图层组*/,
|
||||
OPERATE_MARKER(4)/*操作图层组*/,
|
||||
NAVIGATION(5)/*定位导航组*/;
|
||||
NAVIGATION(5)/*定位导航组*/,
|
||||
LABEL(6)/*图标,文字图层*/;
|
||||
|
||||
int groupIndex;
|
||||
|
||||
|
@ -22,10 +22,11 @@ import java.io.File
|
||||
/**
|
||||
* Layer 操作
|
||||
*/
|
||||
class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView,tracePath: String) : BaseHandler(context, mapView) {
|
||||
class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView, tracePath: String) :
|
||||
BaseHandler(context, mapView) {
|
||||
private var baseGroupLayer // 用于盛放所有基础底图的图层组,便于统一管理
|
||||
: GroupLayer? = null
|
||||
private val mTracePath:String = tracePath
|
||||
private val mTracePath: String = tracePath
|
||||
|
||||
/**
|
||||
* 轨迹渲染图层
|
||||
@ -70,12 +71,13 @@ class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView,tracePa
|
||||
|
||||
vectorNiLocationTileLayer = VectorTileLayer(mMapView.vtmMap, mapLifeNiLocationTileSource)
|
||||
|
||||
labelNiLocationLayer = LabelLayer(mMapView.vtmMap, vectorNiLocationTileLayer, LabelTileLoaderHook(), 15)
|
||||
labelNiLocationLayer =
|
||||
LabelLayer(mMapView.vtmMap, vectorNiLocationTileLayer, LabelTileLoaderHook(), 15)
|
||||
|
||||
if(vectorNiLocationTileLayer!=null){
|
||||
addLayer(vectorNiLocationTileLayer,NIMapView.LAYER_GROUPS.BASE)
|
||||
if (vectorNiLocationTileLayer != null) {
|
||||
addLayer(vectorNiLocationTileLayer, NIMapView.LAYER_GROUPS.BASE)
|
||||
}
|
||||
if(labelNiLocationLayer!=null){
|
||||
if (labelNiLocationLayer != null) {
|
||||
addLayer(labelNiLocationLayer, NIMapView.LAYER_GROUPS.BASE)
|
||||
}
|
||||
|
||||
@ -92,7 +94,7 @@ class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView,tracePa
|
||||
mMapView.vtmMap.events.bind(UpdateListener { e, mapPosition ->
|
||||
if (e == org.oscim.map.Map.SCALE_EVENT) {
|
||||
// 测评数据图层在指定Zoom后开始显示
|
||||
val isOmdbZoom = mapPosition.zoomLevel>=Constant.OMDB_MIN_ZOOM
|
||||
val isOmdbZoom = mapPosition.zoomLevel >= Constant.OMDB_MIN_ZOOM
|
||||
baseGroupLayer?.layers?.forEach {
|
||||
it.isEnabled = !isOmdbZoom
|
||||
}
|
||||
@ -105,23 +107,33 @@ class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView,tracePa
|
||||
private fun initOMDBVectorTileLayer() {
|
||||
// 初始化OMDB参考相关图层
|
||||
omdbReferenceTileLayer = VectorTileLayer(mMapView.vtmMap, omdbReferenceTileSource)
|
||||
omdbReferenceLabelLayer = LabelLayer(mMapView.vtmMap, omdbReferenceTileLayer, LabelTileLoaderHook(), Constant.OMDB_MIN_ZOOM)
|
||||
if(omdbReferenceTileLayer!=null){
|
||||
addLayer(omdbReferenceTileLayer,NIMapView.LAYER_GROUPS.VECTOR_TILE)
|
||||
omdbReferenceLabelLayer = LabelLayer(
|
||||
mMapView.vtmMap,
|
||||
omdbReferenceTileLayer,
|
||||
LabelTileLoaderHook(),
|
||||
Constant.OMDB_MIN_ZOOM
|
||||
)
|
||||
if (omdbReferenceTileLayer != null) {
|
||||
addLayer(omdbReferenceTileLayer, NIMapView.LAYER_GROUPS.VECTOR_TILE)
|
||||
}
|
||||
if(omdbReferenceLabelLayer!=null){
|
||||
addLayer(omdbReferenceLabelLayer, NIMapView.LAYER_GROUPS.VECTOR_TILE)
|
||||
if (omdbReferenceLabelLayer != null) {
|
||||
addLayer(omdbReferenceLabelLayer, NIMapView.LAYER_GROUPS.LABEL)
|
||||
}
|
||||
|
||||
// 初始化OMDB相关图层
|
||||
omdbVectorTileLayer = VectorTileLayer(mMapView.vtmMap, omdbTileSource)
|
||||
omdbLabelLayer = LabelLayer(mMapView.vtmMap, omdbVectorTileLayer, LabelTileLoaderHook(), Constant.OMDB_MIN_ZOOM)
|
||||
if(omdbVectorTileLayer!=null){
|
||||
addLayer(omdbVectorTileLayer,NIMapView.LAYER_GROUPS.VECTOR_TILE)
|
||||
omdbLabelLayer = LabelLayer(
|
||||
mMapView.vtmMap,
|
||||
omdbVectorTileLayer,
|
||||
LabelTileLoaderHook(),
|
||||
Constant.OMDB_MIN_ZOOM
|
||||
)
|
||||
if (omdbVectorTileLayer != null) {
|
||||
addLayer(omdbVectorTileLayer, NIMapView.LAYER_GROUPS.VECTOR_TILE)
|
||||
}
|
||||
if(omdbLabelLayer!=null){
|
||||
addLayer(omdbLabelLayer, NIMapView.LAYER_GROUPS.VECTOR_TILE)
|
||||
if (omdbLabelLayer != null) {
|
||||
addLayer(omdbLabelLayer, NIMapView.LAYER_GROUPS.LABEL)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@ import com.baidu.location.LocationClientOption
|
||||
import com.baidu.location.LocationClientOption.LocationMode
|
||||
import com.navinfo.collect.library.data.entity.NiLocation
|
||||
import com.navinfo.collect.library.map.NIMapView
|
||||
import com.navinfo.collect.library.utils.DateUtils
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
import kotlinx.coroutines.launch
|
||||
import org.oscim.core.GeoPoint
|
||||
@ -195,6 +196,7 @@ class LocationLayerHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
niLocation.address = mCurrentLocation!!.addrStr
|
||||
niLocation.street = mCurrentLocation!!.street
|
||||
niLocation.town = mCurrentLocation!!.town
|
||||
niLocation.speed = mCurrentLocation!!.speed
|
||||
niLocation.streetNumber = mCurrentLocation!!.streetNumber
|
||||
niLocation.errorCode = mCurrentLocation!!.locType.toString()
|
||||
return niLocation
|
||||
|
@ -84,5 +84,6 @@ class OmdbTaskLinkLayer(map: Map, private var style: Style) : VectorLayer(map) {
|
||||
}
|
||||
lineMap.clear()
|
||||
clearSelectLine()
|
||||
update()
|
||||
}
|
||||
}
|
2
vtm
@ -1 +1 @@
|
||||
Subproject commit 6a91e63b0c9f65fd68f8aa4972b1b7bf20a5a962
|
||||
Subproject commit c6ba77aa0eb90a84fb19377706eb6792ec4a42b6
|