fix: 合并冲突
@@ -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>
|
||||
|
||||