修改多点列表点击功能
增加导航设置
This commit is contained in:
parent
c9f084d289
commit
1a87a5ca34
@ -53,16 +53,16 @@ class Constant {
|
||||
/**
|
||||
* 当前安装的任务文件
|
||||
*/
|
||||
lateinit var currentInstallTaskFolder:File
|
||||
lateinit var currentInstallTaskFolder: File
|
||||
|
||||
lateinit var currentInstallTaskConfig:RealmConfiguration
|
||||
lateinit var currentInstallTaskConfig: RealmConfiguration
|
||||
|
||||
/**
|
||||
* 当前选择的任务
|
||||
*/
|
||||
lateinit var currentSelectTaskFolder:File
|
||||
lateinit var currentSelectTaskFolder: File
|
||||
|
||||
lateinit var currentSelectTaskConfig:RealmConfiguration
|
||||
lateinit var currentSelectTaskConfig: RealmConfiguration
|
||||
|
||||
/**
|
||||
* 用户附件数据目录
|
||||
@ -90,7 +90,6 @@ class Constant {
|
||||
var INDOOR_IP: String = ""
|
||||
|
||||
|
||||
|
||||
const val DEBUG = true
|
||||
|
||||
/**
|
||||
@ -150,6 +149,21 @@ class Constant {
|
||||
const val SELECT_TASK_ID = "select_task_id" //选中的任务ID
|
||||
|
||||
const val SHARED_SYNC_TASK_LINK_ID = "shared_sync_task_link_id"//利用shared通知任务页面更新
|
||||
|
||||
/**
|
||||
* 偏离距离 单位:米
|
||||
*/
|
||||
const val NAVI_DEVIATION_DISTANCE = "navi_deviation_distance"
|
||||
|
||||
/**
|
||||
* 偏离次数上限
|
||||
*/
|
||||
const val NAVI_DEVIATION_COUNT = "navi_deviation_count"
|
||||
|
||||
/**
|
||||
* 最远显示距离 米
|
||||
*/
|
||||
const val NAVI_FARTHEST_DISPLAY_DISTANCE = "navi_farthest_display_distance"
|
||||
}
|
||||
|
||||
|
||||
|
26
app/src/main/java/com/navinfo/omqs/bean/ScWarningCodeBean.kt
Normal file
26
app/src/main/java/com/navinfo/omqs/bean/ScWarningCodeBean.kt
Normal file
@ -0,0 +1,26 @@
|
||||
package com.navinfo.omqs.bean
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Entity(tableName = "ScWarningCode")
|
||||
@Parcelize
|
||||
data class ScWarningCodeBean(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
var id: Long = 0,
|
||||
/**
|
||||
* code
|
||||
* 编码
|
||||
*/
|
||||
@ColumnInfo("CODE")
|
||||
val code: String = "",
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ColumnInfo("DESCRIBE")
|
||||
val describe: String = "",
|
||||
|
||||
) : Parcelable
|
@ -9,7 +9,7 @@ data class SignBean(
|
||||
//图标ID
|
||||
var iconId: Int = 0,
|
||||
//定位点到目标距离
|
||||
val distance: Int = 0,
|
||||
var distance: Int = 0,
|
||||
//左上图标中的文字
|
||||
val iconText: String = "",
|
||||
//绑定的linkid
|
||||
|
@ -6,17 +6,20 @@ import com.navinfo.collect.library.data.entity.NiLocation
|
||||
import com.navinfo.omqs.bean.OfflineMapCityBean
|
||||
import com.navinfo.omqs.bean.ScProblemTypeBean
|
||||
import com.navinfo.omqs.bean.ScRootCauseAnalysisBean
|
||||
import com.navinfo.omqs.bean.ScWarningCodeBean
|
||||
import com.navinfo.omqs.db.dao.OfflineMapDao
|
||||
import com.navinfo.omqs.db.dao.ScProblemTypeDao
|
||||
import com.navinfo.omqs.db.dao.ScRootCauseAnalysisDao
|
||||
import com.navinfo.omqs.db.dao.ScWarningCodeDao
|
||||
|
||||
@Database(
|
||||
entities = [OfflineMapCityBean::class, ScProblemTypeBean::class, ScRootCauseAnalysisBean::class],
|
||||
version = 1,
|
||||
entities = [OfflineMapCityBean::class, ScProblemTypeBean::class, ScRootCauseAnalysisBean::class, ScWarningCodeBean::class],
|
||||
version = 2,
|
||||
exportSchema = false
|
||||
)
|
||||
abstract class RoomAppDatabase : RoomDatabase() {
|
||||
abstract fun getOfflineMapDao(): OfflineMapDao
|
||||
abstract fun getScProblemTypeDao(): ScProblemTypeDao
|
||||
abstract fun getScRootCauseAnalysisDao(): ScRootCauseAnalysisDao
|
||||
abstract fun getScWarningCodeDao(): ScWarningCodeDao
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.navinfo.omqs.db.dao
|
||||
|
||||
import androidx.room.*
|
||||
import com.navinfo.omqs.bean.ScProblemTypeBean
|
||||
import com.navinfo.omqs.bean.ScWarningCodeBean
|
||||
|
||||
|
||||
@Dao
|
||||
interface ScWarningCodeDao {
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insertList(list: List<ScWarningCodeBean>)
|
||||
|
||||
|
||||
@Query("delete from ScWarningCode")
|
||||
suspend fun deleteAll()
|
||||
|
||||
/**
|
||||
* 更新整个数据库表,由于没有
|
||||
*/
|
||||
@Transaction
|
||||
suspend fun insertOrUpdateList(list: List<ScWarningCodeBean>) {
|
||||
//先删除
|
||||
deleteAll()
|
||||
//后插入
|
||||
insertList(list)
|
||||
}
|
||||
|
||||
@Query("select DESCRIBE from ScWarningCode where CODE=:code")
|
||||
suspend fun findScWarningDescribe(code: String): String?
|
||||
|
||||
}
|
@ -15,5 +15,10 @@ class MetadataUtils {
|
||||
const val TITLE_PROBLEM_LINK = "问题环节"
|
||||
const val TITLE_PROBLEM_CAUSE = "初步分析"
|
||||
}
|
||||
|
||||
object ScWarningCodeTitle{
|
||||
const val TITLE_CODE = "编码"
|
||||
const val TITLE_DESCRIBE = "描述"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,6 @@
|
||||
package com.navinfo.omqs.ui.activity.map
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
@ -11,7 +8,6 @@ import android.speech.tts.TextToSpeech
|
||||
import android.util.Log
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.View.OnLongClickListener
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
@ -20,14 +16,14 @@ import androidx.activity.viewModels
|
||||
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
|
||||
import com.blankj.utilcode.util.ClipboardUtils
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.navinfo.collect.library.data.entity.RenderEntity
|
||||
import com.navinfo.collect.library.data.entity.TaskBean
|
||||
import com.navinfo.collect.library.map.NIMapController
|
||||
import com.navinfo.collect.library.map.handler.MeasureLayerHandler
|
||||
import com.navinfo.omqs.Constant
|
||||
@ -39,7 +35,6 @@ 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.dialog.LoadingDialog
|
||||
import com.navinfo.omqs.ui.fragment.console.ConsoleFragment
|
||||
import com.navinfo.omqs.ui.fragment.itemlist.ItemListFragment
|
||||
import com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapFragment
|
||||
@ -50,9 +45,9 @@ import com.navinfo.omqs.ui.other.BaseToast
|
||||
import com.navinfo.omqs.ui.widget.RecyclerViewSpacesItemDecoration
|
||||
import com.navinfo.omqs.util.FlowEventBus
|
||||
import com.navinfo.omqs.util.NaviStatus
|
||||
import com.navinfo.omqs.util.SignUtil
|
||||
import com.navinfo.omqs.util.SpeakMode
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import org.oscim.core.GeoPoint
|
||||
import org.oscim.renderer.GLViewport
|
||||
@ -61,6 +56,7 @@ import java.math.BigDecimal
|
||||
import java.math.RoundingMode
|
||||
import javax.inject.Inject
|
||||
|
||||
|
||||
/**
|
||||
* 地图主页面
|
||||
*/
|
||||
@ -357,22 +353,28 @@ class MainActivity : BaseActivity() {
|
||||
.replace(R.id.main_activity_sign_more_info_fragment, SignMoreInfoFragment())
|
||||
.commit()
|
||||
}
|
||||
//启动问题记录
|
||||
val signBean = SignBean(
|
||||
iconId = SignUtil.getSignIcon(it),
|
||||
iconText = SignUtil.getSignIconText(it),
|
||||
linkId = it.properties[RenderEntity.Companion.LinkTable.linkPid]
|
||||
?: "",
|
||||
name = SignUtil.getSignNameText(it),
|
||||
bottomRightText = SignUtil.getSignBottomRightText(it),
|
||||
renderEntity = it,
|
||||
isMoreInfo = SignUtil.isMoreInfo(it),
|
||||
index = SignUtil.getRoadInfoIndex(it)
|
||||
)
|
||||
val bundle = Bundle()
|
||||
bundle.putParcelable("SignBean", signBean)
|
||||
bundle.putBoolean("AutoSave", false)
|
||||
rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
// val listener: NavController.OnDestinationChangedListener =
|
||||
// NavController.OnDestinationChangedListener { _, _, _ ->
|
||||
// val bundle = Bundle()
|
||||
// bundle.putParcelable("SignBean", it)
|
||||
// bundle.putBoolean("AutoSave", false)
|
||||
// rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
// }
|
||||
// rightController.addOnDestinationChangedListener(listener)
|
||||
// if(!rightController.navigateUp()) {
|
||||
// val bundle = Bundle()
|
||||
// bundle.putParcelable("SignBean", it)
|
||||
// bundle.putBoolean("AutoSave", false)
|
||||
// rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
// }
|
||||
rightController.navigateUp()
|
||||
lifecycleScope.launch{
|
||||
delay(100)
|
||||
val bundle = Bundle()
|
||||
bundle.putParcelable("SignBean", it)
|
||||
bundle.putBoolean("AutoSave", false)
|
||||
rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.liveIndoorToolsResp.observe(this) {
|
||||
@ -478,7 +480,7 @@ class MainActivity : BaseActivity() {
|
||||
viewModel.liveDataItemList.observe(this) {
|
||||
if (it.isNotEmpty()) {
|
||||
if (leftFragment == null || leftFragment !is ItemListFragment) {
|
||||
leftFragment = ItemListFragment {fragment->
|
||||
leftFragment = ItemListFragment { fragment ->
|
||||
binding.mainActivityLeftFragment.visibility = View.GONE
|
||||
supportFragmentManager.beginTransaction().remove(fragment).commit()
|
||||
leftFragment = null
|
||||
@ -1222,10 +1224,10 @@ class MainActivity : BaseActivity() {
|
||||
/**
|
||||
* 隐藏更多信息面板
|
||||
*/
|
||||
fun backSignMoreInfo(){
|
||||
fun backSignMoreInfo() {
|
||||
val fragment =
|
||||
supportFragmentManager.findFragmentById(R.id.main_activity_sign_more_info_fragment)
|
||||
if(fragment!=null&&!fragment.isHidden){
|
||||
if (fragment != null && !fragment.isHidden) {
|
||||
supportFragmentManager.beginTransaction().remove(fragment).commit()
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.R
|
||||
import com.navinfo.omqs.bean.*
|
||||
import com.navinfo.omqs.db.RealmOperateHelper
|
||||
import com.navinfo.omqs.db.RoomAppDatabase
|
||||
import com.navinfo.omqs.http.NetResult
|
||||
import com.navinfo.omqs.http.NetworkService
|
||||
import com.navinfo.omqs.tools.FileManager
|
||||
@ -56,8 +57,10 @@ import kotlinx.coroutines.flow.flow
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.sync.Mutex
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.locationtech.jts.geom.Envelope
|
||||
import org.locationtech.jts.geom.Geometry
|
||||
import org.locationtech.jts.geom.LineString
|
||||
import org.locationtech.spatial4j.shape.Rectangle
|
||||
import org.oscim.core.GeoPoint
|
||||
import org.oscim.core.MapPosition
|
||||
import org.oscim.map.Map
|
||||
@ -78,7 +81,8 @@ class MainViewModel @Inject constructor(
|
||||
private val traceDataBase: TraceDataBase,
|
||||
private val realmOperateHelper: RealmOperateHelper,
|
||||
private val networkService: NetworkService,
|
||||
private val sharedPreferences: SharedPreferences
|
||||
private val sharedPreferences: SharedPreferences,
|
||||
val roomAppDatabase: RoomAppDatabase
|
||||
) : ViewModel(), SocketServer.OnConnectSinsListener,
|
||||
SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
|
||||
@ -113,7 +117,7 @@ class MainViewModel @Inject constructor(
|
||||
/**
|
||||
* 当前选中的要展示的详细信息的要素
|
||||
*/
|
||||
val liveDataSignMoreInfo = MutableLiveData<RenderEntity>()
|
||||
val liveDataSignMoreInfo = MutableLiveData<SignBean>()
|
||||
|
||||
/**
|
||||
* 捕捉到的itemList
|
||||
@ -379,8 +383,23 @@ class MainViewModel @Inject constructor(
|
||||
naviMutex.lock()
|
||||
getTaskBean()
|
||||
if (currentTaskBean != null && currentTaskBean!!.status == FileManager.Companion.FileDownloadStatus.DONE) {
|
||||
val naviOption = NaviOption(
|
||||
deviationCount = sharedPreferences.getInt(
|
||||
Constant.NAVI_DEVIATION_COUNT,
|
||||
3
|
||||
),
|
||||
deviationDistance = sharedPreferences.getInt(
|
||||
Constant.NAVI_DEVIATION_DISTANCE,
|
||||
15
|
||||
),
|
||||
farthestDisplayDistance = sharedPreferences.getInt(
|
||||
Constant.NAVI_FARTHEST_DISPLAY_DISTANCE,
|
||||
500
|
||||
)
|
||||
)
|
||||
naviEngine = NaviEngine(niMapController = mapController,
|
||||
realmOperateHelper = realmOperateHelper,
|
||||
naviOption = naviOption,
|
||||
callback = object : OnNaviEngineCallbackListener {
|
||||
|
||||
override fun planningPathStatus(status: NaviStatus) {
|
||||
@ -403,20 +422,12 @@ class MainViewModel @Inject constructor(
|
||||
) {
|
||||
val signList = mutableListOf<SignBean>()
|
||||
for (naviRouteItem in list) {
|
||||
|
||||
val signBean = SignBean(
|
||||
iconId = SignUtil.getSignIcon(naviRouteItem.data),
|
||||
iconText = SignUtil.getSignIconText(naviRouteItem.data),
|
||||
linkId = naviRouteItem.linkId,
|
||||
distance = naviRouteItem.distance,
|
||||
name = SignUtil.getSignNameText(naviRouteItem.data),
|
||||
bottomRightText = SignUtil.getSignBottomRightText(
|
||||
naviRouteItem.data
|
||||
),
|
||||
renderEntity = naviRouteItem.data,
|
||||
isMoreInfo = SignUtil.isMoreInfo(naviRouteItem.data),
|
||||
index = SignUtil.getRoadInfoIndex(naviRouteItem.data)
|
||||
val signBean = SignUtil.createSignBean(
|
||||
viewModelScope,
|
||||
roomAppDatabase,
|
||||
naviRouteItem.data
|
||||
)
|
||||
signBean.distance = naviRouteItem.distance
|
||||
signList.add(signBean)
|
||||
}
|
||||
if (route != null) {
|
||||
@ -436,13 +447,36 @@ class MainViewModel @Inject constructor(
|
||||
|
||||
|
||||
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
|
||||
if (key == Constant.SELECT_TASK_ID) {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
naviMutex.lock()
|
||||
naviEngineStatus = 0
|
||||
getTaskBean()
|
||||
initQsRecordData()
|
||||
naviMutex.unlock()
|
||||
when (key) {
|
||||
Constant.SELECT_TASK_ID -> {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
naviMutex.lock()
|
||||
naviEngineStatus = 0
|
||||
getTaskBean()
|
||||
initQsRecordData()
|
||||
naviMutex.unlock()
|
||||
}
|
||||
}
|
||||
Constant.NAVI_DEVIATION_COUNT,
|
||||
Constant.NAVI_FARTHEST_DISPLAY_DISTANCE,
|
||||
Constant.NAVI_DEVIATION_DISTANCE -> {
|
||||
if (naviEngine != null) {
|
||||
val naviOption = NaviOption(
|
||||
deviationCount = sharedPreferences.getInt(
|
||||
Constant.NAVI_DEVIATION_COUNT,
|
||||
3
|
||||
),
|
||||
deviationDistance = sharedPreferences.getInt(
|
||||
Constant.NAVI_DEVIATION_DISTANCE,
|
||||
15
|
||||
),
|
||||
farthestDisplayDistance = sharedPreferences.getInt(
|
||||
Constant.NAVI_FARTHEST_DISPLAY_DISTANCE,
|
||||
500
|
||||
)
|
||||
)
|
||||
naviEngine!!.naviOption = naviOption
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -613,7 +647,8 @@ class MainViewModel @Inject constructor(
|
||||
}
|
||||
}.toList()
|
||||
if (filterResult.size == 1) {
|
||||
liveDataSignMoreInfo.postValue(filterResult[0])
|
||||
val bean = SignUtil.createSignBean(viewModelScope, roomAppDatabase, filterResult[0])
|
||||
liveDataSignMoreInfo.postValue(bean)
|
||||
} else {
|
||||
liveDataItemList.postValue(filterResult)
|
||||
}
|
||||
@ -642,15 +677,10 @@ class MainViewModel @Inject constructor(
|
||||
DataCodeEnum.OMDB_MULTI_DIGITIZED.code,//上下线分离
|
||||
DataCodeEnum.OMDB_CON_ACCESS.code,//全封闭
|
||||
-> {
|
||||
val signBean = SignBean(
|
||||
iconId = SignUtil.getSignIcon(element),
|
||||
iconText = SignUtil.getSignIconText(element),
|
||||
linkId = route.linkId,
|
||||
name = SignUtil.getSignNameText(element),
|
||||
bottomRightText = SignUtil.getSignBottomRightText(element),
|
||||
renderEntity = element,
|
||||
isMoreInfo = SignUtil.isMoreInfo(element),
|
||||
index = SignUtil.getRoadInfoIndex(element)
|
||||
val signBean = SignUtil.createSignBean(
|
||||
viewModelScope,
|
||||
roomAppDatabase,
|
||||
element
|
||||
)
|
||||
if (signBean.iconText != "") {
|
||||
topSignList.add(
|
||||
@ -690,17 +720,11 @@ class MainViewModel @Inject constructor(
|
||||
DataCodeEnum.OMDB_LINK_FORM2_13.code,
|
||||
DataCodeEnum.OMDB_VIADUCT.code,
|
||||
-> {
|
||||
val signBean = SignBean(
|
||||
iconId = SignUtil.getSignIcon(element),
|
||||
iconText = SignUtil.getSignIconText(element),
|
||||
linkId = route.linkId,
|
||||
name = SignUtil.getSignNameText(element),
|
||||
bottomRightText = SignUtil.getSignBottomRightText(element),
|
||||
renderEntity = element,
|
||||
isMoreInfo = SignUtil.isMoreInfo(element),
|
||||
index = SignUtil.getRoadInfoIndex(element),
|
||||
|
||||
)
|
||||
val signBean = SignUtil.createSignBean(
|
||||
viewModelScope,
|
||||
roomAppDatabase,
|
||||
element
|
||||
)
|
||||
topSignList.add(
|
||||
signBean
|
||||
)
|
||||
@ -781,21 +805,15 @@ class MainViewModel @Inject constructor(
|
||||
liveDataRoadName.postValue(element)
|
||||
continue
|
||||
}
|
||||
|
||||
val signBean = SignBean(
|
||||
iconId = SignUtil.getSignIcon(element),
|
||||
iconText = SignUtil.getSignIconText(element),
|
||||
linkId = linkId,
|
||||
name = SignUtil.getSignNameText(element),
|
||||
bottomRightText = SignUtil.getSignBottomRightText(element),
|
||||
renderEntity = element,
|
||||
isMoreInfo = SignUtil.isMoreInfo(element),
|
||||
index = SignUtil.getRoadInfoIndex(element),
|
||||
distance = SignUtil.getDistance(
|
||||
footAndDistance,
|
||||
newLineString,
|
||||
element
|
||||
)
|
||||
val signBean = SignUtil.createSignBean(
|
||||
viewModelScope,
|
||||
roomAppDatabase,
|
||||
element
|
||||
)
|
||||
signBean.distance = SignUtil.getDistance(
|
||||
footAndDistance,
|
||||
newLineString,
|
||||
element
|
||||
)
|
||||
// Log.e("jingo", "捕捉到的数据code ${element.code}")
|
||||
when (element.code) {
|
||||
@ -1176,7 +1194,16 @@ class MainViewModel @Inject constructor(
|
||||
*/
|
||||
|
||||
fun showSignMoreInfo(data: RenderEntity) {
|
||||
liveDataSignMoreInfo.value = data
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
liveDataSignMoreInfo.postValue(
|
||||
SignUtil.createSignBean(
|
||||
viewModelScope,
|
||||
roomAppDatabase,
|
||||
data
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (data.wkt != null) {
|
||||
mapController.markerHandle.removeMarker("moreInfo")
|
||||
mapController.lineHandler.removeLine()
|
||||
@ -1491,11 +1518,19 @@ class MainViewModel @Inject constructor(
|
||||
when (searchEnum) {
|
||||
SearchEnum.LINK -> {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
Log.e("jingo","查询link $msg")
|
||||
Log.e("jingo", "查询link $msg")
|
||||
val link = realmOperateHelper.queryLink(linkPid = msg)
|
||||
if (link != null) {
|
||||
Log.e("jingo","查询link ${link.geometry}")
|
||||
withContext(Dispatchers.Main){
|
||||
Log.e("jingo", "查询link ${link.geometry}")
|
||||
val lineString = GeometryTools.createGeometry(link.geometry)
|
||||
val envelope = lineString.envelopeInternal
|
||||
withContext(Dispatchers.Main) {
|
||||
mapController.animationHandler.animateToBox(
|
||||
envelope.maxX,
|
||||
envelope.maxY,
|
||||
envelope.minX,
|
||||
envelope.minY
|
||||
)
|
||||
mapController.lineHandler.showLine(link.geometry)
|
||||
dialog.dismiss()
|
||||
}
|
||||
@ -1513,15 +1548,13 @@ class MainViewModel @Inject constructor(
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
val qsRecordBean = realmOperateHelper.queryQcRecordBean(markId = msg)
|
||||
if (qsRecordBean != null) {
|
||||
qsRecordBean?.let { l ->
|
||||
val naviController =
|
||||
(mapController.mMapView.context as Activity).findNavController(R.id.main_activity_right_fragment)
|
||||
val bundle = Bundle()
|
||||
bundle.putString("QsId", l.id)
|
||||
naviController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
ToastUtils.showLong(l.classType)
|
||||
dialog.dismiss()
|
||||
}
|
||||
val naviController =
|
||||
(mapController.mMapView.context as Activity).findNavController(R.id.main_activity_right_fragment)
|
||||
val bundle = Bundle()
|
||||
bundle.putString("QsId", qsRecordBean.id)
|
||||
naviController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
ToastUtils.showLong(qsRecordBean.classType)
|
||||
dialog.dismiss()
|
||||
} else {
|
||||
withContext(Dispatchers.Main) {
|
||||
Toast.makeText(
|
||||
|
@ -18,6 +18,7 @@ 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.layermanager.LayerManagerFragment
|
||||
import com.navinfo.omqs.ui.fragment.navi.NaviSettingFragment
|
||||
import com.navinfo.omqs.ui.fragment.personalcenter.PersonalCenterFragment
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@ -290,7 +291,23 @@ class ConsoleFragment : BaseFragment(), OnClickListener {
|
||||
* 路径规划
|
||||
*/
|
||||
R.id.console_route_bg, R.id.console_route_icon_bg -> {
|
||||
Toast.makeText(requireContext(), "功能开发中", Toast.LENGTH_SHORT).show()
|
||||
// Toast.makeText(requireContext(), "功能开发中", Toast.LENGTH_SHORT).show()
|
||||
if (sceneFlag) {
|
||||
mFragment = NaviSettingFragment {
|
||||
TransitionManager.go(aScene, aTransition)
|
||||
}
|
||||
sceneFlag = false
|
||||
TransitionManager.go(bScene, bTransition)
|
||||
} else {
|
||||
if (mFragment !is NaviSettingFragment) {
|
||||
mFragment = NaviSettingFragment {
|
||||
TransitionManager.go(aScene, aTransition)
|
||||
}
|
||||
childFragmentManager.beginTransaction().replace(fragmentId, mFragment!!)
|
||||
.commit()
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
|
@ -0,0 +1,59 @@
|
||||
package com.navinfo.omqs.ui.fragment.navi
|
||||
|
||||
import android.content.SharedPreferences
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.databinding.FragmentNaviSettingBinding
|
||||
import com.navinfo.omqs.ui.fragment.BaseFragment
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
class NaviSettingFragment(private var backListener: (() -> Unit?)? = null) : BaseFragment() {
|
||||
private var _binding: FragmentNaviSettingBinding? = null
|
||||
|
||||
@Inject
|
||||
lateinit var sharedPreferences: SharedPreferences
|
||||
|
||||
private val binding get() = _binding!!
|
||||
private val viewModel by viewModels<NaviSettingViewModel>()
|
||||
|
||||
// private val viewModel by lazy { viewModels<EvaluationResultViewModel>().value}
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
_binding = FragmentNaviSettingBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
binding.offCount.setValue(sharedPreferences.getInt(Constant.NAVI_DEVIATION_COUNT,3))
|
||||
binding.offDistance.setValue(sharedPreferences.getInt(Constant.NAVI_DEVIATION_DISTANCE,15))
|
||||
binding.tipsDistance.setValue(sharedPreferences.getInt(Constant.NAVI_FARTHEST_DISPLAY_DISTANCE,500))
|
||||
|
||||
binding.imgConfirm.setOnClickListener{
|
||||
sharedPreferences.edit()
|
||||
.putInt(Constant.NAVI_DEVIATION_DISTANCE,binding.offDistance.getValue())
|
||||
.putInt(Constant.NAVI_DEVIATION_COUNT,binding.offCount.getValue())
|
||||
.putInt(Constant.NAVI_FARTHEST_DISPLAY_DISTANCE,binding.tipsDistance.getValue())
|
||||
.commit()
|
||||
backListener?.invoke()
|
||||
}
|
||||
|
||||
binding.imgBack.setOnClickListener {
|
||||
backListener?.invoke()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
_binding = null
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.navinfo.omqs.ui.fragment.navi
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
|
||||
class NaviSettingViewModel : ViewModel() {
|
||||
}
|
@ -14,11 +14,11 @@ import com.google.gson.Gson
|
||||
import com.navinfo.collect.library.data.entity.*
|
||||
import com.navinfo.omqs.bean.ScProblemTypeBean
|
||||
import com.navinfo.omqs.bean.ScRootCauseAnalysisBean
|
||||
import com.navinfo.omqs.bean.ScWarningCodeBean
|
||||
import com.navinfo.omqs.db.ImportOMDBHelper
|
||||
import com.navinfo.omqs.db.RealmOperateHelper
|
||||
import com.navinfo.omqs.db.RoomAppDatabase
|
||||
import com.navinfo.omqs.tools.MetadataUtils.Companion.ScProblemTypeTitle
|
||||
import com.navinfo.omqs.tools.MetadataUtils.Companion.ScRootCauseAnalysisTitle
|
||||
import com.navinfo.omqs.tools.MetadataUtils
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
@ -134,7 +134,7 @@ class PersonalCenterViewModel @Inject constructor(
|
||||
hadSpeedLimitVarFile, gson.toJson(hadSpeedlimitVar) + "\r", true
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ZipUtils.zipFiles(
|
||||
@ -154,7 +154,7 @@ class PersonalCenterViewModel @Inject constructor(
|
||||
/**
|
||||
* 导入OMDB数据
|
||||
* */
|
||||
fun importOMDBData(importOMDBHelper: ImportOMDBHelper, task: TaskBean? =null) {
|
||||
fun importOMDBData(importOMDBHelper: ImportOMDBHelper, task: TaskBean? = null) {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
Log.d("OMQSApplication", "开始导入数据")
|
||||
if (task != null) {
|
||||
@ -192,35 +192,45 @@ class PersonalCenterViewModel @Inject constructor(
|
||||
var phenomenonIndex = -1
|
||||
var problemLinkIndex = -1
|
||||
var problemCauseIndex = -1
|
||||
var warningCodeIndex = -1
|
||||
var warningDescribeIndex = -1
|
||||
val list = mutableListOf<ScProblemTypeBean>()
|
||||
val list2 = mutableListOf<ScRootCauseAnalysisBean>()
|
||||
val list3 = mutableListOf<ScWarningCodeBean>()
|
||||
while (bufferedReader.readLine()?.also { line = it } != null) { // 处理 CSV 文件中的每一行数据
|
||||
val data =
|
||||
line!!.split(",".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
if (index == 0) {
|
||||
for (i in data.indices) {
|
||||
when (data[i]) {
|
||||
ScProblemTypeTitle.TITLE_ELEMENT_TYPE -> {
|
||||
MetadataUtils.Companion.ScProblemTypeTitle.TITLE_ELEMENT_TYPE -> {
|
||||
elementTypeIndex = i
|
||||
}
|
||||
ScProblemTypeTitle.TITLE_ELEMENT_CODE -> {
|
||||
MetadataUtils.Companion.ScProblemTypeTitle.TITLE_ELEMENT_CODE -> {
|
||||
elementCodeIndex = i
|
||||
}
|
||||
ScProblemTypeTitle.TITLE_CLASS_TYPE -> {
|
||||
MetadataUtils.Companion.ScProblemTypeTitle.TITLE_CLASS_TYPE -> {
|
||||
classTypeIndex = i
|
||||
}
|
||||
ScProblemTypeTitle.TITLE_PROBLEM_TYPE -> {
|
||||
MetadataUtils.Companion.ScProblemTypeTitle.TITLE_PROBLEM_TYPE -> {
|
||||
problemTypeIndex = i
|
||||
}
|
||||
ScProblemTypeTitle.TITLE_PHENOMENON -> {
|
||||
MetadataUtils.Companion.ScProblemTypeTitle.TITLE_PHENOMENON -> {
|
||||
phenomenonIndex = i
|
||||
}
|
||||
ScRootCauseAnalysisTitle.TITLE_PROBLEM_LINK -> {
|
||||
MetadataUtils.Companion.ScRootCauseAnalysisTitle.TITLE_PROBLEM_LINK -> {
|
||||
problemLinkIndex = i
|
||||
}
|
||||
ScRootCauseAnalysisTitle.TITLE_PROBLEM_CAUSE -> {
|
||||
MetadataUtils.Companion.ScRootCauseAnalysisTitle.TITLE_PROBLEM_CAUSE -> {
|
||||
problemCauseIndex = i
|
||||
}
|
||||
MetadataUtils.Companion.ScWarningCodeTitle.TITLE_CODE -> {
|
||||
warningCodeIndex = i
|
||||
}
|
||||
MetadataUtils.Companion.ScWarningCodeTitle.TITLE_DESCRIBE -> {
|
||||
warningDescribeIndex = i
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -244,6 +254,12 @@ class PersonalCenterViewModel @Inject constructor(
|
||||
problemCause = data[problemCauseIndex],
|
||||
)
|
||||
list2.add(bean)
|
||||
} else if (warningDescribeIndex > -1 && warningCodeIndex > -1) {
|
||||
val bean = ScWarningCodeBean(
|
||||
code = data[warningCodeIndex],
|
||||
describe = data[warningDescribeIndex]
|
||||
)
|
||||
list3.add(bean)
|
||||
} else {
|
||||
liveDataMessage.postValue("元数据表规格不正确,请仔细核对")
|
||||
break
|
||||
@ -259,49 +275,14 @@ class PersonalCenterViewModel @Inject constructor(
|
||||
liveDataMessage.postValue("元数据表导入成功")
|
||||
roomAppDatabase.getScRootCauseAnalysisDao().insertOrUpdateList(list2)
|
||||
}
|
||||
if(list3.isNotEmpty()){
|
||||
liveDataMessage.postValue("标牌对照表导入成功")
|
||||
roomAppDatabase.getScWarningCodeDao().insertList(list3)
|
||||
}
|
||||
|
||||
bufferedReader.close()
|
||||
inputStreamReader.close()
|
||||
inputStream.close()
|
||||
// val workbook = WorkbookFactory.create(inputStream)
|
||||
// //获取所有sheet
|
||||
// val sheet1 = workbook.getSheet("SC_PROBLEM_TYPE")
|
||||
// sheet1?.let {
|
||||
// val rowCount: Int = it.physicalNumberOfRows // 获取行数
|
||||
// val list = mutableListOf<ScProblemTypeBean>()
|
||||
// for (i in 1 until rowCount) {
|
||||
// val row: Row = it.getRow(i) // 获取行
|
||||
//// val cellCount: Int = row.physicalNumberOfCells // 获取列数
|
||||
// val bean = ScProblemTypeBean(
|
||||
// elementType = row.getCell(0).stringCellValue,
|
||||
// elementCode = row.getCell(1).numericCellValue.toString(),
|
||||
// classType = row.getCell(2).stringCellValue,
|
||||
// problemType = row.getCell(3).stringCellValue,
|
||||
// phenomenon = row.getCell(4).stringCellValue
|
||||
// )
|
||||
// list.add(bean)
|
||||
// Log.e("jingo", bean.toString())
|
||||
// }
|
||||
// roomAppDatabase.getScProblemTypeDao().insertOrUpdateList(list)
|
||||
// }
|
||||
// val sheet2 = workbook.getSheet("SC_ROOT_CAUSE_ANALYSIS")
|
||||
// sheet2?.let {
|
||||
// val rowCount: Int = it.physicalNumberOfRows // 获取行数
|
||||
// val list = mutableListOf<ScRootCauseAnalysisBean>()
|
||||
// for (i in 1 until rowCount) {
|
||||
// val row: Row = it.getRow(i) // 获取行
|
||||
// val cellCount: Int = row.physicalNumberOfCells // 获取列数
|
||||
// if (cellCount == 2) {
|
||||
// val bean = ScRootCauseAnalysisBean()
|
||||
// bean.problemLink = row.getCell(0).stringCellValue
|
||||
// bean.problemCause = row.getCell(1).stringCellValue
|
||||
// list.add(bean)
|
||||
// Log.e("jingo", bean.toString())
|
||||
// }
|
||||
// }
|
||||
// roomAppDatabase.getScRootCauseAnalysisDao().insertOrUpdateList(list)
|
||||
// }
|
||||
// workbook.close()
|
||||
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
|
@ -5,6 +5,7 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.navigation.findNavController
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.navinfo.collect.library.data.entity.RenderEntity
|
||||
@ -56,29 +57,29 @@ class SignMoreInfoFragment : BaseFragment() {
|
||||
drawableLeft, null, drawableRight, null
|
||||
)
|
||||
|
||||
when (it.code) {
|
||||
when (it.renderEntity.code) {
|
||||
//道路名
|
||||
DataCodeEnum.OMDB_LINK_NAME.code -> {
|
||||
val adapter = RoadNameInfoAdapter()
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
adapter.refreshData(SignUtil.getRoadNameList(it))
|
||||
adapter.refreshData(SignUtil.getRoadNameList(it.renderEntity))
|
||||
}
|
||||
//车道边界类型
|
||||
DataCodeEnum.OMDB_LANE_MARK_BOUNDARYTYPE.code -> {
|
||||
val adapter = LaneBoundaryAdapter()
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
adapter.refreshData(SignUtil.getLaneBoundaryTypeInfo(it))
|
||||
adapter.refreshData(SignUtil.getLaneBoundaryTypeInfo(it.renderEntity))
|
||||
}
|
||||
DataCodeEnum.OMDB_INTERSECTION.code -> {
|
||||
val adapter = LaneBoundaryAdapter()
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
adapter.refreshData(SignUtil.getIntersectionInfo(it))
|
||||
adapter.refreshData(SignUtil.getIntersectionInfo(it.renderEntity))
|
||||
}
|
||||
//收费站
|
||||
DataCodeEnum.OMDB_TOLLGATE.code -> {
|
||||
val adapter = LaneBoundaryAdapter()
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
adapter.refreshData(SignUtil.getTollgateInfo(it))
|
||||
adapter.refreshData(SignUtil.getTollgateInfo(it.renderEntity))
|
||||
}
|
||||
//电子眼
|
||||
DataCodeEnum.OMDB_ELECTRONICEYE.code -> {
|
||||
@ -94,10 +95,10 @@ class SignMoreInfoFragment : BaseFragment() {
|
||||
)
|
||||
val adapter = TwoItemAdapter()
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
adapter.refreshData(SignUtil.getElectronicEyeMoreInfo(it))
|
||||
adapter.refreshData(SignUtil.getElectronicEyeMoreInfo(it.renderEntity))
|
||||
}
|
||||
else -> {
|
||||
val adapter = SignUtil.getMoreInfoAdapter(it)
|
||||
val adapter = SignUtil.getMoreInfoAdapter(it.renderEntity)
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
}
|
||||
}
|
||||
@ -117,18 +118,7 @@ class SignMoreInfoFragment : BaseFragment() {
|
||||
val bundle = Bundle()
|
||||
val element = viewModel.liveDataSignMoreInfo.value
|
||||
if (element != null) {
|
||||
val signBean = SignBean(
|
||||
iconId = SignUtil.getSignIcon(element),
|
||||
iconText = SignUtil.getSignIconText(element),
|
||||
linkId = element.properties[RenderEntity.Companion.LinkTable.linkPid]
|
||||
?: "",
|
||||
name = SignUtil.getSignNameText(element),
|
||||
bottomRightText = SignUtil.getSignBottomRightText(element),
|
||||
renderEntity = element,
|
||||
isMoreInfo = SignUtil.isMoreInfo(element),
|
||||
index = SignUtil.getRoadInfoIndex(element)
|
||||
)
|
||||
bundle.putParcelable("SignBean", signBean)
|
||||
bundle.putParcelable("SignBean", element)
|
||||
bundle.putBoolean("AutoSave", false)
|
||||
rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
}
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.navinfo.omqs.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.EditText
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import com.navinfo.omqs.R
|
||||
|
||||
class AddAndSubEditView @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
|
||||
) : LinearLayout(context, attrs, defStyleAttr), View.OnClickListener {
|
||||
|
||||
private var valueText: Int = 0
|
||||
private val editView: EditText
|
||||
|
||||
init {
|
||||
val inflater = LayoutInflater.from(context)
|
||||
val view = inflater.inflate(R.layout.view_add_del_editview, this)
|
||||
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.AddAndSubEditView)
|
||||
valueText = typedArray.getInteger(R.styleable.AddAndSubEditView_textValue, 0)
|
||||
editView = view.findViewById(R.id.edit_text)
|
||||
editView.setText("$valueText")
|
||||
editView.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable) {
|
||||
try {
|
||||
valueText = s.toString().toInt()
|
||||
} catch (e: java.lang.Exception) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
view.findViewById<ImageView>(R.id.del).setOnClickListener(this)
|
||||
view.findViewById<ImageView>(R.id.add).setOnClickListener(this)
|
||||
}
|
||||
|
||||
override fun onClick(v: View) {
|
||||
when (v.id) {
|
||||
R.id.del -> {
|
||||
valueText--
|
||||
editView.setText("$valueText")
|
||||
}
|
||||
R.id.add -> {
|
||||
valueText++
|
||||
editView.setText("$valueText")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun getValue(): Int {
|
||||
return valueText
|
||||
}
|
||||
|
||||
fun setValue(value:Int) {
|
||||
valueText = value
|
||||
editView.setText("$valueText")
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ import org.locationtech.jts.geom.LineString
|
||||
import org.locationtech.jts.geom.Point
|
||||
import org.oscim.core.GeoPoint
|
||||
|
||||
public interface OnNaviEngineCallbackListener {
|
||||
interface OnNaviEngineCallbackListener {
|
||||
fun planningPathStatus(code: NaviStatus)
|
||||
|
||||
// fun planningPathError(errorCode: NaviStatus, errorMessage: String)
|
||||
@ -33,10 +33,33 @@ enum class NaviStatus {
|
||||
}
|
||||
|
||||
|
||||
data class NaviOption(
|
||||
/**
|
||||
* 偏离距离 单位:米
|
||||
*/
|
||||
var deviationDistance: Int = 15,
|
||||
|
||||
/**
|
||||
* 偏离次数上限
|
||||
*/
|
||||
var deviationCount: Int = 5,
|
||||
|
||||
// /**
|
||||
// * 局部匹配时,没走过的路段还记录1000米
|
||||
// */
|
||||
// var nextRouteDistance: Int = 1000,
|
||||
|
||||
/**
|
||||
* 最远显示距离 米
|
||||
*/
|
||||
var farthestDisplayDistance: Int = 550,
|
||||
)
|
||||
|
||||
class NaviEngine(
|
||||
private val niMapController: NIMapController,
|
||||
private val realmOperateHelper: RealmOperateHelper,
|
||||
val callback: OnNaviEngineCallbackListener
|
||||
val callback: OnNaviEngineCallbackListener,
|
||||
var naviOption: NaviOption = NaviOption()
|
||||
) {
|
||||
|
||||
/**
|
||||
@ -64,30 +87,30 @@ class NaviEngine(
|
||||
DataCodeEnum.OMDB_LINK_NAME.name,
|
||||
)
|
||||
|
||||
/**
|
||||
* 偏离距离 单位:米
|
||||
*/
|
||||
private val DEVIATION_DISTANCE = 15
|
||||
|
||||
/**
|
||||
* 偏离次数上限
|
||||
*/
|
||||
private val DEVIATION_COUNT = 5
|
||||
|
||||
// /**
|
||||
// * 偏离距离 单位:米
|
||||
// */
|
||||
// private val DEVIATION_DISTANCE = 15
|
||||
//
|
||||
// /**
|
||||
// * 偏离次数上限
|
||||
// */
|
||||
// private val DEVIATION_COUNT = 5
|
||||
//
|
||||
/**
|
||||
* 局部匹配时,走过的路段还记录100米
|
||||
*/
|
||||
private val PASSED_ROUTE_DISTANCE = 100
|
||||
|
||||
/**
|
||||
* 局部匹配时,没走过的路段还记录1000米
|
||||
*/
|
||||
private val NEXT_ROUTE_DISTANCE = 1000
|
||||
|
||||
/**
|
||||
* 最远显示距离 米
|
||||
*/
|
||||
private val FARTHEST_DISPLAY_DISTANCE = 550
|
||||
//
|
||||
// /**
|
||||
// * 局部匹配时,没走过的路段还记录1000米
|
||||
// */
|
||||
// private val NEXT_ROUTE_DISTANCE = 1000
|
||||
//
|
||||
// /**
|
||||
// * 最远显示距离 米
|
||||
// */
|
||||
// private val FARTHEST_DISPLAY_DISTANCE = 550
|
||||
|
||||
/**
|
||||
* 绑定失败次数
|
||||
@ -144,32 +167,34 @@ class NaviEngine(
|
||||
}
|
||||
set(value) {
|
||||
val list = mutableListOf<GeoPoint>()
|
||||
val fRoute = value[0]
|
||||
//第一个路段加入
|
||||
list.addAll(fRoute.pointList)
|
||||
//起始点位置
|
||||
fRoute.startIndexInPath = 0
|
||||
var startPoint = fRoute.pointList.size - 1
|
||||
//终点位置
|
||||
fRoute.endIndexIntPath = startPoint
|
||||
fRoute.indexInPath = 0
|
||||
if (value.size > 0) {
|
||||
val fRoute = value[0]
|
||||
//第一个路段加入
|
||||
list.addAll(fRoute.pointList)
|
||||
//起始点位置
|
||||
fRoute.startIndexInPath = 0
|
||||
var startPoint = fRoute.pointList.size - 1
|
||||
//终点位置
|
||||
fRoute.endIndexIntPath = startPoint
|
||||
fRoute.indexInPath = 0
|
||||
|
||||
for (i in 1 until value.size) {
|
||||
val route = value[i]
|
||||
route.startIndexInPath = startPoint
|
||||
if (route.itemList != null) {
|
||||
for (naviItem in route.itemList!!) {
|
||||
naviItem.index += startPoint
|
||||
for (i in 1 until value.size) {
|
||||
val route = value[i]
|
||||
route.startIndexInPath = startPoint
|
||||
if (route.itemList != null) {
|
||||
for (naviItem in route.itemList!!) {
|
||||
naviItem.index += startPoint
|
||||
}
|
||||
}
|
||||
startPoint += route.pointList.size - 1
|
||||
route.endIndexIntPath = startPoint
|
||||
route.indexInPath = i
|
||||
val list2 = ArrayList(route.pointList.toList())
|
||||
list2.removeAt(0)
|
||||
list.addAll(list2)
|
||||
}
|
||||
startPoint += route.pointList.size - 1
|
||||
route.endIndexIntPath = startPoint
|
||||
route.indexInPath = i
|
||||
val list2 = ArrayList(route.pointList.toList())
|
||||
list2.removeAt(0)
|
||||
list.addAll(list2)
|
||||
geometry = GeometryTools.createLineString(list)
|
||||
}
|
||||
geometry = GeometryTools.createLineString(list)
|
||||
field = value
|
||||
}
|
||||
|
||||
@ -257,73 +282,78 @@ class NaviEngine(
|
||||
break
|
||||
}
|
||||
}
|
||||
if (routeStart != null) {
|
||||
var sNode = ""
|
||||
var eNode = ""
|
||||
//如果sNode,eNode是顺方向,geometry 不动,否则反转
|
||||
if (routeStart.direct == 3) {
|
||||
routeStart.pointList.reverse()
|
||||
sNode = routeStart.eNode
|
||||
eNode = routeStart.sNode
|
||||
} else {
|
||||
sNode = routeStart.sNode
|
||||
eNode = routeStart.eNode
|
||||
|
||||
if (routeStart == null) {
|
||||
routeStart = tempRouteList[0]
|
||||
tempRouteList.removeAt(0)
|
||||
}
|
||||
|
||||
var sNode = ""
|
||||
var eNode = ""
|
||||
//如果sNode,eNode是顺方向,geometry 不动,否则反转
|
||||
if (routeStart.direct == 3) {
|
||||
routeStart.pointList.reverse()
|
||||
sNode = routeStart.eNode
|
||||
eNode = routeStart.sNode
|
||||
} else {
|
||||
sNode = routeStart.sNode
|
||||
eNode = routeStart.eNode
|
||||
}
|
||||
newRouteList.add(routeStart)
|
||||
var bBreak = true
|
||||
while (bBreak) {
|
||||
//先找其实link的后续link
|
||||
var bHasNext = false
|
||||
for (route in tempRouteList) {
|
||||
//如果是link 的e 对下个link的s,方向不用动,否则下个link的geometry反转
|
||||
if (route.sNode != "" && eNode == route.sNode) {
|
||||
newRouteList.add(route)
|
||||
tempRouteList.remove(route)
|
||||
eNode = route.eNode
|
||||
bHasNext = true
|
||||
break
|
||||
} else if (route.eNode != "" && eNode == route.eNode) {
|
||||
route.pointList.reverse()
|
||||
newRouteList.add(route)
|
||||
tempRouteList.remove(route)
|
||||
eNode = route.sNode
|
||||
bHasNext = true
|
||||
break
|
||||
}
|
||||
}
|
||||
newRouteList.add(routeStart)
|
||||
var bBreak = true
|
||||
while (bBreak) {
|
||||
//先找其实link的后续link
|
||||
var bHasNext = false
|
||||
for (route in tempRouteList) {
|
||||
//如果是link 的e 对下个link的s,方向不用动,否则下个link的geometry反转
|
||||
if (route.sNode != "" && eNode == route.sNode) {
|
||||
newRouteList.add(route)
|
||||
tempRouteList.remove(route)
|
||||
eNode = route.eNode
|
||||
bHasNext = true
|
||||
break
|
||||
} else if (route.eNode != "" && eNode == route.eNode) {
|
||||
route.pointList.reverse()
|
||||
newRouteList.add(route)
|
||||
tempRouteList.remove(route)
|
||||
eNode = route.sNode
|
||||
bHasNext = true
|
||||
break
|
||||
}
|
||||
//先找其实link的起始link
|
||||
var bHasLast = false
|
||||
for (route in tempRouteList) {
|
||||
//如果是link 的s 对上个link的e,方向不用动,否则下个link的geometry反转
|
||||
if (route.eNode != "" && sNode == route.eNode) {
|
||||
newRouteList.add(0, route)
|
||||
tempRouteList.remove(route)
|
||||
sNode = route.sNode
|
||||
bHasLast = true
|
||||
break
|
||||
} else if (route.sNode != "" && sNode == route.sNode) {
|
||||
route.pointList.reverse()
|
||||
newRouteList.add(0, route)
|
||||
tempRouteList.remove(route)
|
||||
sNode = route.eNode
|
||||
bHasLast = true
|
||||
break
|
||||
}
|
||||
//先找其实link的起始link
|
||||
var bHasLast = false
|
||||
for (route in tempRouteList) {
|
||||
//如果是link 的s 对上个link的e,方向不用动,否则下个link的geometry反转
|
||||
if (route.eNode != "" && sNode == route.eNode) {
|
||||
newRouteList.add(0, route)
|
||||
tempRouteList.remove(route)
|
||||
sNode = route.sNode
|
||||
bHasLast = true
|
||||
break
|
||||
} else if (route.sNode != "" && sNode == route.sNode) {
|
||||
route.pointList.reverse()
|
||||
newRouteList.add(0, route)
|
||||
tempRouteList.remove(route)
|
||||
sNode = route.eNode
|
||||
bHasLast = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if (tempRouteList.size == 0) {
|
||||
}
|
||||
if (tempRouteList.size == 0) {
|
||||
bBreak = false
|
||||
} else {
|
||||
if (!bHasLast && !bHasNext) {
|
||||
bBreak = false
|
||||
} else {
|
||||
if (!bHasLast && !bHasNext) {
|
||||
bBreak = false
|
||||
callback.planningPathStatus(
|
||||
NaviStatus.NAVI_STATUS_PATH_ERROR_BLOCKED
|
||||
)
|
||||
realm.close()
|
||||
return
|
||||
}
|
||||
callback.planningPathStatus(
|
||||
NaviStatus.NAVI_STATUS_PATH_ERROR_BLOCKED
|
||||
)
|
||||
realm.close()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val itemMap: MutableMap<GeoPoint, MutableList<RenderEntity>> = mutableMapOf()
|
||||
//查询每根link上的关联要素
|
||||
for (route in newRouteList) {
|
||||
@ -415,7 +445,7 @@ class NaviEngine(
|
||||
val pointPairDistance = GeometryTools.pointToLineDistance(point, geometry)
|
||||
//定义垂线
|
||||
//定位点到垂足距离不超过30米
|
||||
if (pointPairDistance.getMeterDistance() < DEVIATION_DISTANCE) {
|
||||
if (pointPairDistance.getMeterDistance() < naviOption.deviationDistance) {
|
||||
footIndex = pointPairDistance.footIndex
|
||||
// Log.e(
|
||||
// "jingo",
|
||||
@ -453,7 +483,7 @@ class NaviEngine(
|
||||
val pointPairDistance = GeometryTools.pointToLineDistance(point, tempGeometry)
|
||||
//定义垂线
|
||||
//定位点到垂足距离不超过30米
|
||||
if (pointPairDistance.getMeterDistance() < DEVIATION_DISTANCE) {
|
||||
if (pointPairDistance.getMeterDistance() < naviOption.deviationDistance) {
|
||||
footIndex = pointPairDistance.footIndex + tempRoutList[0].startIndexInPath
|
||||
// Log.e("jingo", "局部 当前绑定到了整条路线的第 $footIndex 点")
|
||||
val lastRouteIndex = routeIndex
|
||||
@ -531,7 +561,7 @@ class NaviEngine(
|
||||
tempIndex = rightI + 1
|
||||
distance = GeometryTools.getDistance(disPoints)
|
||||
// Log.e("jingo", "我的距离${distance} 下一个${tempIndex} 位置${rightI}")
|
||||
if (distance < FARTHEST_DISPLAY_DISTANCE && distance > -1) {
|
||||
if (distance < naviOption.farthestDisplayDistance && distance > -1) {
|
||||
naviItem.distance = distance.toInt()
|
||||
bindingItemList.add(naviItem)
|
||||
} else {
|
||||
@ -539,7 +569,7 @@ class NaviEngine(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (distance >= FARTHEST_DISPLAY_DISTANCE) {
|
||||
if (distance >= naviOption.farthestDisplayDistance) {
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -570,7 +600,8 @@ class NaviEngine(
|
||||
distance = 0.0
|
||||
//没走过的路是否有1000米
|
||||
var j = routeIndex + 1
|
||||
while (j < routeList.size && distance < NEXT_ROUTE_DISTANCE) {
|
||||
val nextDis = naviOption.farthestDisplayDistance + 500
|
||||
while (j < routeList.size && distance < nextDis) {
|
||||
val routeT = routeList[j]
|
||||
tempRoutList.add(routeT)
|
||||
distance += routeT.length
|
||||
@ -596,7 +627,7 @@ class NaviEngine(
|
||||
*/
|
||||
private fun deviationUp() {
|
||||
errorCount++
|
||||
if (errorCount >= DEVIATION_COUNT) {
|
||||
if (errorCount >= naviOption.deviationCount) {
|
||||
callback.planningPathStatus(NaviStatus.NAVI_STATUS_DISTANCE_OFF)
|
||||
bindingReset()
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.omqs.util
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.navinfo.collect.library.data.entity.RenderEntity
|
||||
import com.navinfo.collect.library.enums.DataCodeEnum
|
||||
import com.navinfo.collect.library.utils.FootAndDistance
|
||||
@ -8,10 +9,15 @@ import com.navinfo.collect.library.utils.GeometryTools
|
||||
import com.navinfo.omqs.R
|
||||
import com.navinfo.omqs.bean.RoadNameBean
|
||||
import com.navinfo.omqs.bean.SignBean
|
||||
import com.navinfo.omqs.db.RoomAppDatabase
|
||||
import com.navinfo.omqs.ui.activity.map.LaneInfoItem
|
||||
import com.navinfo.omqs.ui.fragment.signMoreInfo.LaneBoundaryItem
|
||||
import com.navinfo.omqs.ui.fragment.signMoreInfo.TwoItemAdapter
|
||||
import com.navinfo.omqs.ui.fragment.signMoreInfo.TwoItemAdapterItem
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import org.locationtech.jts.geom.Geometry
|
||||
@ -23,6 +29,28 @@ import java.lang.reflect.Field
|
||||
class SignUtil {
|
||||
companion object {
|
||||
|
||||
suspend fun createSignBean(
|
||||
scope: CoroutineScope,
|
||||
roomAppDatabase: RoomAppDatabase,
|
||||
element: RenderEntity
|
||||
): SignBean {
|
||||
return SignBean(
|
||||
iconId = getSignIcon(element),
|
||||
iconText = getSignIconText(element),
|
||||
linkId = element.properties[RenderEntity.Companion.LinkTable.linkPid]
|
||||
?: "",
|
||||
name = getSignNameText(element),
|
||||
bottomRightText = getSignBottomRightText(
|
||||
scope,
|
||||
roomAppDatabase,
|
||||
element
|
||||
),
|
||||
renderEntity = element,
|
||||
isMoreInfo = isMoreInfo(element),
|
||||
index = getRoadInfoIndex(element)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取面板上的文字
|
||||
*/
|
||||
@ -203,7 +231,6 @@ class SignUtil {
|
||||
} catch (e: Throwable) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//道路方向
|
||||
DataCodeEnum.OMDB_LINK_DIRECT.code -> {
|
||||
@ -799,9 +826,25 @@ class SignUtil {
|
||||
/**
|
||||
* 右下角文字
|
||||
*/
|
||||
fun getSignBottomRightText(data: RenderEntity): String {
|
||||
suspend fun getSignBottomRightText(
|
||||
scope: CoroutineScope,
|
||||
roomAppDatabase: RoomAppDatabase,
|
||||
data: RenderEntity
|
||||
): String {
|
||||
return when (data.code) {
|
||||
|
||||
//警示信息
|
||||
DataCodeEnum.OMDB_WARNINGSIGN.code -> {
|
||||
var describe = ""
|
||||
val job = scope.launch(Dispatchers.IO) {
|
||||
val typeCode = data.properties["typeCode"]
|
||||
if (typeCode != null) {
|
||||
describe = roomAppDatabase.getScWarningCodeDao().findScWarningDescribe(typeCode).toString()
|
||||
}
|
||||
}
|
||||
job.join()
|
||||
Log.e("jingo", "警示信息 类型: $describe")
|
||||
return describe
|
||||
}
|
||||
//条件点限速
|
||||
DataCodeEnum.OMDB_SPEEDLIMIT_COND.code -> getConditionLimitText(data)
|
||||
//电子眼
|
||||
|
124
app/src/main/res/layout/fragment_navi_setting.xml
Normal file
124
app/src/main/res/layout/fragment_navi_setting.xml
Normal file
@ -0,0 +1,124 @@
|
||||
<?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"
|
||||
style="@style/left_pannel_title_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_left_pannel"
|
||||
android:padding="5dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_back"
|
||||
style="@style/btn_round"
|
||||
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_keyboard_arrow_left_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_confirm"
|
||||
style="@style/btn_round"
|
||||
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="@id/img_back"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/img_back" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="导航设置"
|
||||
android:textColor="@color/highFontColor"
|
||||
android:textSize="@dimen/left_pannel_title_font"
|
||||
app:layout_constraintBottom_toBottomOf="@id/img_back"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/img_back" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
style="@style/default_card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/img_back">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left|center_vertical"
|
||||
android:textSize="16sp"
|
||||
android:text="偏离距离(米)" />
|
||||
|
||||
<com.navinfo.omqs.ui.widget.AddAndSubEditView
|
||||
android:id="@+id/off_distance"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
app:textValue="15" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left|center_vertical"
|
||||
android:textSize="16sp"
|
||||
android:text="提示范围(米)" />
|
||||
|
||||
<com.navinfo.omqs.ui.widget.AddAndSubEditView
|
||||
android:id="@+id/tips_distance"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
app:textValue="500" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left|center_vertical"
|
||||
android:textSize="16sp"
|
||||
android:text="偏离次数" />
|
||||
|
||||
<com.navinfo.omqs.ui.widget.AddAndSubEditView
|
||||
android:id="@+id/off_count"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
app:textValue="3" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
34
app/src/main/res/layout/view_add_del_editview.xml
Normal file
34
app/src/main/res/layout/view_add_del_editview.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/del"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_bg_blue_bg_4_radius"
|
||||
android:src="@drawable/ic_baseline_keyboard_arrow_left_24" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:focusable="false"
|
||||
android:gravity="center"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="3dp"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_bg_blue_bg_4_radius"
|
||||
android:src="@drawable/ic_baseline_keyboard_arrow_right_24" />
|
||||
</LinearLayout>
|
@ -44,4 +44,12 @@
|
||||
tools:layout="@layout/fragment_qs_record_list">
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/QsNaviSettingFragment"
|
||||
android:name="com.navinfo.omqs.ui.fragment.navi.NaviSettingFragment"
|
||||
android:label="导航设置"
|
||||
tools:layout="@layout/fragment_navi_setting">
|
||||
|
||||
</fragment>
|
||||
</navigation>
|
@ -15,4 +15,13 @@
|
||||
<attr name="deleteBtnWidth" format="float"/>
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
<declare-styleable name="CanvasView">
|
||||
<attr name="isSavePoint" format="boolean" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="AddAndSubEditView">
|
||||
<attr name="textValue" format="integer" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<declare-styleable name="CanvasView">
|
||||
<attr name="isSavePoint" format="boolean" />
|
||||
</declare-styleable>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user