Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
p x
SuZhouAvp
Commits
e676465c
Commit
e676465c
authored
Nov 20, 2025
by
p x
Browse files
添加token 保存自动判断逻辑
parent
dc53ac12
Changes
18
Hide whitespace changes
Inline
Side-by-side
app/build.gradle.kts
View file @
e676465c
...
@@ -78,6 +78,7 @@ dependencies {
...
@@ -78,6 +78,7 @@ dependencies {
androidTestImplementation
(
libs
.
androidx
.
junit
)
androidTestImplementation
(
libs
.
androidx
.
junit
)
androidTestImplementation
(
libs
.
androidx
.
espresso
.
core
)
androidTestImplementation
(
libs
.
androidx
.
espresso
.
core
)
implementation
(
"com.tencent:mmkv:2.2.4"
)
implementation
(
"io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.7"
)
implementation
(
"io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.7"
)
implementation
(
"com.jakewharton.rxbinding4:rxbinding:4.0.0"
)
implementation
(
"com.jakewharton.rxbinding4:rxbinding:4.0.0"
)
//屏幕适配
//屏幕适配
...
...
app/src/main/java/com/sd/cavphmi/MyAppcation.kt
View file @
e676465c
package
com.sd.cavphmi
package
com.sd.cavphmi
import
android.app.Application
import
android.app.Application
import
com.tencent.mmkv.MMKV
import
dagger.hilt.android.HiltAndroidApp
import
dagger.hilt.android.HiltAndroidApp
import
me.jessyan.autosize.AutoSizeConfig
import
me.jessyan.autosize.AutoSizeConfig
@HiltAndroidApp
@HiltAndroidApp
class
MyAppcation
:
Application
()
{
class
MyAppcation
:
Application
()
{
companion
object
{
companion
object
{
...
@@ -15,5 +17,7 @@ class MyAppcation : Application() {
...
@@ -15,5 +17,7 @@ class MyAppcation : Application() {
super
.
onCreate
()
super
.
onCreate
()
instance
=
this
instance
=
this
AutoSizeConfig
.
getInstance
().
setLog
(
false
)
AutoSizeConfig
.
getInstance
().
setLog
(
false
)
val
rootDir
=
MMKV
.
initialize
(
this
)
println
(
"----MMKV root: "
+
rootDir
)
}
}
}
}
\ No newline at end of file
app/src/main/java/com/sd/cavphmi/highmap/HighMapApi.kt
View file @
e676465c
...
@@ -72,7 +72,7 @@ object HighMapApi {
...
@@ -72,7 +72,7 @@ object HighMapApi {
notthrough
:
String
=
"2868D8"
,
notthrough
:
String
=
"2868D8"
,
through
:
String
=
"8e959e"
,
through
:
String
=
"8e959e"
,
drawpassed
:
Boolean
=
true
,
drawpassed
:
Boolean
=
true
,
showdistance
:
Int
=
4
5
showdistance
:
Int
=
7
5
)
{
)
{
var
carNavPath
=
CarNavPath
().
apply
{
var
carNavPath
=
CarNavPath
().
apply
{
this
.
lines
=
lines
this
.
lines
=
lines
...
...
app/src/main/java/com/sd/cavphmi/repositorys/AvpDataRepo.kt
View file @
e676465c
...
@@ -99,11 +99,8 @@ class AvpDataRepo @Inject constructor(
...
@@ -99,11 +99,8 @@ class AvpDataRepo @Inject constructor(
* 我们车辆位姿数据用的是 车俩基础信息的id 可绑车辆接口 返回的是 avp车俩id
* 我们车辆位姿数据用的是 车俩基础信息的id 可绑车辆接口 返回的是 avp车俩id
* 所以这里的id 是绑定车辆列表返回的id
* 所以这里的id 是绑定车辆列表返回的id
*/
*/
fun
getAvpStatus
(
url
:
String
,
body
:
RequestBody
?,
listener
:
SSESimpleListener
?)
{
fun
getAvpStatus
(
url
:
String
,
body
:
RequestBody
?,
listener
:
SSESimpleListener
?)
{
simpleSSEClient
.
startSSE
(
simpleSSEClient
.
startSSE
(
url
,
body
,
listener
)
"${MyContants.HOST}/api/avpweb/hmi/monitor/v1/taskStatus"
,
body
,
listener
)
}
}
/**获取车辆位姿****/
/**获取车辆位姿****/
...
...
app/src/main/java/com/sd/cavphmi/ui/LoginActivity.kt
View file @
e676465c
...
@@ -7,6 +7,7 @@ import androidx.appcompat.app.AppCompatActivity
...
@@ -7,6 +7,7 @@ import androidx.appcompat.app.AppCompatActivity
import
com.jakewharton.rxbinding4.view.clicks
import
com.jakewharton.rxbinding4.view.clicks
import
com.sd.cavphmi.databinding.ActivityLoginBinding
import
com.sd.cavphmi.databinding.ActivityLoginBinding
import
com.sd.cavphmi.ui.dialog.SeleBindCarDialog
import
com.sd.cavphmi.ui.dialog.SeleBindCarDialog
import
com.sd.cavphmi.utils.MMKVUtil
import
com.sd.cavphmi.utils.MyContants
import
com.sd.cavphmi.utils.MyContants
import
com.sd.cavphmi.viewmodels.LoginVm
import
com.sd.cavphmi.viewmodels.LoginVm
import
com.sd.cavphmi.viewmodels.MainVm
import
com.sd.cavphmi.viewmodels.MainVm
...
@@ -22,29 +23,39 @@ class LoginActivity : AppCompatActivity() {
...
@@ -22,29 +23,39 @@ class LoginActivity : AppCompatActivity() {
private
val
mainVm
:
MainVm
by
viewModels
()
private
val
mainVm
:
MainVm
by
viewModels
()
private
val
PWD
=
"5803d205ac27f33ea5f53afed4eb81880bee49f06129ea5437c1b940d18da8f1"
private
val
PWD
=
"5803d205ac27f33ea5f53afed4eb81880bee49f06129ea5437c1b940d18da8f1"
private
val
VERIFYCODE
=
285369
//车牌号选择
//车牌号选择
// private lateinit var seleBindCarDialog: SeleBindCarDialog
// private lateinit var seleBindCarDialog: SeleBindCarDialog
private
val
seleBindCarDialog
:
SeleBindCarDialog
by
lazy
{
SeleBindCarDialog
.
newInstance
()
}
private
val
seleBindCarDialog
:
SeleBindCarDialog
by
lazy
{
SeleBindCarDialog
.
newInstance
()
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
super
.
onCreate
(
savedInstanceState
)
binding
=
ActivityLoginBinding
.
inflate
(
layoutInflater
)
binding
=
ActivityLoginBinding
.
inflate
(
layoutInflater
)
setContentView
(
binding
.
root
)
setContentView
(
binding
.
root
)
var
lo
=
binding
.
btLogin
.
clicks
().
throttleFirst
(
1
,
TimeUnit
.
SECONDS
).
subscribe
{
if
(
MMKVUtil
.
token
.
isNotEmpty
())
{
var
user
=
binding
.
etAccount
.
text
.
toString
()
MyContants
.
HTTP_TOKEN
=
MMKVUtil
.
token
var
pwd
=
binding
.
etPwd
.
text
.
toString
()
getBinderCars
()
}
else
{
var
lo
=
binding
.
btLogin
.
clicks
().
throttleFirst
(
1
,
TimeUnit
.
SECONDS
).
subscribe
{
var
user
=
binding
.
etAccount
.
text
.
toString
()
var
pwd
=
binding
.
etPwd
.
text
.
toString
()
// "4CIHV37pDF8sx0ZXYmYah6HSgys7F7ULSMmm39uzppc"
// "4CIHV37pDF8sx0ZXYmYah6HSgys7F7ULSMmm39uzppc"
// var key = "Cusc@itmp-sm4key".toByteArray()
// var key = "Cusc@itmp-sm4key".toByteArray()
// var pp = SM4CryptoHelper.encryptECB(key, pwd.toByteArray())
// var pp = SM4CryptoHelper.encryptECB(key, pwd.toByteArray())
loginVm
.
login
(
user
,
PWD
,
285369
).
observe
(
this
)
{
loginVm
.
login
(
user
,
PWD
,
VERIFYCODE
).
observe
(
this
)
{
//获取可绑定车辆
//获取可绑定车辆
if
(
it
==
1
)
{
if
(
it
==
1
)
{
getBinderCars
()
getBinderCars
()
}
}
}
}
}
}
}
setListener
()
}
private
fun
setListener
()
{
// HTTP获取车位占用情况
// HTTP获取车位占用情况
binding
.
btSpaceinfo
.
setOnClickListener
{
binding
.
btSpaceinfo
.
setOnClickListener
{
mainVm
.
getSpaceInfo
()
mainVm
.
getSpaceInfo
()
...
@@ -53,6 +64,9 @@ class LoginActivity : AppCompatActivity() {
...
@@ -53,6 +64,9 @@ class LoginActivity : AppCompatActivity() {
binding
.
btAvpstatu
.
setOnClickListener
{
binding
.
btAvpstatu
.
setOnClickListener
{
mainVm
.
getAvpStatus
()
mainVm
.
getAvpStatus
()
}
}
binding
.
btCarpos
.
setOnClickListener
{
mainVm
.
subVehicle
()
}
//获取可绑定车辆
//获取可绑定车辆
binding
.
btGetbindcar
.
setOnClickListener
{
binding
.
btGetbindcar
.
setOnClickListener
{
getBinderCars
()
getBinderCars
()
...
@@ -62,9 +76,9 @@ class LoginActivity : AppCompatActivity() {
...
@@ -62,9 +76,9 @@ class LoginActivity : AppCompatActivity() {
startActivity
(
Intent
(
this
,
MainActivity
::
class
.
java
))
startActivity
(
Intent
(
this
,
MainActivity
::
class
.
java
))
finish
()
finish
()
}
}
}
}
//获取可绑定车辆
//获取可绑定车辆
private
fun
getBinderCars
()
{
private
fun
getBinderCars
()
{
// seleBindCarDialog = SeleBindCarDialog.newInstance()
// seleBindCarDialog = SeleBindCarDialog.newInstance()
...
@@ -80,7 +94,7 @@ class LoginActivity : AppCompatActivity() {
...
@@ -80,7 +94,7 @@ class LoginActivity : AppCompatActivity() {
finish
()
finish
()
}
}
}
}
if
(!
seleBindCarDialog
.
isAdded
){
if
(!
seleBindCarDialog
.
isAdded
)
{
seleBindCarDialog
.
showNow
(
supportFragmentManager
,
"seleBindCarDialog"
)
seleBindCarDialog
.
showNow
(
supportFragmentManager
,
"seleBindCarDialog"
)
}
}
// val dialog = CustomListDialog(this, "选择车辆", plateNumbers)
// val dialog = CustomListDialog(this, "选择车辆", plateNumbers)
...
...
app/src/main/java/com/sd/cavphmi/ui/MainActivity.kt
View file @
e676465c
...
@@ -35,11 +35,6 @@ import kotlinx.coroutines.delay
...
@@ -35,11 +35,6 @@ import kotlinx.coroutines.delay
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
/**
* Main activity
*
* @constructor Create empty Main activity
*/
@AndroidEntryPoint
@AndroidEntryPoint
class
MainActivity
:
BaseActivity
<
ActivityMainBinding
,
MyBaseViewModel
>()
{
class
MainActivity
:
BaseActivity
<
ActivityMainBinding
,
MyBaseViewModel
>()
{
...
@@ -71,6 +66,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -71,6 +66,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
super
.
onDestroy
()
super
.
onDestroy
()
mainVm
.
cleanRes
()
binding
.
mapView
.
onDestroy
()
binding
.
mapView
.
onDestroy
()
}
}
...
@@ -85,7 +81,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -85,7 +81,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
// private val avpMapVM: AvpMapVM by viewModels()
// private val avpMapVM: AvpMapVM by viewModels()
//是否进入泊车倒车状态
//是否进入泊车倒车状态
private
var
isReversePark
=
false
//
private var isReversePark = false
//退出应用弹窗
//退出应用弹窗
private
lateinit
var
dialogFragment
:
ExitAppDialog
private
lateinit
var
dialogFragment
:
ExitAppDialog
...
@@ -149,7 +145,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -149,7 +145,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
private
fun
setUpMap
()
{
private
fun
setUpMap
()
{
binding
.
mapView
.
addMapRenderCallback
(
object
:
MapView
.
OnMapReadyListener
{
binding
.
mapView
.
addMapRenderCallback
(
object
:
MapView
.
OnMapReadyListener
{
override
fun
onMapReady
(
mineMap
:
MineMap
?)
{
override
fun
onMapReady
(
mineMap
:
MineMap
?)
{
mainVm
.
mMineMap
=
mineMap
//
mainVm.mMineMap = mineMap
mapOpt
.
mMineMap
=
mineMap
mapOpt
.
mMineMap
=
mineMap
mockVM
.
mMineMap
=
mineMap
mockVM
.
mMineMap
=
mineMap
mineMap
?.
setZoomLevel
(
14f
)
mineMap
?.
setZoomLevel
(
14f
)
...
@@ -163,14 +159,15 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -163,14 +159,15 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
override
fun
getToData
()
{
override
fun
getToData
()
{
//开启websocket
//开启websocket
getTarget
()
getTarget
()
getV2x
()
//开启2个HTTP sse
//开启2个HTTP sse
getCarVehicle
()
getCarVehicle
()
getAvpStatus
()
getAvpStatus
()
//获取车位占用情况
//获取车位占用情况
// getSpaceInfo()
// getSpaceInfo()
}
}
//获取车位占用情况
private
fun
getSpaceInfo
()
{
private
fun
getSpaceInfo
()
{
mainVm
.
getSpaceInfo
().
observe
(
this
)
{
spaceInfo
->
mainVm
.
getSpaceInfo
().
observe
(
this
)
{
spaceInfo
->
//车辆占用情况
//车辆占用情况
...
@@ -207,36 +204,59 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -207,36 +204,59 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
mainVm
.
getAvpStatus
().
observe
(
this
)
{
avpStatu
->
mainVm
.
getAvpStatus
().
observe
(
this
)
{
avpStatu
->
//业务类型
//业务类型
var
businessType
=
avpStatu
.
businessType
//NIL Park Call
var
businessType
=
avpStatu
.
businessType
//NIL Park Call
if
(
businessType
==
AvpContants
.
NIL_TYPE
)
if
(
businessType
==
AvpContants
.
NIL_TYPE
)
{
clearAllEffect
(
businessType
)
return
@observe
return
@observe
}
//业务状态
//业务状态
var
businessStatus
=
avpStatu
.
haulingStageState
var
businessStatus
=
avpStatu
.
haulingStageState
//获取档位
//获取档位
var
gearType
=
avpStatu
.
vehicleContext
.
vehicleDynamic
.
gearType
var
gearType
=
avpStatu
.
vehicleContext
.
vehicleDynamic
.
gearType
//画全局路径
//画全局路径
mapOpt
.
drawAllLines
(
avpStatu
.
drivenDecision
)
mapOpt
.
drawAllLines
(
avpStatu
.
drivenDecision
)
//画终点
mapOpt
.
addEndMarker
(
avpStatu
.
drivenDecision
.
endPoint
)
//生成小地图路线以及二维坐标点
//生成小地图路线以及二维坐标点
mapOpt
.
takeSmallMapLine
(
avpStatu
.
drivenDecision
)
mapOpt
.
takeSmallMapLine
(
avpStatu
.
drivenDecision
)
//
判断在泊车状态下的倒挡绘制倒车路线,改变镜头视角,,判断车是否到达停车
点
//
画终
点
mapOpt
.
drawReversePark
(
businessStatus
,
businessType
,
gearType
,
avpStatu
.
space
)
mapOpt
.
addEndMarker
(
avpStatu
.
drivenDecision
.
endPoint
)
//是否显示车位流光效果
//是否显示车位流光效果
mapOpt
.
showParkLight
(
businessType
,
avpStatu
.
space
)
mapOpt
.
showParkLight
(
businessType
,
avpStatu
.
space
)
//根据AVP任务状态判特效是否关闭
//判断在泊车状态下的倒挡绘制倒车路线,改变镜头视角,,判断车是否到达停车点
mapOpt
.
drawReversePark
(
businessType
,
businessStatus
,
gearType
,
avpStatu
.
space
)
//根据AVP任务状态判停车特效是否关闭
mapOpt
.
showEffectAvpStatu
(
businessType
,
businessStatus
)
mapOpt
.
showEffectAvpStatu
(
businessType
,
businessStatus
)
// 车内视频
// isCarVideo(businessStatus)
}
}
/***是否展示车内视频****/
private
fun
isCarVideo
(
businessStatus
:
String
)
{
if
(
businessStatus
==
AvpContants
.
TRANSPORT_PROGRESS
)
{
getVehDetail
()
}
else
{
// exoPlayFragment.videoUrl = cameraUrl
showVideoFragment
(
false
)
}
}
/**清除所有特效****/
private
fun
clearAllEffect
(
businessType
:
String
)
{
if
(
businessType
==
AvpContants
.
NIL_TYPE
)
{
//消除车位流光特效
HighMapApi
.
parkRoundLight
(
""
)
//消除泊车特效
HighMapApi
.
setParkComplete
(
true
)
//消除全局路径
HighMapApi
.
setCarNavPath
(
emptyList
())
//清除所有绘制
mapOpt
.
clearAllEffect
()
//重置变量
//重置变量
// resetVariable(businessStatus)
resetVariable
(
businessType
)
// 是否关闭车内视频
// if (businessStatus == "CANCELLED" || businessStatus == "COMPLETED" || businessStatus == "FAILED") {
// exoPlayFragment.videoUrl = ""
// showVideoFragment(false)
// }
}
}
}
}
/***重置变量**/
/***重置变量**/
fun
resetVariable
(
businessType
:
String
)
{
private
fun
resetVariable
(
businessType
:
String
)
{
if
(
businessType
==
AvpContants
.
NIL_TYPE
)
{
if
(
businessType
==
AvpContants
.
NIL_TYPE
)
{
mainVm
.
isGetVehDetail
=
false
mainVm
.
isGetVehDetail
=
false
mapOpt
.
smallMapLine
=
false
mapOpt
.
smallMapLine
=
false
...
@@ -268,21 +288,6 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -268,21 +288,6 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
}
}
}
}
private
var
setCamera
=
false
//设置跟车视角
private
fun
setCarCamera
(
c
:
Int
)
{
if
(
setCamera
)
return
if
(
c
==
1
)
{
HighMapApi
.
setCameraAngle
(
30f
)
HighMapApi
.
setCameraDistance
(
6f
)
}
else
if
(
c
==
2
)
{
HighMapApi
.
setCameraAngle
(
90f
)
HighMapApi
.
setCameraDistance
(
80f
)
}
setCamera
=
true
}
//联网车辆感知物
//联网车辆感知物
private
fun
getTarget
()
{
private
fun
getTarget
()
{
...
@@ -324,13 +329,25 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -324,13 +329,25 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
}
}
}
}
//获取车辆详情,取车内摄像头地址打开左下角的车内视频
//设置跟车视角
private
fun
getVehDetail
(
car
:
CarVehicle
?)
{
private
fun
setCarCamera
(
c
:
Int
)
{
if
(
car
?.
businessStatus
.
equals
(
"EXITED"
))
{
if
(
c
==
1
)
{
exoPlayFragment
.
videoUrl
=
""
HighMapApi
.
setCameraAngle
(
30f
)
showVideoFragment
(
false
)
HighMapApi
.
setCameraDistance
(
6f
)
return
}
else
if
(
c
==
2
)
{
HighMapApi
.
setCameraAngle
(
90f
)
HighMapApi
.
setCameraDistance
(
80f
)
}
}
}
//获取车辆详情,取车内摄像头地址打开左下角的车内视频
private
fun
getVehDetail
()
{
// if (car?.businessStatus.equals("EXITED")) {
// exoPlayFragment.videoUrl = ""
// showVideoFragment(false)
// return
// }
mainVm
.
getVehDetail
().
observe
(
this
)
{
vehDetail
->
mainVm
.
getVehDetail
().
observe
(
this
)
{
vehDetail
->
if
(
vehDetail
.
result
.
vehicleInfos
.
count
()
==
0
)
if
(
vehDetail
.
result
.
vehicleInfos
.
count
()
==
0
)
return
@observe
return
@observe
...
@@ -360,7 +377,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -360,7 +377,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
}
}
// HTTP获取车辆详情
// HTTP获取车辆详情
binding
.
btVehinfo
.
setOnClickListener
{
binding
.
btVehinfo
.
setOnClickListener
{
getVehDetail
(
null
)
getVehDetail
()
}
}
//v2x 预警
//v2x 预警
binding
.
btV2x
.
setOnClickListener
{
binding
.
btV2x
.
setOnClickListener
{
...
@@ -390,7 +407,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -390,7 +407,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
//地锁绘制
//地锁绘制
binding
.
btLock
.
setOnClickListener
{
binding
.
btLock
.
setOnClickListener
{
//释放http资源
//释放http资源
SimpleSSEClient
.
instance
.
cancelContect
()
//
SimpleSSEClient.instance.cancelContect()
var
lockStatu
=
LockStatu
().
apply
{
var
lockStatu
=
LockStatu
().
apply
{
code
=
"B021"
code
=
"B021"
...
@@ -435,13 +452,14 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
...
@@ -435,13 +452,14 @@ class MainActivity : BaseActivity<ActivityMainBinding, MyBaseViewModel>() {
ft
.
commit
()
ft
.
commit
()
}
}
override
fun
dispatchKeyEvent
(
event
:
KeyEvent
):
Boolean
{
override
fun
dispatchKeyEvent
(
event
:
KeyEvent
):
Boolean
{
if
((
event
.
getKeyCode
()
==
KeyEvent
.
KEYCODE_BACK
)
||
event
.
getKeyCode
()
==
KeyEvent
.
KEYCODE_HOME
)
{
if
((
event
.
getKeyCode
()
==
KeyEvent
.
KEYCODE_BACK
)
||
event
.
getKeyCode
()
==
KeyEvent
.
KEYCODE_HOME
)
{
// var ft = supportFragmentManager.beginTransaction()
// var ft = supportFragmentManager.beginTransaction()
dialogFragment
=
ExitAppDialog
()
dialogFragment
=
ExitAppDialog
()
dialogFragment
.
onConCan
=
object
:
OnConCan
{
dialogFragment
.
onConCan
=
object
:
OnConCan
{
override
fun
onCon
()
{
override
fun
onCon
()
{
mainVm
.
cleanRes
()
finish
()
finish
()
}
}
...
...
app/src/main/java/com/sd/cavphmi/ui/fragment/UnityFragment.kt
View file @
e676465c
...
@@ -44,11 +44,11 @@ class UnityFragment : Fragment(), IUnityPlayerLifecycleEvents {
...
@@ -44,11 +44,11 @@ class UnityFragment : Fragment(), IUnityPlayerLifecycleEvents {
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
super
.
onDestroy
()
super
.
onDestroy
()
//
try {
try
{
//
this.mUnityPlayer.destroy()
this
.
mUnityPlayer
.
destroy
()
//
} catch (e: Exception) {
}
catch
(
e
:
Exception
)
{
//
//
e.printStackTrace()
//
}
}
}
}
override
fun
onCreateView
(
override
fun
onCreateView
(
...
@@ -108,7 +108,7 @@ class UnityFragment : Fragment(), IUnityPlayerLifecycleEvents {
...
@@ -108,7 +108,7 @@ class UnityFragment : Fragment(), IUnityPlayerLifecycleEvents {
HighMapApi
.
setCameraDistance
(
6f
)
HighMapApi
.
setCameraDistance
(
6f
)
// } catch (e: Exception) {
// } catch (e: Exception) {
// }
// }
},
300
)
},
300
)
}
}
...
...
app/src/main/java/com/sd/cavphmi/utils/MMKVUtil.kt
0 → 100644
View file @
e676465c
package
com.sd.cavphmi.utils
import
com.tencent.mmkv.MMKV
object
MMKVUtil
{
private
var
mmkv
=
MMKV
.
defaultMMKV
()
var
token
:
String
set
(
value
)
{
mmkv
.
encode
(
"token"
,
value
)
}
get
()
{
return
mmkv
.
decodeString
(
"token"
,
""
).
toString
()
}
}
\ No newline at end of file
app/src/main/java/com/sd/cavphmi/utils/MyContants.kt
View file @
e676465c
...
@@ -19,8 +19,8 @@ object MyContants {
...
@@ -19,8 +19,8 @@ object MyContants {
// private val WSTOKEN =
// private val WSTOKEN =
// "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI0MTc0NDY3NGNlOGM0MDZmOTVkZTVkYWYyMWVlOWQ0ZiIsImNyZWF0ZVRpbWUiOjE3NTUwNzYxMTgxMjQsInVzZXJUeXBlIjoxLCJzb3VyY2UiOjAsInB3ZEV4cGlyZWQiOmZhbHNlLCJ1c2VybmFtZSI6ImNoZW5ieTUxIn0.aPYHCxXgQHj4eYGGZnce5MPJCtmMoRcIIHcNXzMMOHE"
// "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI0MTc0NDY3NGNlOGM0MDZmOTVkZTVkYWYyMWVlOWQ0ZiIsImNyZWF0ZVRpbWUiOjE3NTUwNzYxMTgxMjQsInVzZXJUeXBlIjoxLCJzb3VyY2UiOjAsInB3ZEV4cGlyZWQiOmZhbHNlLCJ1c2VybmFtZSI6ImNoZW5ieTUxIn0.aPYHCxXgQHj4eYGGZnce5MPJCtmMoRcIIHcNXzMMOHE"
//登录后拿到Token
aQQ8U2YPfcnrKgdwrIXcLXdtKyaFavYfKlWkNn26fenMLE2fIMPtbt5dSJX3qgM4yHZJ9bY4esSMHRH0FCs1nMte9P5qsaThTe7frFD9RAtWdlyWof4yISiTfkp0ZHiB
//登录后拿到Token
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiJjNzNkNzA4M2I1YjU0OWI0OTBiZWZlMGEyMmVlM2I3OSIsImNyZWF0ZVRpbWUiOjE3NjMxMDg5MzUyMzQsInVzZXJUeXBlIjoxLCJzb3VyY2UiOjAsInB3ZEV4cGlyZWQiOmZhbHNlLCJ1c2VybmFtZSI6ImhtaSJ9.0GJtC7YaduYUHpknLTpvRd4f4876uygPWKgioMvwRtM
var
HTTP_TOKEN
=
"
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiJjNzNkNzA4M2I1YjU0OWI0OTBiZWZlMGEyMmVlM2I3OSIsImNyZWF0ZVRpbWUiOjE3NjMxMDg5MzUyMzQsInVzZXJUeXBlIjoxLCJzb3VyY2UiOjAsInB3ZEV4cGlyZWQiOmZhbHNlLCJ1c2VybmFtZSI6ImhtaSJ9.0GJtC7YaduYUHpknLTpvRd4f4876uygPWKgioMvwRtM
"
var
HTTP_TOKEN
=
""
//仅仅用于测试接口联通性,这里可不传
//仅仅用于测试接口联通性,这里可不传
// private val reType = "51world"
// private val reType = "51world"
...
@@ -32,10 +32,11 @@ object MyContants {
...
@@ -32,10 +32,11 @@ object MyContants {
// if (IS_DEBUG) "172.24.124.130:19443" else "itg-yz.cu-sc.com:19443"
// if (IS_DEBUG) "172.24.124.130:19443" else "itg-yz.cu-sc.com:19443"
// if (IS_DEBUG) "itg-yz.cu-sc.com:13443" else "itg-yz.cu-sc.com:19443"
// if (IS_DEBUG) "itg-yz.cu-sc.com:13443" else "itg-yz.cu-sc.com:19443"
//websocket地址
//websocket地址
token=${HTTP_TOKEN}&
private
var
WSHOST
=
"wss://${BASE_HOST}/wsplus/socket?
token=${HTTP_TOKEN}&
reType=freedo&"
private
var
WSHOST
=
"wss://${BASE_HOST}/wsplus/socket?reType=freedo&"
// if (IS_DEBUG) "wss://${BASE_HOST}/wsplus/socket?token=121&reType=freedo&" else "wss://${BASE_HOST}/wsplus/socket?token=121&reType=freedo&"
// if (IS_DEBUG) "wss://${BASE_HOST}/wsplus/socket?token=121&reType=freedo&" else "wss://${BASE_HOST}/wsplus/socket?token=121&reType=freedo&"
//车辆编号 27
//车辆编号 27
var
VEHICLEID
=
27
var
VEHICLEID
=
27
...
...
app/src/main/java/com/sd/cavphmi/utils/Proj4jCoord.kt
View file @
e676465c
...
@@ -30,7 +30,7 @@ object Proj4jCoord {
...
@@ -30,7 +30,7 @@ object Proj4jCoord {
* @param coordinateSeries 坐标点串 [[经度1, 纬度1], [经度2, 纬度2], ...]
* @param coordinateSeries 坐标点串 [[经度1, 纬度1], [经度2, 纬度2], ...]
* @return 投影结果数组 [投影点经度, 投影点纬度, 最近点索引, 最小距离]
* @return 投影结果数组 [投影点经度, 投影点纬度, 最近点索引, 最小距离]
*/
*/
fun
calculatePointProjection
(
suspend
fun
calculatePointProjection
(
point
:
DoubleArray
,
point
:
DoubleArray
,
coordinateSeries
:
MutableList
<
DoubleArray
>
coordinateSeries
:
MutableList
<
DoubleArray
>
):
DoubleArray
{
):
DoubleArray
{
...
...
app/src/main/java/com/sd/cavphmi/viewmodels/LoginVm.kt
View file @
e676465c
...
@@ -7,6 +7,7 @@ import androidx.lifecycle.viewModelScope
...
@@ -7,6 +7,7 @@ import androidx.lifecycle.viewModelScope
import
com.sd.cavphmi.bean.CarVehicle
import
com.sd.cavphmi.bean.CarVehicle
import
com.sd.cavphmi.net.MyResult
import
com.sd.cavphmi.net.MyResult
import
com.sd.cavphmi.repositorys.AvpDataRepo
import
com.sd.cavphmi.repositorys.AvpDataRepo
import
com.sd.cavphmi.utils.MMKVUtil
import
com.sd.cavphmi.utils.MyContants
import
com.sd.cavphmi.utils.MyContants
import
dagger.hilt.android.lifecycle.HiltViewModel
import
dagger.hilt.android.lifecycle.HiltViewModel
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
...
@@ -42,6 +43,7 @@ class LoginVm @Inject constructor(private var avpDataRepo: AvpDataRepo) : ViewMo
...
@@ -42,6 +43,7 @@ class LoginVm @Inject constructor(private var avpDataRepo: AvpDataRepo) : ViewMo
when
(
result
)
{
when
(
result
)
{
is
MyResult
.
Success
<
String
>
->
{
is
MyResult
.
Success
<
String
>
->
{
MyContants
.
HTTP_TOKEN
=
result
.
data
MyContants
.
HTTP_TOKEN
=
result
.
data
MMKVUtil
.
token
=
MyContants
.
HTTP_TOKEN
// loginData.postValue("true")
// loginData.postValue("true")
lLogin
.
postValue
(
1
)
lLogin
.
postValue
(
1
)
}
}
...
...
app/src/main/java/com/sd/cavphmi/viewmodels/MainVm.kt
View file @
e676465c
...
@@ -32,6 +32,7 @@ import com.sd.cavphmi.net.SimpleSSEClient
...
@@ -32,6 +32,7 @@ import com.sd.cavphmi.net.SimpleSSEClient
import
com.sd.cavphmi.repositorys.AvpDataRepo
import
com.sd.cavphmi.repositorys.AvpDataRepo
import
com.sd.cavphmi.utils.FileIoUtils
import
com.sd.cavphmi.utils.FileIoUtils
import
com.sd.cavphmi.utils.MyContants
import
com.sd.cavphmi.utils.MyContants
import
com.sd.cavphmi.utils.MyContants.HTTP_TOKEN
import
com.sd.cavphmi.utils.MyMapUtils
import
com.sd.cavphmi.utils.MyMapUtils
import
com.sd.cavphmi.utils.ToastHelper
import
com.sd.cavphmi.utils.ToastHelper
import
com.sd.cavphmi.websockets.FeelTargetWSClient
import
com.sd.cavphmi.websockets.FeelTargetWSClient
...
@@ -57,16 +58,20 @@ class MainVm @Inject constructor(
...
@@ -57,16 +58,20 @@ class MainVm @Inject constructor(
private
val
TAG
=
"MainVm"
private
val
TAG
=
"MainVm"
var
mMineMap
:
MineMap
?
=
null
// var mMineMap: MineMap? = null
//用于拼接
private
val
WSTOKEN
=
"&token=${HTTP_TOKEN}"
//网联车辆位姿socket
//网联车辆位姿socket
private
var
vecLocWSClient
=
VecLocWSClient
(
URI
(
MyContants
.
WS_VEH_LOC
))
private
var
vecLocWSClient
=
VecLocWSClient
(
URI
(
MyContants
.
WS_VEH_LOC
))
//感知物socket
//感知物socket
private
var
feelTargetWSClient
=
FeelTargetWSClient
(
URI
(
MyContants
.
WS_FEEL_TARGET
))
private
var
feelTargetWSClient
=
FeelTargetWSClient
(
URI
(
MyContants
.
WS_FEEL_TARGET
+
WSTOKEN
))
//v2x预警socket
//v2x预警socket
private
var
v2xWSClient
=
V2xWSClient
(
URI
(
MyContants
.
WS_V2X
))
private
var
v2xWSClient
=
V2xWSClient
(
URI
(
MyContants
.
WS_V2X
+
WSTOKEN
))
//网联车辆状态
//网联车辆状态
// private var vehStatuWSClient = VehStatuWSClient(URI(MyContants.WS_VEH_STATU))
// private var vehStatuWSClient = VehStatuWSClient(URI(MyContants.WS_VEH_STATU))
...
@@ -114,9 +119,11 @@ class MainVm @Inject constructor(
...
@@ -114,9 +119,11 @@ class MainVm @Inject constructor(
/***清理资源***/
/***清理资源***/
fun
cleanRes
()
{
fun
cleanRes
()
{
//关闭socket连接
sockets
.
forEach
{
sockets
.
forEach
{
it
.
close
()
it
?
.
close
()
}
}
//关闭Http sse 长连接
SimpleSSEClient
.
instance
.
cancelContect
()
SimpleSSEClient
.
instance
.
cancelContect
()
}
}
...
@@ -242,7 +249,7 @@ class MainVm @Inject constructor(
...
@@ -242,7 +249,7 @@ class MainVm @Inject constructor(
mockVM
.
onSubTargetMock
(
targetPre
)
mockVM
.
onSubTargetMock
(
targetPre
)
}
else
{
}
else
{
try
{
try
{
feelTargetWSClient
.
onWebSocketCb
=
object
:
OnWebSocketCb
{
feelTargetWSClient
!!
.
onWebSocketCb
=
object
:
OnWebSocketCb
{
override
fun
onClose
(
override
fun
onClose
(
code
:
Int
,
code
:
Int
,
reason
:
String
?,
reason
:
String
?,
...
@@ -261,8 +268,8 @@ class MainVm @Inject constructor(
...
@@ -261,8 +268,8 @@ class MainVm @Inject constructor(
}
}
}
}
}
}
if
(!
feelTargetWSClient
.
isOpen
)
{
if
(!
feelTargetWSClient
!!
.
isOpen
)
{
feelTargetWSClient
.
connect
()
feelTargetWSClient
?
.
connect
()
}
}
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
...
...
app/src/main/java/com/sd/cavphmi/viewmodels/MapOpt.kt
View file @
e676465c
...
@@ -64,15 +64,15 @@ class MapOpt @Inject constructor(
...
@@ -64,15 +64,15 @@ class MapOpt @Inject constructor(
fun
drawAllLines
(
drivenDecision
:
DrivenDecision
)
{
fun
drawAllLines
(
drivenDecision
:
DrivenDecision
)
{
if
(
drivenDecision
.
trajectory
.
points
.
count
()
>
0
)
{
if
(
drivenDecision
.
trajectory
.
points
.
count
()
>
0
)
{
//全局路径这里只执行一次
//全局路径这里只执行一次
if
(
allLines
==
null
||
allLines
?.
count
()
==
0
)
{
// if (allLines == null || allLines?.count() == 0) {
allLines
=
drivenDecision
.
trajectory
.
points
.
map
{
allLines
=
drivenDecision
.
trajectory
.
points
.
map
{
AllLine
().
apply
{
AllLine
().
apply
{
this
.
lat
=
it
.
latitude
this
.
lat
=
it
.
latitude
this
.
lon
=
it
.
longitude
this
.
lon
=
it
.
longitude
}
}
}
HighMapApi
.
setCarNavPath
(
allLines
!!
,
drawpassed
=
true
,
showdistance
=
200
)
}
}
HighMapApi
.
setCarNavPath
(
allLines
!!
,
drawpassed
=
true
,
showdistance
=
200
)
// }
}
}
var
arrived
=
drivenDecision
.
trajectory
.
arrived
var
arrived
=
drivenDecision
.
trajectory
.
arrived
if
(
arrived
)
{
if
(
arrived
)
{
...
@@ -172,11 +172,12 @@ class MapOpt @Inject constructor(
...
@@ -172,11 +172,12 @@ class MapOpt @Inject constructor(
)
)
// println("----最近线段索引: " + result[2].toInt())
// println("----最近线段索引: " + result[2].toInt())
var
index
=
result
[
2
].
toInt
()
var
index
=
result
[
2
].
toInt
()
var
temps
=
sLatLngs
?.
sliceArray
(
index
..
sLatLngs
!!
.
lastIndex
)
//截取线段
var
nPoints
=
sLatLngs
?.
sliceArray
(
index
..
sLatLngs
!!
.
lastIndex
)
//删除线
deleteSmapLine
()
deleteSmapLine
()
// if (sPolyline == null) {
// if (sPolyline == null) {
sPolyline
=
Polyline
(
temp
s
,
false
)
sPolyline
=
Polyline
(
nPoint
s
,
false
)
sPolyline
?.
setStrokeStyle
(
Overlay
.
StrokeStyle
.
solidWithButt
)
sPolyline
?.
setStrokeStyle
(
Overlay
.
StrokeStyle
.
solidWithButt
)
sPolyline
?.
setWidth
(
8f
)
sPolyline
?.
setWidth
(
8f
)
sPolyline
?.
setColor
(
0xFF00B578
.
toInt
())
sPolyline
?.
setColor
(
0xFF00B578
.
toInt
())
...
@@ -209,10 +210,10 @@ class MapOpt @Inject constructor(
...
@@ -209,10 +210,10 @@ class MapOpt @Inject constructor(
space
:
Space
space
:
Space
)
{
)
{
if
(
businessType
==
AvpContants
.
Park_TYPE
)
{
if
(
businessType
==
AvpContants
.
Park_TYPE
)
{
if
(
businessStatus
==
AvpContants
.
TRANSPORT_COMPLETED
)
{
if
(
businessStatus
==
AvpContants
.
TRANSPORT_COMPLETED
)
{
//到达停车点
HighMapApi
.
setCameraDistance
(
30f
)
HighMapApi
.
setCameraDistance
(
30f
)
HighMapApi
.
setCameraAngle
(
60f
)
HighMapApi
.
setCameraAngle
(
60f
)
}
else
if
(
businessStatus
==
AvpContants
.
PARK_PROGRESS
)
{
}
else
if
(
businessStatus
==
AvpContants
.
PARK_PROGRESS
)
{
//泊车进行中
HighMapApi
.
setCameraDistance
(
20f
)
HighMapApi
.
setCameraDistance
(
20f
)
HighMapApi
.
setCameraAngle
(
90f
)
HighMapApi
.
setCameraAngle
(
90f
)
...
@@ -222,10 +223,16 @@ class MapOpt @Inject constructor(
...
@@ -222,10 +223,16 @@ class MapOpt @Inject constructor(
this
.
code
=
space
.
code
this
.
code
=
space
.
code
}
}
HighMapApi
.
setParkRever
(
reverCar
)
HighMapApi
.
setParkRever
(
reverCar
)
}
else
{
HighMapApi
.
setCameraAngle
(
30f
)
HighMapApi
.
setCameraDistance
(
6f
)
}
}
// if (isReversePark)
// if (isReversePark)
// return
// return
// isReversePark = true
// isReversePark = true
}
else
{
HighMapApi
.
setCameraAngle
(
30f
)
HighMapApi
.
setCameraDistance
(
6f
)
}
}
}
}
...
@@ -244,7 +251,8 @@ class MapOpt @Inject constructor(
...
@@ -244,7 +251,8 @@ class MapOpt @Inject constructor(
fun
showEffectAvpStatu
(
businessType
:
String
,
businessStatus
:
String
)
{
fun
showEffectAvpStatu
(
businessType
:
String
,
businessStatus
:
String
)
{
//到达召,停车点
//到达召,停车点
if
(
businessType
==
AvpContants
.
TRANSPORT_COMPLETED
||
businessType
==
AvpContants
.
TRANSPORT_CANCELED
||
businessType
==
AvpContants
.
TRANSPORT_ABNORMAL
)
{
if
(
businessType
==
AvpContants
.
TRANSPORT_COMPLETED
||
businessType
==
AvpContants
.
TRANSPORT_CANCELED
||
businessType
==
AvpContants
.
TRANSPORT_ABNORMAL
)
{
HighMapApi
.
setCarNavPath
(
emptyList
())
//消除全局路径
//消除全局路径
HighMapApi
.
setCarNavPath
(
emptyList
())
//删除终点mark
//删除终点mark
deleteEndMarker
()
deleteEndMarker
()
//清除小地图路径数据
//清除小地图路径数据
...
@@ -261,14 +269,22 @@ class MapOpt @Inject constructor(
...
@@ -261,14 +269,22 @@ class MapOpt @Inject constructor(
}
}
}
}
/***清除所有绘制**/
fun
clearAllEffect
()
{
//删除终点mark
deleteEndMarker
()
//清除小地图路径数据
clearSmallLineData
()
//删除线
deleteSmapLine
()
}
/**
/**
* 移除终点
* 移除终点
*/
*/
private
fun
deleteEndMarker
()
{
private
fun
deleteEndMarker
()
{
if
(
pEndMarker
!=
null
)
{
if
(
pEndMarker
!=
null
)
{
mMineMap
?.
removeMarker
(
pEndMarker
)
mMineMap
?.
removeMarker
(
pEndMarker
)
pEndMarker
=
null
pEndMarker
=
null
}
}
...
...
app/src/main/java/com/sd/cavphmi/websockets/BaseWsClient.kt
View file @
e676465c
package
com.sd.cavphmi.websockets
package
com.sd.cavphmi.websockets
import
com.sd.cavphmi.utils.MyContants
import
org.java_websocket.client.WebSocketClient
import
org.java_websocket.client.WebSocketClient
import
org.java_websocket.drafts.Draft
import
org.java_websocket.drafts.Draft
import
java.net.Socket
import
java.net.Socket
...
@@ -18,6 +19,9 @@ import javax.net.ssl.X509ExtendedTrustManager
...
@@ -18,6 +19,9 @@ import javax.net.ssl.X509ExtendedTrustManager
if
(
serverUri
.
toString
().
contains
(
"wss://"
))
{
if
(
serverUri
.
toString
().
contains
(
"wss://"
))
{
trustAllHosts
()
trustAllHosts
()
}
}
// if (MyContants.HTTP_TOKEN.isNotEmpty()){
// serverUri.
// }
}
}
constructor
(
serverUri
:
URI
?,
protocolDraft
:
Draft
?)
:
super
(
serverUri
,
protocolDraft
)
constructor
(
serverUri
:
URI
?,
protocolDraft
:
Draft
?)
:
super
(
serverUri
,
protocolDraft
)
...
...
app/src/main/java/com/sd/cavphmi/websockets/FeelTargetWSClient.kt
View file @
e676465c
...
@@ -21,6 +21,7 @@ class FeelTargetWSClient : BaseWsClient {
...
@@ -21,6 +21,7 @@ class FeelTargetWSClient : BaseWsClient {
private
val
TAG
=
"-----FeelTargetWSClient"
private
val
TAG
=
"-----FeelTargetWSClient"
constructor
(
serverUri
:
URI
)
:
super
(
serverUri
){
constructor
(
serverUri
:
URI
)
:
super
(
serverUri
){
var
a
=
0
// if(serverUri.toString().contains("wss://")){
// if(serverUri.toString().contains("wss://")){
// trustAllHosts()
// trustAllHosts()
// }
// }
...
...
app/src/main/java/com/sd/cavphmi/websockets/V2xWSClient.kt
View file @
e676465c
...
@@ -38,7 +38,7 @@ class V2xWSClient : BaseWsClient {
...
@@ -38,7 +38,7 @@ class V2xWSClient : BaseWsClient {
}
}
override
fun
onClose
(
code
:
Int
,
reason
:
String
?,
remote
:
Boolean
)
{
override
fun
onClose
(
code
:
Int
,
reason
:
String
?,
remote
:
Boolean
)
{
//
System.out.println(TAG + " closed with exit code " + code + " additional info: " + reason);
System
.
out
.
println
(
TAG
+
" closed with exit code "
+
code
+
" additional info: "
+
reason
);
}
}
override
fun
onError
(
ex
:
Exception
?)
{
override
fun
onError
(
ex
:
Exception
?)
{
...
...
app/src/main/res/layout/activity_login.xml
View file @
e676465c
...
@@ -132,6 +132,14 @@
...
@@ -132,6 +132,14 @@
android:visibility=
"visible"
android:visibility=
"visible"
android:text=
"获取AVP状态信息"
android:text=
"获取AVP状态信息"
/>
/>
<Button
android:id=
"@+id/bt_carpos"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"visible"
android:text=
"获取车辆位姿"
/>
<Button
<Button
android:id=
"@+id/bt_getbindcar"
android:id=
"@+id/bt_getbindcar"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -146,7 +154,7 @@
...
@@ -146,7 +154,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:text=
"直接到首页"
android:text=
"直接到首页"
android:visibility=
"
gon
e"
/>
android:visibility=
"
visibl
e"
/>
</LinearLayout>
</LinearLayout>
...
...
app/src/main/res/layout/activity_main.xml
View file @
e676465c
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/text_blue"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:paddingVertical=
"5dp"
android:text=
"
网联
车辆位姿"
android:text=
"车辆位姿"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
android:layout_marginLeft=
"5dp"
android:layout_marginLeft=
"5dp"
android:background=
"@color/text_blue"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:paddingVertical=
"5dp"
android:text=
"感知
目标物数据
"
android:text=
"感知
物
"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
<TextView
<TextView
...
@@ -113,6 +113,7 @@
...
@@ -113,6 +113,7 @@
android:background=
"@color/text_blue"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:paddingVertical=
"5dp"
android:text=
"车辆详情"
android:text=
"车辆详情"
android:visibility=
"gone"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
<TextView
<TextView
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment