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
a8ab6745
Commit
a8ab6745
authored
Nov 06, 2025
by
p x
Browse files
添加居中提示字的逻辑
parent
4e15cda9
Changes
37
Show whitespace changes
Inline
Side-by-side
app/src/main/java/com/sd/cavphmi/utils/Proj4jCoord.kt
View file @
a8ab6745
...
...
@@ -13,6 +13,8 @@ import kotlin.math.sqrt
/**坐标投影转换工具***/
object
Proj4jCoord
{
private
val
crsFactory
:
CRSFactory
=
CRSFactory
()
//返回结果
private
val
resultArray
=
doubleArrayOf
(
0.0
,
0.0
,
0.0
,
0.0
)
// 定义坐标系参数
private
const
val
WGS84_PARAMS
=
"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
...
...
@@ -50,13 +52,13 @@ object Proj4jCoord {
val
projectedPoint
=
doubleArrayOf
(
dstCoord
.
x
,
dstCoord
.
y
)
// 转换坐标点串到CGCS2000坐标系
var
projectedSeries
=
mutableListOf
<
DoubleArray
>()
for
(
coord
in
coordinateSeries
)
{
projectedSeries
.
add
(
doubleArrayOf
(
coord
[
0
],
coord
[
1
]))
}
//
var projectedSeries = mutableListOf<DoubleArray>()
//
for (coord in coordinateSeries) {
//
projectedSeries.add(doubleArrayOf(coord[0], coord[1]))
//
}
// 计算点到线串的最短距离和投影点
return
findNearestProjection
(
projectedPoint
,
projec
te
d
Series
)
return
findNearestProjection
(
projectedPoint
,
coordina
teSeries
)
}
catch
(
e
:
Proj4jException
)
{
e
.
printStackTrace
()
return
doubleArrayOf
(
0.0
,
0.0
,
-
1.0
,
-
1.0
)
...
...
@@ -90,13 +92,19 @@ object Proj4jCoord {
projectionPoint
=
currentProjection
}
}
return
doubleArrayOf
(
projectionPoint
[
0
],
projectionPoint
[
1
],
nearestIndex
.
toDouble
(),
minDistance
)
resultArray
.
set
(
0
,
projectionPoint
[
0
])
resultArray
.
set
(
1
,
projectionPoint
[
1
])
resultArray
.
set
(
2
,
nearestIndex
.
toDouble
())
resultArray
.
set
(
3
,
minDistance
)
return
resultArray
// return doubleArrayOf(
// projectionPoint[0],
// projectionPoint[1],
// nearestIndex.toDouble(),
// minDistance
// )
}
...
...
app/src/main/java/com/sd/cavphmi/viewmodels/CarPanelVM.kt
View file @
a8ab6745
...
...
@@ -32,7 +32,7 @@ class CarPanelVM @Inject constructor() : MyBaseViewModel() {
// //航向角
carPanelBean
.
heading
.
set
(
bean
.
heading
.
toInt
())
//档位
//
carPanelBean.tapPos.set(
vehicleInfo.tapPos.toInt()
)
carPanelBean
.
tapPos
.
set
(
bean
.
gear
)
//驾驶模式
// carPanelBean.driveMode.set(vehicleInfo.driveMode.toInt())
//剩余电量
...
...
@@ -42,31 +42,11 @@ class CarPanelVM @Inject constructor() : MyBaseViewModel() {
// var a = 0
}
/**设置档位类型*****/
fun
setGearType
(
gearType
:
String
)
{
when
(
gearType
)
{
"PARK"
->
{
carPanelBean
.
tapPos
.
set
(
GearStatus
.
P
)
}
"REVERSE"
->
{
carPanelBean
.
tapPos
.
set
(
GearStatus
.
R
)
}
"NEUTRAL"
->
{
carPanelBean
.
tapPos
.
set
(
GearStatus
.
N
)
}
"DRIVE"
->
{
carPanelBean
.
tapPos
.
set
(
GearStatus
.
D
)
}
}
}
fun
mock
()
{
changeMockHeading
()
changeMockDriveMode
()
changeMockLight
()
//
changeMockDriveMode()
//
changeMockLight()
changeMockPro
()
changeMockGear
()
changeMockSpeed
()
...
...
@@ -75,16 +55,16 @@ class CarPanelVM @Inject constructor() : MyBaseViewModel() {
private
fun
changeMockHeading
()
{
viewModelScope
.
launch
{
var
list
=
mutableListOf
<
Floa
t
>()
var
list
=
mutableListOf
<
In
t
>()
var
ramdom
=
Random
(
360
)
for
(
i
in
1
..
360
)
{
list
.
add
(
ramdom
.
nextInt
(
360
)
.
toFloat
()
)
list
.
add
(
ramdom
.
nextInt
(
360
))
}
list
.
forEach
{
withContext
(
Dispatchers
.
IO
)
{
delay
(
1100
)
carPanelBean
.
heading
.
set
(
it
)
delay
(
600
)
}
// carPanelBean.heading.set(it)
}
}
}
...
...
@@ -132,13 +112,13 @@ class CarPanelVM @Inject constructor() : MyBaseViewModel() {
//模拟档位
private
fun
changeMockGear
()
{
var
list
=
listOf
(
3
1
,
3
2
,
3
3
,
34
)
var
list
=
listOf
(
0
,
1
,
2
,
3
,
7
)
viewModelScope
.
launch
{
for
(
i
in
1
..
100
)
{
withContext
(
Dispatchers
.
IO
)
{
delay
(
1000
)
}
var
p
=
i
%
4
var
p
=
i
%
5
carPanelBean
.
tapPos
.
set
(
list
.
get
(
p
))
}
}
...
...
app/src/main/java/com/sd/cavphmi/viewmodels/MainVm.kt
View file @
a8ab6745
...
...
@@ -159,7 +159,6 @@ class MainVm @Inject constructor(
FileIoUtils
.
writeToFile
(
str
,
"space_info.txt"
)
spaceInfo
.
postValue
(
result
.
data
)
}
else
->
{
}
}
...
...
@@ -257,7 +256,10 @@ class MainVm @Inject constructor(
feelTargetWSClient
.
onDataCb
=
object
:
FeelTargetWSClient
.
OnDataCb
{
override
fun
onMsg
(
str
:
String
)
{
viewModelScope
.
launch
{
// FileIoUtils.writeToFile(str, "PerTarget.txt")
//下载到sd卡下面的DownLoad文件夹下面
if
(!
str
.
isNullOrEmpty
()){
FileIoUtils
.
writeToFile
(
str
,
"PerTarget.txt"
)
}
var
bean
=
gson
.
fromJson
(
str
,
PerceptionBean
::
class
.
java
)
targetPre
.
postValue
(
bean
)
}
...
...
app/src/main/java/com/sd/cavphmi/viewmodels/MapOpt.kt
View file @
a8ab6745
...
...
@@ -56,16 +56,21 @@ class MapOpt @Inject constructor(
//是否生成小地图线
private
var
smallMapLine
=
false
//全局路径
private
var
allLines
:
List
<
AllLine
>?
=
null
//画全局路径
fun
drawAllLines
(
drivenDecision
:
DrivenDecision
)
{
if
(
drivenDecision
.
trajectory
.
points
.
count
()
>
0
)
{
var
lines
=
drivenDecision
.
trajectory
.
points
.
map
{
if
(
allLines
==
null
||
allLines
?.
count
()
==
0
)
{
allLines
=
drivenDecision
.
trajectory
.
points
.
map
{
AllLine
().
apply
{
this
.
lat
=
it
.
latitude
this
.
lon
=
it
.
longitude
}
}
HighMapApi
.
setCarNavPath
(
lines
,
drawpassed
=
true
,
showdistance
=
200
)
HighMapApi
.
setCarNavPath
(
allLines
!!
,
drawpassed
=
true
,
showdistance
=
200
)
}
}
var
arrived
=
drivenDecision
.
trajectory
.
arrived
if
(
arrived
)
{
...
...
@@ -111,6 +116,7 @@ class MapOpt @Inject constructor(
return
if
(
drivenDecision
.
trajectory
.
points
.
count
()
>
0
)
{
smallMapLine
=
true
//转换小弟提路径点
sLatLngs
=
drivenDecision
.
trajectory
.
points
.
map
{
Tools
.
latLngToPoint
(
LatLng
(
it
.
latitude
,
it
.
longitude
))
}.
toTypedArray
()
...
...
@@ -127,16 +133,17 @@ class MapOpt @Inject constructor(
fun
upSmallMapLine
(
carVehicleItem
:
CarVehicleItem
)
{
deleteSmapLine
()
viewModelScope
.
launch
(
Dispatchers
.
Default
)
{
var
latlng
=
LatLng
(
carVehicleItem
.
latitude
,
carVehicleItem
.
longitude
)
if
(
coordinateSeries
.
count
()
>
0
)
{
//当前车辆位置
var
latlng
=
LatLng
(
carVehicleItem
.
latitude
,
carVehicleItem
.
longitude
)
//投影计算结果
var
result
=
Proj4jCoord
.
calculatePointProjection
(
doubleArrayOf
(
latlng
.
latitude
,
latlng
.
longitude
),
coordinateSeries
)
println
(
"----最近线段索引: "
+
result
[
2
].
toInt
())
//
println("----最近线段索引: " + result[2].toInt())
var
index
=
result
[
2
].
toInt
()
var
temps
=
sLatLngs
?.
sliceArray
(
index
..
sLatLngs
!!
.
lastIndex
)
var
temps
=
sLatLngs
?.
sliceArray
(
index
..
sLatLngs
!!
.
lastIndex
)
deleteSmapLine
()
if
(
sLatLngs
==
null
)
{
...
...
@@ -155,12 +162,14 @@ class MapOpt @Inject constructor(
fun
addEndMarker
(
endPoint
:
EndPoint
)
{
//删除终点marker
deleteEndMarker
()
if
(
pEndMarker
==
null
)
{
var
mEndPoint
=
LatLng
(
endPoint
.
latitude
,
endPoint
.
longitude
)
val
end_icon
=
BitmapFactory
.
decodeResource
(
context
.
resources
,
R
.
drawable
.
plan_end
)
pEndMarker
=
mMineMap
?.
addMarker
(
MarkerOptions
().
zLevel
(
7
).
position
(
mEndPoint
).
bitmap
(
end_icon
)
)
}
}
//判断在泊车状态下的倒挡绘制倒车路线
...
...
@@ -184,7 +193,7 @@ class MapOpt @Inject constructor(
if
(
businessType
==
"Park"
)
{
HighMapApi
.
parkRoundLight
(
space
.
code
)
}
else
{
HighMapApi
.
parkRoundLight
(
""
)
//
HighMapApi.parkRoundLight("")
}
}
...
...
app/src/main/java/com/sd/cavphmi/websockets/FeelTargetWSClient.kt
View file @
a8ab6745
...
...
@@ -38,7 +38,7 @@ class FeelTargetWSClient : WebSocketClient {
}
override
fun
onMessage
(
message
:
String
?)
{
println
(
TAG
+
" : "
+
message
)
//
println(TAG + " : " + message)
if
(
message
.
isNullOrEmpty
())
return
onDataCb
?.
onMsg
(
message
)
...
...
app/src/main/java/com/sd/cavphmi/websockets/V2xWSClient.kt
View file @
a8ab6745
...
...
@@ -22,7 +22,7 @@ class V2xWSClient : WebSocketClient {
override
fun
onOpen
(
handshakedata
:
ServerHandshake
?)
{
// send("Hello, it is me. Mario :)")
//
System.out.
println(TAG + "
new connection opened
")
println
(
TAG
+
"
------------Hello, v2x预警
"
)
}
override
fun
onMessage
(
message
:
String
?)
{
...
...
app/src/main/res/drawable/rect_black_14.xml
0 → 100644
View file @
a8ab6745
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"14dp"
/>
<solid
android:color=
"@color/black"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/rect_no_col_10.xml
View file @
a8ab6745
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"10dp"
/>
android:shape=
"rectangle"
>
<corners
android:radius=
"20dp"
/>
<solid
android:color=
"@android:color/transparent"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_login.xml
View file @
a8ab6745
...
...
@@ -16,6 +16,7 @@
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:visibility=
"gone"
android:background=
"@color/white"
>
...
...
@@ -62,7 +63,7 @@
android:background=
"@null"
android:hint=
"请输入账号"
android:maxLines=
"1"
android:text=
"
18501971666
"
android:text=
"
hmi
"
android:textColor=
"@color/text_black"
android:textSize=
"10sp"
/>
...
...
@@ -93,7 +94,7 @@
android:hint=
"请输入密码"
android:inputType=
"textPassword"
android:maxLines=
"1"
android:text=
"
vUO2dStZDhbd*88FfT84
"
android:text=
"
8ax@Gke#13297567890
"
android:textColor=
"@color/text_black"
android:textSize=
"10sp"
/>
...
...
@@ -114,12 +115,7 @@
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<Button
android:id=
"@+id/bt_vehinfo"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"获取车辆信息"
android:visibility=
"visible"
/>
<Button
android:id=
"@+id/bt_spaceinfo"
...
...
app/src/main/res/layout/activity_main.xml
View file @
a8ab6745
<?xml version="1.0" encoding="utf-8"?>
<layout
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"
>
<data>
...
...
@@ -28,20 +29,31 @@
<!-- 车辆仪表-->
<FrameLayout
android:id=
"@+id/map_car_pan"
android:layout_width=
"
@dimen/map_left_top_widge
t"
android:layout_width=
"
wrap_conten
t"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_10"
/>
<!-- 距离提示-->
<fragment
android:id=
"@+id/distantTipFragment"
class=
"com.sd.cavphmi.ui.fragment.DistantTipFragment"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_alignTop=
"@id/map_car_pan"
/>
<!-- 预警气泡 从别的醒目扣过来的,就复用这个吧-->
<fragment
android:id=
"@+id/earlyWarnFragment"
android:name
=
"com.sd.cavphmi.ui.fragment.WarnFragment"
class
=
"com.sd.cavphmi.ui.fragment.WarnFragment"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/distantTipFragment"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"
5
dp"
/>
android:layout_marginTop=
"
8
dp"
/>
<LinearLayout
...
...
@@ -59,31 +71,40 @@
android:layout_height=
"wrap_content"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:text
Color=
"@color/white
"
android:text
=
"网联车辆位姿
"
/>
android:text
=
"网联车辆位姿
"
android:text
Color=
"@color/white
"
/>
<TextView
android:id=
"@+id/bt_target"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:layout_marginLeft=
"5dp"
android:textColor=
"@color/white"
android:text=
"感知目标物数据"
/>
android:text=
"感知目标物数据"
android:textColor=
"@color/white"
/>
<TextView
android:id=
"@+id/bt_v2x"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:layout_marginLeft=
"5dp"
android:textColor=
"@color/white"
android:text=
"V2X预警开始"
/>
android:text=
"V2X预警开始"
android:textColor=
"@color/white"
/>
<TextView
android:id=
"@+id/bt_vehinfo"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:text=
"车辆详情"
/>
<TextView
android:id=
"@+id/bt_status"
android:layout_width=
"wrap_content"
...
...
@@ -96,11 +117,11 @@
android:id=
"@+id/bt_avpStatu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:textColor=
"@color/white"
android:layout_marginLeft=
"5dp"
android:text=
"AVP状态"
/>
android:text=
"AVP状态"
android:textColor=
"@color/white"
/>
<TextView
android:id=
"@+id/bt_parkround"
...
...
@@ -132,21 +153,21 @@
android:id=
"@+id/warn_car"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:layout_marginLeft=
"5dp"
android:textColor=
"@color/white"
android:text=
"预警车"
/>
android:text=
"预警车"
android:textColor=
"@color/white"
/>
<TextView
android:id=
"@+id/warn_peo"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:background=
"@color/text_blue"
android:paddingVertical=
"5dp"
android:textColor=
"@color/white"
android:layout_marginLeft=
"5dp"
android:text=
"预警人"
/>
android:text=
"预警人"
android:textColor=
"@color/white"
/>
</LinearLayout>
...
...
@@ -159,12 +180,12 @@
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"10dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/rect_no_col_10"
/>
android:clipChildren=
"true"
/>
<FrameLayout
android:layout_width=
"@dimen/small_map_width"
android:layout_height=
"@dimen/small_map_height"
android:id=
"@+id/small_f_layout"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_alignParentBottom=
"true"
android:layout_marginEnd=
"@dimen/dp_10"
...
...
app/src/main/res/layout/fragment_car_panel.xml
View file @
a8ab6745
...
...
@@ -18,15 +18,16 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/rect_white_10"
android:elevation=
"1dp"
android:orientation=
"vertical"
android:paddingHorizontal=
"10dp"
android:paddingTop=
"5dp"
android:paddingBottom=
"5dp"
>
android:background=
"@drawable/rect_white_10"
android:paddingBottom=
"8dp"
>
<TextView
android:id=
"@+id/tv_speed"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
...
...
@@ -35,7 +36,6 @@
android:paddingBottom=
"0dp"
android:textSize=
"50sp"
android:textStyle=
"bold"
android:text=
"37"
app:showSpeed=
"@{cpBean.speed}"
tools:text=
"60"
/>
...
...
@@ -47,14 +47,14 @@
android:id=
"@+id/lin_dang"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_align
Top
=
"@+id/tv_kmh"
android:layout_align
Bottom
=
"@+id/tv_kmh"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_p"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:tag=
"
33
"
android:tag=
"
1
"
android:text=
"P"
android:textColor=
"@color/text_grey"
android:textSize=
"@dimen/sp_14"
...
...
@@ -66,7 +66,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:tag=
"3
2
"
android:tag=
"3"
android:text=
"R"
android:textColor=
"@color/text_grey"
android:textSize=
"@dimen/sp_14"
...
...
@@ -78,7 +78,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:tag=
"
34
"
android:tag=
"
0
"
android:text=
"N"
android:textColor=
"@color/text_grey"
android:textSize=
"@dimen/sp_14"
...
...
@@ -90,7 +90,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:tag=
"
31
"
android:tag=
"
2
"
android:text=
"D"
android:textColor=
"@color/text_grey"
android:textSize=
"@dimen/sp_14"
...
...
@@ -102,16 +102,17 @@
<LinearLayout
android:id=
"@+id/lin_elec"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_height=
"match_parent"
android:layout_alignParentEnd=
"true"
android:layout_alignBottom=
"@id/lin_dang"
android:gravity=
"center_vertical"
>
<!-- android:src="@drawable/remaining_elec"-->
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:padding
Vertical
=
"3dp"
android:scaleType=
"
centerCrop
"
android:padding
Top
=
"3dp"
android:scaleType=
"
fitXY
"
android:src=
"@drawable/remaining_elec"
/>
<LinearLayout
...
...
@@ -121,21 +122,19 @@
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_soc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
a
ndroid:text=
"70%
"
a
pp:showProTv=
"@{cpBean.remainSoc}
"
tools:text=
"90%"
/>
<ProgressBar
android:id=
"@+id/pro_soc"
style=
"@style/MyProgressBarStyle"
android:layout_width=
"@dimen/dp_40"
android:layout_height=
"wrap_content"
android:max=
"100"
app:showProgress=
"@{cpBean.remainSoc}"
android:minHeight=
"8dp"
android:paddingVertical=
"0dp"
app:showProgress=
"@{cpBean.remainSoc}"
tools:progress=
"50"
/>
</LinearLayout>
...
...
@@ -146,11 +145,10 @@
android:id=
"@+id/tv_kmh"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentTop=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"3dp"
android:text=
"KM/H"
android:textColor=
"
@color/text_grey
"
android:textColor=
"
#66000000
"
android:textSize=
"@dimen/sp_13"
/>
<FrameLayout
...
...
@@ -162,14 +160,14 @@
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_gravity=
"
bottom
"
android:src=
"
@color/text_grey
"
/>
android:layout_gravity=
"
center_vertical
"
android:src=
"
#ffd7d8d8
"
/>
<ImageView
android:layout_width=
"@dimen/dp_20"
android:layout_height=
"match_parent"
android:layout_gravity=
"center
_horizontal
"
android:src=
"@
color/tex
t_black"
/>
android:layout_gravity=
"center"
android:src=
"@
drawable/rec
t_black
_14
"
/>
</FrameLayout>
...
...
@@ -178,7 +176,7 @@
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"
@dimen/dp_5
"
>
android:layout_marginTop=
"
8dp
"
>
<ImageView
android:id=
"@+id/img_auto"
...
...
@@ -186,10 +184,8 @@
android:layout_height=
"wrap_content"
android:layout_alignParentStart=
"true"
android:src=
"@drawable/icon_auto_driver"
/>
<!-- app:showAutoDri="@{cpBean.driveMode}"-->
<!-- app:showAutoDri="@{cpBean.driveMode}"-->
<TextView
android:id=
"@+id/tv_drivemode"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
...
...
@@ -207,20 +203,18 @@
app:showTurnLight=
"@{cpBean.lights}"
>
<ImageView
android:id=
"@+id/iv_left_light"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:tag=
"left"
android:src=
"@drawable/trun_left_grey"
android:tag=
"left"
tools:src=
"@drawable/trun_left_grey"
/>
<ImageView
android:id=
"@+id/iv_right_light"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_20"
android:tag=
"right"
android:src=
"@drawable/trun_right_grey"
android:tag=
"right"
tools:src=
"@drawable/trun_right_blue"
/>
</LinearLayout>
...
...
app/src/main/res/layout/fragment_distant_tip.xml
0 → 100644
View file @
a8ab6745
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
tools:context=
".ui.fragment.DistantTipFragment"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/icon_auto_driver"
/>
<TextView
android:id=
"@+id/tv_tip"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"18sp"
android:textColor=
"@color/black"
android:layout_marginLeft=
"5dp"
/>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_exo_play.xml
View file @
a8ab6745
...
...
@@ -3,23 +3,37 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<!-- <FrameLayout xmlns:tools="http://schemas.android.com/tools"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- -->
<!-- tools:context=".ui.fragment.ExoPlayFragment">-->
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/rect_white_small_map_4"
android:clipToOutline=
"true"
android:padding=
"3dp"
>
<!-- app:show_shuffle_button="true"-->
<!-- app:show_subtitle_button="true"-->
<!-- app:resize_mode="fill"-->
<androidx.media3.ui.PlayerView
android:id=
"@+id/player_view"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:resize_mode=
"fill"
/>
app:artwork_display_mode=
"fill"
app:resize_mode=
"fill"
app:use_controller=
"false"
/>
<!-- <com.sd.cavphmi.ui.view.RoundedPlayerView-->
<!-- android:id="@+id/player_view"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- app:resize_mode="fill"-->
<!-- android:clipToOutline="true"/>-->
<!-- <-->
<!-- </FrameLayout>-->
<!-- </androidx.cardview.widget.CardView>-->
</FrameLayout>
</layout>
...
...
app/src/main/res/navigation/nav_graph.xml
deleted
100644 → 0
View file @
4e15cda9
<?xml version="1.0" encoding="utf-8"?>
<navigation
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/nav_graph"
app:startDestination=
"@id/FirstFragment"
>
<fragment
android:id=
"@+id/FirstFragment"
android:name=
"com.sd.cavphmi.ui.FirstFragment"
android:label=
"@string/first_fragment_label"
tools:layout=
"@layout/fragment_first"
>
<action
android:id=
"@+id/action_FirstFragment_to_SecondFragment"
app:destination=
"@id/SecondFragment"
/>
</fragment>
<fragment
android:id=
"@+id/SecondFragment"
android:name=
"com.sd.cavphmi.ui.SecondFragment"
android:label=
"@string/second_fragment_label"
tools:layout=
"@layout/fragment_second"
>
<action
android:id=
"@+id/action_SecondFragment_to_FirstFragment"
app:destination=
"@id/FirstFragment"
/>
</fragment>
</navigation>
\ No newline at end of file
app/src/main/res/values/dimens.xml
View file @
a8ab6745
...
...
@@ -2,6 +2,7 @@
<resources>
<dimen
name=
"dp_5"
>
5dp
</dimen>
<dimen
name=
"dp_8"
>
8dp
</dimen>
<dimen
name=
"dp_10"
>
10dp
</dimen>
<dimen
name=
"dp_15"
>
15dp
</dimen>
<dimen
name=
"dp_20"
>
20dp
</dimen>
...
...
app/src/main/res/values/strings.xml
View file @
a8ab6745
<resources>
<string
name=
"game_view_content_description"
>
Game view
</string>
<string
name=
"app_name"
>
C-
adas
AVP
</string>
<string
name=
"app_name"
>
C-AVP
</string>
<!-- TODO: Remove or change this placeholder text -->
<string
name=
"hello_blank_fragment"
>
Hello blank fragment
</string>
<!-- Strings used for fragments for navigation -->
...
...
app/src/main/res/xml/network_security_config.xml
0 → 100644
View file @
a8ab6745
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config
cleartextTrafficPermitted=
"true"
/>
<!-- <domain-config cleartextTrafficPermitted="true">-->
<!-- <domain includeSubdomains="true">minedata.cn</domain>-->
<!-- </domain-config>-->
</network-security-config>
Prev
1
2
Next
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