Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
HTAnticollision
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马乐
HTAnticollision
Commits
ebe8f712
Commit
ebe8f712
authored
May 30, 2023
by
马乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.完成故障原因原则对话框
parent
aad9f221
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
337 additions
and
117 deletions
+337
-117
SplashActivity.kt
...src/main/java/com/waytous/anticollision/SplashActivity.kt
+1
-1
BaseMapFragment.kt
...main/java/com/waytous/anticollision/ui/BaseMapFragment.kt
+35
-2
HomeNoVideoFragment.kt
.../com/waytous/anticollision/ui/home/HomeNoVideoFragment.kt
+5
-26
HomeVideoFragment.kt
...a/com/waytous/anticollision/ui/video/HomeVideoFragment.kt
+0
-3
FaultCauseDialog.kt
...ava/com/waytous/anticollision/ui/view/FaultCauseDialog.kt
+84
-0
ReportStatusPopup.kt
...va/com/waytous/anticollision/ui/view/ReportStatusPopup.kt
+24
-0
ViewUtils.kt
...rc/main/java/com/waytous/anticollision/utils/ViewUtils.kt
+61
-0
background_btn_report_status_dialog.xml
...main/res/drawable/background_btn_report_status_dialog.xml
+1
-1
background_btn_report_status_dialog2.xml
...ain/res/drawable/background_btn_report_status_dialog2.xml
+1
-1
background_fault_cause_button1.xml
app/src/main/res/drawable/background_fault_cause_button1.xml
+3
-3
background_fault_cause_button2.xml
app/src/main/res/drawable/background_fault_cause_button2.xml
+3
-3
background_fault_cause_edittext.xml
...src/main/res/drawable/background_fault_cause_edittext.xml
+3
-3
background_fault_cause_item.xml
app/src/main/res/drawable/background_fault_cause_item.xml
+2
-14
background_fault_cause_item_checked.xml
...main/res/drawable/background_fault_cause_item_checked.xml
+8
-0
background_fault_cause_item_edge_reduction.xml
...s/drawable/background_fault_cause_item_edge_reduction.xml
+3
-2
background_fault_cause_item_electrical.xml
...n/res/drawable/background_fault_cause_item_electrical.xml
+3
-2
background_fault_cause_item_engine.xml
.../main/res/drawable/background_fault_cause_item_engine.xml
+3
-2
background_fault_cause_item_equipment_maintenance.xml
...ble/background_fault_cause_item_equipment_maintenance.xml
+3
-2
background_fault_cause_item_hydraulic_system.xml
...drawable/background_fault_cause_item_hydraulic_system.xml
+3
-2
background_fault_cause_item_mechanical.xml
...n/res/drawable/background_fault_cause_item_mechanical.xml
+3
-2
background_fault_cause_item_other_inputs.xml
...res/drawable/background_fault_cause_item_other_inputs.xml
+3
-2
background_fault_cause_item_tire.xml
...rc/main/res/drawable/background_fault_cause_item_tire.xml
+3
-2
background_fault_cause_item_unchecked.xml
...in/res/drawable/background_fault_cause_item_unchecked.xml
+8
-0
color_text_btn_4.xml
app/src/main/res/drawable/color_text_btn_4.xml
+6
-0
icon_close.xml
app/src/main/res/drawable/icon_close.xml
+9
-0
icon_fault_other_inputs_night.xml
app/src/main/res/drawable/icon_fault_other_inputs_night.xml
+0
-9
dialog_fault_cause_select.xml
app/src/main/res/layout/dialog_fault_cause_select.xml
+0
-0
fragment_no_video_home.xml
app/src/main/res/layout/fragment_no_video_home.xml
+0
-0
popup_more_features.xml
app/src/main/res/layout/popup_more_features.xml
+22
-22
mobile_navigation.xml
app/src/main/res/navigation/mobile_navigation.xml
+1
-1
themes.xml
app/src/main/res/values-night/themes.xml
+13
-0
dimens.xml
app/src/main/res/values/dimens.xml
+3
-0
themes.xml
app/src/main/res/values/themes.xml
+20
-12
No files found.
app/src/main/java/com/waytous/anticollision/SplashActivity.kt
View file @
ebe8f712
...
...
@@ -25,7 +25,7 @@ class SplashActivity : AppCompatActivity() {
//设置下布局向上移动状态栏的高度
BarUtils
.
setStatusBarColor
(
this
,
ColorUtils
.
getColor
(
R
.
color
.
white
))
//设置隐藏虚拟按键
BarUtils
.
setNavBarVisibility
(
this
,
false
)
;
BarUtils
.
setNavBarVisibility
(
this
,
false
)
binding
=
ActivitySplashBinding
.
inflate
(
layoutInflater
)
setContentView
(
binding
.
root
)
...
...
app/src/main/java/com/waytous/anticollision/ui/BaseMapFragment.kt
View file @
ebe8f712
package
com.waytous.anticollision.ui
import
android.os.Bundle
import
android.view.Gravity
import
android.view.LayoutInflater
import
androidx.asynclayoutinflater.view.AsyncLayoutInflater
import
androidx.fragment.app.Fragment
...
...
@@ -8,13 +9,14 @@ import androidx.fragment.app.viewModels
import
androidx.lifecycle.Lifecycle
import
androidx.lifecycle.lifecycleScope
import
androidx.lifecycle.repeatOnLifecycle
import
androidx.navigation.fragment.findNavController
import
com.blankj.utilcode.util.BarUtils
import
com.blankj.utilcode.util.LogUtils
import
com.mapbox.geojson.Point
import
com.mapbox.maps.CameraOptions
import
com.mapbox.maps.MapboxMap
import
com.mapbox.maps.Style
import
com.mapbox.maps.ViewAnnotationAnchor
import
com.mapbox.maps.extension.style.expressions.dsl.generated.distanceFromCenter
import
com.mapbox.maps.extension.style.layers.properties.generated.IconAnchor
import
com.mapbox.maps.extension.style.style
import
com.mapbox.maps.plugin.animation.flyTo
...
...
@@ -26,7 +28,6 @@ import com.mapbox.maps.plugin.annotation.generated.createPointAnnotationManager
import
com.mapbox.maps.plugin.attribution.attribution
import
com.mapbox.maps.plugin.compass.compass
import
com.mapbox.maps.plugin.logo.logo
import
com.mapbox.maps.plugin.scalebar.scalebar
import
com.mapbox.maps.viewannotation.ViewAnnotationManager
import
com.mapbox.maps.viewannotation.viewAnnotationOptions
import
com.waytous.anticollision.R
...
...
@@ -34,6 +35,10 @@ import com.waytous.anticollision.databinding.CurrentVehicleViewAnnotationLayoutB
import
com.waytous.anticollision.databinding.LayoutMapBoxBinding
import
com.waytous.anticollision.databinding.OtherVehicleViewAnnotationLayoutBinding
import
com.waytous.anticollision.repository.MainRepository
import
com.waytous.anticollision.ui.view.FaultCauseDialog
import
com.waytous.anticollision.ui.view.MoreFeaturesPopup
import
com.waytous.anticollision.ui.view.ReportStatusPopup
import
com.waytous.anticollision.ui.view.WorkStatusEditPopup
import
com.waytous.anticollision.utils.BitmapUtils
import
com.waytous.anticollision.utils.LATITUDE
import
com.waytous.anticollision.utils.LONGITUDE
...
...
@@ -86,6 +91,14 @@ open class BaseMapFragment : Fragment() {
MainViewModel
.
MainViewModelFactory
(
MainRepository
(
requireContext
()))
}
lateinit
var
moreFeaturesPopup
:
MoreFeaturesPopup
lateinit
var
workStatusEditPopup
:
WorkStatusEditPopup
lateinit
var
reportStatusPopup
:
ReportStatusPopup
lateinit
var
reportStatusDialog
:
FaultCauseDialog
val
iconCurrentNormalVehicleBitmap
by
lazy
{
BitmapUtils
.
bitmapFromDrawableRes
(
requireContext
(),
R
.
drawable
.
my_vehicle_normal
)
}
...
...
@@ -143,12 +156,32 @@ open class BaseMapFragment : Fragment() {
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
BarUtils
.
setNavBarVisibility
(
requireActivity
(),
false
)
layoutMapBoxBinding
=
LayoutMapBoxBinding
.
inflate
(
LayoutInflater
.
from
(
requireContext
()))
reportStatusDialog
=
FaultCauseDialog
(
requireContext
(),
R
.
style
.
DialogStyle
)
layoutMapBoxBinding
.
mapView
.
run
{
logo
.
enabled
=
false
compass
.
enabled
=
false
attribution
.
enabled
=
false
}
workStatusEditPopup
=
WorkStatusEditPopup
(
context
).
also
{
it
.
setOutSideDismiss
(
true
)
it
.
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
it
.
setBackgroundColor
(
R
.
color
.
color_99000000
)
}
moreFeaturesPopup
=
MoreFeaturesPopup
(
context
).
also
{
it
.
setOutSideDismiss
(
true
)
it
.
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
it
.
maskOffsetY
=
20
it
.
setBackgroundColor
(
R
.
color
.
color_99000000
)
it
.
navigationTo
(
findNavController
())
}
reportStatusPopup
=
ReportStatusPopup
(
context
).
also
{
it
.
setOutSideDismiss
(
true
)
it
.
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
it
.
setBackgroundColor
(
R
.
color
.
color_99000000
)
it
.
itemFault
(
reportStatusDialog
)
}
}
fun
setupMapBox
()
{
...
...
app/src/main/java/com/waytous/anticollision/ui/home/HomeNoVideoFragment.kt
View file @
ebe8f712
...
...
@@ -6,12 +6,14 @@ import android.view.Gravity
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.appcompat.app.AlertDialog
import
androidx.fragment.app.viewModels
import
androidx.lifecycle.ViewModelProvider
import
androidx.navigation.fragment.findNavController
import
com.mapbox.maps.MapView
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.FragmentHomeBinding
import
com.waytous.anticollision.databinding.DialogFaultCauseSelectBinding
import
com.waytous.anticollision.databinding.FragmentNoVideoHomeBinding
import
com.waytous.anticollision.repository.MainRepository
import
com.waytous.anticollision.ui.BaseMapFragment
import
com.waytous.anticollision.ui.MainViewModel
...
...
@@ -22,7 +24,7 @@ import com.waytous.anticollision.utils.setTextSize
class
HomeNoVideoFragment
:
BaseMapFragment
()
{
private
var
_binding
:
FragmentHomeBinding
?
=
null
private
var
_binding
:
Fragment
NoVideo
HomeBinding
?
=
null
private
val
binding
get
()
=
_binding
!!
...
...
@@ -30,11 +32,6 @@ class HomeNoVideoFragment : BaseMapFragment() {
private
var
count
=
0
private
lateinit
var
moreFeaturesPopup
:
MoreFeaturesPopup
private
lateinit
var
workStatusEditPopup
:
WorkStatusEditPopup
private
lateinit
var
reportStatusPopup
:
ReportStatusPopup
private
val
mapModel
:
MainViewModel
by
viewModels
{
MainViewModel
.
MainViewModelFactory
(
MainRepository
(
requireContext
()))
...
...
@@ -47,25 +44,8 @@ class HomeNoVideoFragment : BaseMapFragment() {
):
View
{
val
homeViewModel
=
ViewModelProvider
(
this
)[
HomeViewModel
::
class
.
java
]
_binding
=
FragmentHomeBinding
.
inflate
(
inflater
,
container
,
false
)
_binding
=
Fragment
NoVideo
HomeBinding
.
inflate
(
inflater
,
container
,
false
)
context
?:
return
binding
.
root
workStatusEditPopup
=
WorkStatusEditPopup
(
context
).
also
{
it
.
setOutSideDismiss
(
true
)
it
.
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
it
.
setBackgroundColor
(
R
.
color
.
color_99000000
)
}
moreFeaturesPopup
=
MoreFeaturesPopup
(
context
).
also
{
it
.
setOutSideDismiss
(
true
)
it
.
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
it
.
maskOffsetY
=
20
it
.
setBackgroundColor
(
R
.
color
.
color_99000000
)
it
.
navigationTo
(
findNavController
())
}
reportStatusPopup
=
ReportStatusPopup
(
context
).
also
{
it
.
setOutSideDismiss
(
true
)
it
.
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
it
.
setBackgroundColor
(
R
.
color
.
color_99000000
)
}
setupMapBox
()
binding
.
noVideoMapWrapper
.
addView
(
layoutMapBoxBinding
.
root
)
setTodayCarriedNum
(
18
)
...
...
@@ -81,7 +61,6 @@ class HomeNoVideoFragment : BaseMapFragment() {
}
return
binding
.
root
}
private
fun
setTodayCarriedNum
(
num
:
Int
)
{
val
templateString
=
getString
(
R
.
string
.
today_carried_text
,
num
)
val
spannableString
=
SpannableString
(
templateString
)
...
...
app/src/main/java/com/waytous/anticollision/ui/video/HomeVideoFragment.kt
View file @
ebe8f712
...
...
@@ -28,9 +28,6 @@ class HomeVideoFragment : BaseMapFragment() {
private
var
player2
:
ExoPlayer
?
=
null
private
lateinit
var
workStatusEditPopup
:
WorkStatusEditPopup
private
lateinit
var
moreFeaturesPopup
:
MoreFeaturesPopup
companion
object
{
fun
newInstance
()
=
HomeVideoFragment
()
...
...
app/src/main/java/com/waytous/anticollision/ui/view/FaultCauseDialog.kt
0 → 100644
View file @
ebe8f712
package
com.waytous.anticollision.ui.view
import
android.content.Context
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.widget.RadioGroup
import
android.widget.RadioGroup.OnCheckedChangeListener
import
androidx.appcompat.app.AlertDialog
import
com.blankj.utilcode.util.BarUtils
import
com.blankj.utilcode.util.LogUtils
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.DialogFaultCauseSelectBinding
class
FaultCauseDialog
(
context
:
Context
,
themeResId
:
Int
)
:
AlertDialog
(
context
,
themeResId
)
{
private
lateinit
var
binding
:
DialogFaultCauseSelectBinding
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
window
?.
let
{
BarUtils
.
setNavBarVisibility
(
it
,
false
)
}
window
?.
setLayout
(
context
.
resources
.
getDimension
(
R
.
dimen
.
dp_984
).
toInt
(),
context
.
resources
.
getDimension
(
R
.
dimen
.
dp_636
).
toInt
())
val
inflater
=
LayoutInflater
.
from
(
context
).
also
{
it
.
inflate
(
R
.
layout
.
dialog_fault_cause_select
,
null
)
}
binding
=
DialogFaultCauseSelectBinding
.
inflate
(
inflater
)
setContentView
(
binding
.
root
)
binding
.
radioGroup1
.
setOnCheckedChangeListener
(
FaultCauseItemCheckedListener
())
binding
.
radioGroup2
.
setOnCheckedChangeListener
(
FaultCauseItemCheckedListener
())
binding
.
faultCauseConfirm
.
setOnClickListener
{
}
binding
.
faultCauseCancel
.
setOnClickListener
{
dismiss
()
}
binding
.
faultCauseSelectClose
.
setOnClickListener
{
dismiss
()
}
}
inner
class
FaultCauseItemCheckedListener
:
OnCheckedChangeListener
{
override
fun
onCheckedChanged
(
group
:
RadioGroup
?,
checkedId
:
Int
)
{
when
(
group
?.
id
){
R
.
id
.
radioGroup1
->{
binding
.
radioGroup2
.
setOnCheckedChangeListener
(
null
)
binding
.
radioGroup2
.
clearCheck
()
when
(
checkedId
){
R
.
id
.
itemFaultEngine
->{
LogUtils
.
d
(
"发动机故障"
)
}
R
.
id
.
itemFaultMechanical
->{
LogUtils
.
d
(
"机械故障"
)
}
R
.
id
.
itemFaultHydraulicSystem
->{
LogUtils
.
d
(
"液压系统故障"
)
}
R
.
id
.
itemFaultElectrical
->{
LogUtils
.
d
(
"电气系统故障"
)
}
}
binding
.
radioGroup2
.
setOnCheckedChangeListener
(
this
)
}
R
.
id
.
radioGroup2
->{
binding
.
radioGroup1
.
setOnCheckedChangeListener
(
null
)
binding
.
radioGroup1
.
clearCheck
()
when
(
checkedId
){
R
.
id
.
itemFaultEdgeReduction
->{
LogUtils
.
d
(
"边减故障"
)
}
R
.
id
.
itemFaultTire
->{
LogUtils
.
d
(
"轮胎故障"
)
}
R
.
id
.
itemFaultEquipmentMaintenance
->{
LogUtils
.
d
(
"设备保养"
)
}
R
.
id
.
itemFaultOtherInputs
->{
LogUtils
.
d
(
"其他录入"
)
}
}
binding
.
radioGroup1
.
setOnCheckedChangeListener
(
this
)
}
}
}
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/view/ReportStatusPopup.kt
View file @
ebe8f712
package
com.waytous.anticollision.ui.view
import
android.content.Context
import
androidx.appcompat.app.AlertDialog
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.PopupReportStatusBinding
import
razerdp.basepopup.BasePopupWindow
class
ReportStatusPopup
(
context
:
Context
?)
:
BasePopupWindow
(
context
)
{
private
lateinit
var
binding
:
PopupReportStatusBinding
init
{
contentView
=
createPopupById
(
R
.
layout
.
popup_report_status
)
binding
=
PopupReportStatusBinding
.
bind
(
contentView
)
}
fun
itemDumping
(){
}
fun
itemDelay
(){
}
fun
itemFault
(
dialog
:
AlertDialog
){
binding
.
reportDialogFault
.
setOnClickListener
{
dialog
.
show
()
}
}
fun
itemStandby
(){
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/utils/ViewUtils.kt
0 → 100644
View file @
ebe8f712
package
com.waytous.anticollision.utils
import
android.graphics.Rect
import
android.view.TouchDelegate
import
android.view.View
import
android.view.ViewGroup
import
androidx.databinding.BindingAdapter
import
com.blankj.utilcode.util.SizeUtils
@BindingAdapter
(
"expandTouchArea"
)
fun
expandTouchArea
(
view
:
View
,
size
:
String
)
{
view
.
postDelayed
({
val
bounds
=
Rect
()
view
.
getHitRect
(
bounds
)
var
left
=
0
var
top
=
0
var
right
=
0
var
bottom
=
0
/*
* size 举例 `2` or `2 4` or `2 4 6 8`
*/
val
mSize
=
size
.
trim
()
val
ss
=
mSize
.
split
(
" "
)
when
(
ss
.
size
)
{
1
->
{
val
sdp
=
SizeUtils
.
dp2px
(((
ss
[
0
].
toIntOrNull
()
?:
0
).
toFloat
()))
left
=
sdp
top
=
sdp
right
=
sdp
bottom
=
sdp
}
2
->
{
val
sdp
=
SizeUtils
.
dp2px
(((
ss
[
0
].
toIntOrNull
()
?:
0
).
toFloat
()))
val
sdp1
=
SizeUtils
.
dp2px
(((
ss
[
1
].
toIntOrNull
()
?:
0
).
toFloat
()))
left
=
sdp
top
=
sdp1
right
=
sdp
bottom
=
sdp1
}
4
->
{
left
=
(
ss
[
0
].
toIntOrNull
()
?:
0
)
top
=
SizeUtils
.
dp2px
(((
ss
[
1
].
toIntOrNull
()
?:
0
).
toFloat
()))
right
=
SizeUtils
.
dp2px
(((
ss
[
2
].
toIntOrNull
()
?:
0
).
toFloat
()))
bottom
=
SizeUtils
.
dp2px
(((
ss
[
3
].
toIntOrNull
()
?:
0
).
toFloat
()))
}
else
->
{
return
@postDelayed
}
}
bounds
.
left
-=
left
bounds
.
top
-=
top
bounds
.
right
+=
right
bounds
.
bottom
+=
bottom
val
mTouchDelegate
=
TouchDelegate
(
bounds
,
view
);
val
p
=
view
.
parent
if
(
p
is
ViewGroup
)
{
p
.
touchDelegate
=
mTouchDelegate
;
}
},
100
)
}
\ No newline at end of file
app/src/main/res/drawable/background_btn_report_status_dialog.xml
View file @
ebe8f712
...
...
@@ -14,7 +14,7 @@
<item
android:state_pressed=
"true"
>
<layer-list>
<item>
<shape
android:shape=
"rectangle"
>
<shape
android:shape=
"rectangle"
android:state_focused=
"true"
>
<size
android:width=
"@dimen/dp_148"
android:height=
"@dimen/dp_200"
/>
<solid
android:color=
"@color/color_80ececec"
/>
<corners
android:radius=
"16dp"
/>
...
...
app/src/main/res/drawable/background_btn_report_status_dialog2.xml
View file @
ebe8f712
...
...
@@ -11,7 +11,7 @@
</item>
</layer-list>
</item>
<item
android:state_pressed=
"true"
>
<item
android:state_pressed=
"true"
android:state_focused=
"true"
>
<layer-list>
<item>
<shape
android:shape=
"rectangle"
>
...
...
app/src/main/res/drawable/background_fault_cause_button1.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<size
android:width=
"
492dp"
android:height=
"84dp
"
/>
<stroke
android:width=
"
1dp
"
android:color=
"@color/color_1a000000"
/>
<corners
android:bottomLeftRadius=
"
16dp
"
/>
<size
android:width=
"
@dimen/dp_492"
android:height=
"@dimen/dp_84
"
/>
<stroke
android:width=
"
@dimen/dp_1
"
android:color=
"@color/color_1a000000"
/>
<corners
android:bottomLeftRadius=
"
@dimen/dp_16
"
/>
</shape>
app/src/main/res/drawable/background_fault_cause_button2.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<size
android:width=
"
492dp"
android:height=
"84dp
"
/>
<stroke
android:width=
"
1dp
"
android:color=
"@color/color_1a000000"
/>
<corners
android:bottomRightRadius=
"
16dp
"
/>
<size
android:width=
"
@dimen/dp_492"
android:height=
"@dimen/dp_84
"
/>
<stroke
android:width=
"
@dimen/dp_1
"
android:color=
"@color/color_1a000000"
/>
<corners
android:bottomRightRadius=
"
@dimen/dp_16
"
/>
</shape>
app/src/main/res/drawable/background_fault_cause_edittext.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<size
android:width=
"
896dp"
android:height=
"66dp
"
/>
<stroke
android:width=
"
1dp
"
android:color=
"@color/color_4d3c3c3c"
/>
<corners
android:topLeftRadius=
"
5dp"
android:topRightRadius=
"5dp"
android:bottomLeftRadius=
"5dp"
android:bottomRightRadius=
"5dp
"
/>
<size
android:width=
"
@dimen/dp_896"
android:height=
"@dimen/dp_66
"
/>
<stroke
android:width=
"
@dimen/dp_1
"
android:color=
"@color/color_4d3c3c3c"
/>
<corners
android:topLeftRadius=
"
@dimen/dp_5"
android:topRightRadius=
"@dimen/dp_5"
android:bottomLeftRadius=
"@dimen/dp_5"
android:bottomRightRadius=
"@dimen/dp_5
"
/>
</shape>
app/src/main/res/drawable/background_fault_cause_item.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"false"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_ffececec"
/>
<corners
android:radius=
"16dp"
/>
<size
android:width=
"200dp"
android:height=
"136dp"
/>
</shape>
</item>
<item
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_ff3684f9"
/>
<corners
android:radius=
"16dp"
/>
<size
android:width=
"200dp"
android:height=
"136dp"
/>
</shape>
</item>
<item
android:drawable=
"@drawable/background_fault_cause_item_unchecked"
android:state_checked=
"false"
/>
<item
android:drawable=
"@drawable/background_fault_cause_item_checked"
android:state_checked=
"true"
/>
</selector>
app/src/main/res/drawable/background_fault_cause_item_checked.xml
0 → 100644
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_ff3684f9"
/>
<corners
android:radius=
"@dimen/dp_16"
/>
<size
android:width=
"@dimen/dp_200"
android:height=
"@dimen/dp_136"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/background_fault_cause_item_edge_reduction.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:
state_pressed=
"false"
android:drawable=
"@drawable/icon_fault_edge_reduction_light
"
/>
<item
android:
state_pressed=
"true"
android:drawable=
"@drawable/icon_fault_edge_reduction_night
"
/>
<item
android:
drawable=
"@drawable/icon_fault_edge_reduction_light"
android:state_checked=
"false
"
/>
<item
android:
drawable=
"@drawable/icon_fault_edge_reduction_night"
android:state_checked=
"true
"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/background_fault_cause_item_electrical.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:
state_pressed=
"false"
android:drawable=
"@drawable/icon_fault_electrical_light
"
/>
<item
android:
state_pressed=
"true"
android:drawable=
"@drawable/icon_fault_electrical_night
"
/>
<item
android:
drawable=
"@drawable/icon_fault_electrical_light"
android:state_checked=
"false
"
/>
<item
android:
drawable=
"@drawable/icon_fault_electrical_night"
android:state_checked=
"true
"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/background_fault_cause_item_engine.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:
state_pressed=
"false"
android:drawable=
"@drawable/icon_fault_engine_light
"
/>
<item
android:
state_pressed=
"true"
android:drawable=
"@drawable/icon_fault_engine_night
"
/>
<item
android:
drawable=
"@drawable/icon_fault_engine_light"
android:state_checked=
"false
"
/>
<item
android:
drawable=
"@drawable/icon_fault_engine_night"
android:state_checked=
"true
"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/background_fault_cause_item_equipment_maintenance.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:
state_pressed=
"false"
android:drawable=
"@drawable/icon_fault_equipment_maintenance_light
"
/>
<item
android:
state_pressed=
"true"
android:drawable=
"@drawable/icon_fault_equipment_maintenance_night
"
/>
<item
android:
drawable=
"@drawable/icon_fault_equipment_maintenance_light"
android:state_checked=
"false
"
/>
<item
android:
drawable=
"@drawable/icon_fault_equipment_maintenance_night"
android:state_checked=
"true
"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/background_fault_cause_item_hydraulic_system.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:
state_pressed=
"false"
android:drawable=
"@drawable/icon_fault_hydraulic_system_light
"
/>
<item
android:
state_pressed=
"true"
android:drawable=
"@drawable/icon_fault_hydraulic_system_night
"
/>
<item
android:
drawable=
"@drawable/icon_fault_hydraulic_system_light"
android:state_checked=
"false
"
/>
<item
android:
drawable=
"@drawable/icon_fault_hydraulic_system_night"
android:state_checked=
"true
"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/background_fault_cause_item_mechanical.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:
state_pressed=
"false"
android:drawable=
"@drawable/icon_fault_mechanical_light
"
/>
<item
android:
state_pressed=
"true"
android:drawable=
"@drawable/icon_fault_mechanical_night
"
/>
<item
android:
drawable=
"@drawable/icon_fault_mechanical_light"
android:state_checked=
"false
"
/>
<item
android:
drawable=
"@drawable/icon_fault_mechanical_night"
android:state_checked=
"true
"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/background_fault_cause_item_other_inputs.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:
state_pressed=
"false"
android:drawable=
"@drawable/icon_fault_other_inputs_light
"
/>
<item
android:
state_pressed=
"true"
android:drawable=
"@drawable/icon_fault_other_inputs_night
"
/>
<item
android:
drawable=
"@drawable/icon_fault_other_inputs_light"
android:state_checked=
"false
"
/>
<item
android:
drawable=
"@drawable/icon_fault_other_inputs_night"
android:state_checked=
"true
"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/background_fault_cause_item_tire.xml
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:
state_pressed=
"false"
android:drawable=
"@drawable/icon_fault_tire_light
"
/>
<item
android:
state_pressed=
"true"
android:drawable=
"@drawable/icon_fault_tire_night
"
/>
<item
android:
drawable=
"@drawable/icon_fault_tire_light"
android:state_checked=
"false
"
/>
<item
android:
drawable=
"@drawable/icon_fault_tire_night"
android:state_checked=
"true
"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/background_fault_cause_item_unchecked.xml
0 → 100644
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_ffececec"
/>
<corners
android:radius=
"@dimen/dp_16"
/>
<size
android:width=
"@dimen/dp_200"
android:height=
"@dimen/dp_136"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/color_text_btn_4.xml
0 → 100644
View file @
ebe8f712
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- 没有焦点时的背景图片 -->
<item
android:color=
"@color/color_ff333333"
android:state_checked=
"false"
/>
<item
android:color=
"@color/white"
android:state_checked=
"true"
/>
</selector>
app/src/main/res/drawable/icon_close.xml
0 → 100644
View file @
ebe8f712
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"20dp"
android:height=
"20dp"
android:viewportWidth=
"20"
android:viewportHeight=
"20"
>
<path
android:pathData=
"M10,8.08 L2.31,0.39A1.36,1.36 0,0 0,0.39 2.31L8.08,10 0.39,17.69a1.36,1.36 0,0 0,1.92 1.92L10,11.92l7.69,7.69a1.36,1.36 0,0 0,1.92 -1.92L11.92,10l7.69,-7.69A1.36,1.36 0,0 0,17.69 0.39Z"
android:fillColor=
"#333"
/>
</vector>
app/src/main/res/drawable/icon_fault_other_inputs_night.xml
deleted
100644 → 0
View file @
aad9f221
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"47dp"
android:height=
"47dp"
android:viewportWidth=
"47"
android:viewportHeight=
"47"
>
<path
android:pathData=
"M23.5,0A23.5,23.5 0,1 0,47 23.5,23.5 23.5,0 0,0 23.5,0ZM12.87,26.41a2.91,2.91 0,1 1,2.91 -2.91A2.91,2.91 0,0 1,12.87 26.41ZM23.5,26.41a2.91,2.91 0,1 1,2.91 -2.91A2.91,2.91 0,0 1,23.5 26.41ZM34.13,26.41A2.91,2.91 0,1 1,37 23.5,2.91 2.91,0 0,1 34.13,26.41Z"
android:fillColor=
"#333"
/>
</vector>
app/src/main/res/layout/dialog_fault_cause_select.xml
View file @
ebe8f712
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/fragment_home.xml
→
app/src/main/res/layout/fragment_
no_video_
home.xml
View file @
ebe8f712
File moved
app/src/main/res/layout/popup_more_features.xml
View file @
ebe8f712
...
...
@@ -9,11 +9,11 @@
android:id=
"@+id/more_template_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
40dp
"
android:layout_marginTop=
"
20dp
"
android:layout_marginStart=
"
@dimen/dp_40
"
android:layout_marginTop=
"
@dimen/dp_20
"
android:text=
"@string/toggle_more_text"
android:textColor=
"@color/home_text_color"
android:textSize=
"
24sp
"
android:textSize=
"
@dimen/sp_24
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -21,16 +21,16 @@
android:id=
"@+id/moreFeatureCollect"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"
12dp
"
android:layout_marginTop=
"
@dimen/dp_12
"
android:background=
"@drawable/background_more_features_item"
android:clickable=
"true"
android:drawableTop=
"@mipmap/icon_more_item_collect"
android:drawablePadding=
"
2dp
"
android:drawablePadding=
"
@dimen/dp_2
"
android:focusable=
"true"
android:gravity=
"center_horizontal"
android:text=
"@string/more_feature_collect"
android:textColor=
"@color/home_text_color"
android:textSize=
"
20sp
"
android:textSize=
"
@dimen/sp_20
"
app:layout_constraintStart_toStartOf=
"@id/more_template_title"
app:layout_constraintTop_toBottomOf=
"@id/more_template_title"
/>
...
...
@@ -38,16 +38,16 @@
android:id=
"@+id/moreFeatureHealth"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
45dp
"
android:layout_marginStart=
"
@dimen/dp_45
"
android:background=
"@drawable/background_more_features_item"
android:clickable=
"true"
android:drawableTop=
"@mipmap/icon_more_item_health"
android:drawablePadding=
"
2dp
"
android:drawablePadding=
"
@dimen/dp_2
"
android:focusable=
"true"
android:gravity=
"center_horizontal"
android:text=
"@string/more_feature_health"
android:textColor=
"@color/home_text_color"
android:textSize=
"
20sp
"
android:textSize=
"
@dimen/sp_20
"
app:layout_constraintBottom_toBottomOf=
"@id/moreFeatureCollect"
app:layout_constraintStart_toEndOf=
"@id/moreFeatureCollect"
app:layout_constraintTop_toTopOf=
"@id/moreFeatureCollect"
/>
...
...
@@ -56,17 +56,17 @@
android:id=
"@+id/moreFeatureData"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
45dp
"
android:layout_marginEnd=
"
40dp
"
android:layout_marginStart=
"
@dimen/dp_45
"
android:layout_marginEnd=
"
@dimen/dp_40
"
android:background=
"@drawable/background_more_features_item"
android:clickable=
"true"
android:drawableTop=
"@mipmap/icon_more_item_data"
android:drawablePadding=
"
2dp
"
android:drawablePadding=
"
@dimen/dp_2
"
android:focusable=
"true"
android:gravity=
"center_horizontal"
android:text=
"@string/more_feature_data"
android:textColor=
"@color/home_text_color"
android:textSize=
"
20sp
"
android:textSize=
"
@dimen/sp_20
"
app:layout_constraintBottom_toBottomOf=
"@id/moreFeatureHealth"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/moreFeatureHealth"
...
...
@@ -76,8 +76,8 @@
android:id=
"@+id/moreFeatureSettings"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"
16dp
"
android:layout_marginBottom=
"
24dp
"
android:layout_marginTop=
"
@dimen/dp_16
"
android:layout_marginBottom=
"
@dimen/dp_24
"
android:background=
"@drawable/background_more_features_item"
android:clickable=
"true"
android:drawableTop=
"@mipmap/icon_more_item_settings"
...
...
@@ -86,7 +86,7 @@
android:gravity=
"center_horizontal"
android:text=
"@string/more_feature_settings"
android:textColor=
"@color/home_text_color"
android:textSize=
"
20sp
"
android:textSize=
"
@dimen/sp_20
"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/moreFeatureCollect"
app:layout_constraintTop_toBottomOf=
"@id/moreFeatureCollect"
/>
...
...
@@ -95,16 +95,16 @@
android:id=
"@+id/moreFeatureReboot"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
45dp
"
android:layout_marginStart=
"
@dimen/dp_45
"
android:background=
"@drawable/background_more_features_item"
android:clickable=
"true"
android:drawableTop=
"@mipmap/icon_more_item_reboot"
android:drawablePadding=
"
2dp
"
android:drawablePadding=
"
@dimen/dp_2
"
android:focusable=
"true"
android:gravity=
"center_horizontal"
android:text=
"@string/more_feature_reboot"
android:textColor=
"@color/home_text_color"
android:textSize=
"
20sp
"
android:textSize=
"
@dimen/sp_20
"
app:layout_constraintBottom_toBottomOf=
"@id/moreFeatureSettings"
app:layout_constraintStart_toEndOf=
"@id/moreFeatureSettings"
app:layout_constraintTop_toTopOf=
"@id/moreFeatureSettings"
/>
...
...
@@ -113,16 +113,16 @@
android:id=
"@+id/moreFeaturePowerOff"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
45dp
"
android:layout_marginStart=
"
@dimen/dp_45
"
android:background=
"@drawable/background_more_features_item"
android:clickable=
"true"
android:drawableTop=
"@mipmap/icon_more_item_power_off"
android:drawablePadding=
"
2dp
"
android:drawablePadding=
"
@dimen/dp_2
"
android:focusable=
"true"
android:gravity=
"center_horizontal"
android:text=
"@string/more_feature_power_off"
android:textColor=
"@color/home_text_color"
android:textSize=
"
20sp
"
android:textSize=
"
@dimen/sp_20
"
app:layout_constraintBottom_toBottomOf=
"@id/moreFeatureReboot"
app:layout_constraintEnd_toEndOf=
"@id/moreFeatureData"
app:layout_constraintStart_toEndOf=
"@id/moreFeatureReboot"
...
...
app/src/main/res/navigation/mobile_navigation.xml
View file @
ebe8f712
...
...
@@ -9,7 +9,7 @@
android:id=
"@+id/navigation_home"
android:name=
"com.waytous.anticollision.ui.home.HomeNoVideoFragment"
android:label=
"@string/title_home"
tools:layout=
"@layout/fragment_home"
>
tools:layout=
"@layout/fragment_
no_video_
home"
>
<action
android:id=
"@+id/action_navigation_home_to_collectFragment"
app:destination=
"@id/collectFragment"
/>
...
...
app/src/main/res/values-night/themes.xml
View file @
ebe8f712
...
...
@@ -47,6 +47,19 @@
<item
name=
"android:maxLength"
>
8
</item>
<item
name=
"android:textSize"
>
10sp
</item>
</style>
<style
name=
"FaultCauseTextStyle"
parent=
"Theme.HTAnticollision"
>
<item
name=
"android:layout_width"
>
@dimen/dp_200
</item>
<item
name=
"android:layout_height"
>
@dimen/dp_136
</item>
<item
name=
"background"
>
@drawable/background_fault_cause_item
</item>
<item
name=
"android:textColor"
>
@drawable/color_text_btn
</item>
<item
name=
"android:gravity"
>
center_horizontal
</item>
<item
name=
"android:drawablePadding"
>
@dimen/dp_3
</item>
<item
name=
"android:paddingTop"
>
@dimen/dp_30
</item>
<item
name=
"android:textSize"
>
@dimen/sp_22
</item>
<item
name=
"android:button"
>
@null
</item>
<item
name=
"android:clickable"
>
true
</item>
<item
name=
"android:focusable"
>
true
</item>
</style>
<style
name=
"OtherVehicleSpeed"
parent=
"Theme.HTAnticollision"
>
<item
name=
"android:textColor"
>
@color/color_ffebf0ff
</item>
</style>
...
...
app/src/main/res/values/dimens.xml
View file @
ebe8f712
...
...
@@ -389,10 +389,13 @@
<dimen
name=
"dp_492"
>
492dp
</dimen>
<dimen
name=
"dp_500"
>
500dp
</dimen>
<dimen
name=
"dp_600"
>
600dp
</dimen>
<dimen
name=
"dp_636"
>
636dp
</dimen>
<dimen
name=
"dp_652"
>
652dp
</dimen>
<dimen
name=
"dp_640"
>
640dp
</dimen>
<dimen
name=
"dp_712"
>
712dp
</dimen>
<dimen
name=
"dp_720"
>
720dp
</dimen>
<dimen
name=
"dp_896"
>
896dp
</dimen>
<dimen
name=
"dp_984"
>
984dp
</dimen>
<!-- font size,you can add if there is no one -->
<dimen
name=
"sp_6"
>
6sp
</dimen>
...
...
app/src/main/res/values/themes.xml
View file @
ebe8f712
...
...
@@ -34,7 +34,7 @@
<item
name=
"android:textColor"
>
@color/home_text_color
</item>
<item
name=
"android:ellipsize"
>
end
</item>
<item
name=
"singleLine"
>
true
</item>
<item
name=
"android:textSize"
>
20sp
</item>
<item
name=
"android:textSize"
>
@dimen/sp_20
</item>
</style>
<style
name=
"ReminderInfoTextStyle"
parent=
"Theme.HTAnticollision"
>
<item
name=
"background"
>
@drawable/drawable_bg_reminder_info1
</item>
...
...
@@ -44,7 +44,7 @@
<item
name=
"singleLine"
>
true
</item>
<item
name=
"android:ems"
>
8
</item>
<item
name=
"android:maxLength"
>
8
</item>
<item
name=
"android:textSize"
>
20sp
</item>
<item
name=
"android:textSize"
>
@dimen/sp_20
</item>
</style>
<style
name=
"MapBoxButtonStyle"
parent=
"Theme.HTAnticollision"
>
<item
name=
"android:adjustViewBounds"
>
true
</item>
...
...
@@ -52,16 +52,13 @@
<item
name=
"android:focusable"
>
true
</item>
</style>
<style
name=
"FaultCauseTextStyle"
parent=
"Theme.HTAnticollision"
>
<item
name=
"android:layout_width"
>
200dp
</item>
<item
name=
"android:layout_height"
>
136dp
</item>
<item
name=
"background"
>
@drawable/background_fault_cause_item
</item>
<item
name=
"android:textColor"
>
@drawable/color_text_btn
</item>
<item
name=
"android:gravity"
>
center_horizontal
</item>
<item
name=
"android:drawablePadding"
>
3dp
</item>
<item
name=
"android:paddingTop"
>
30dp
</item>
<item
name=
"android:textSize"
>
22sp
</item>
<item
name=
"android:clickable"
>
true
</item>
<item
name=
"android:focusable"
>
true
</item>
<item
name=
"android:layout_width"
>
@dimen/dp_200
</item>
<item
name=
"android:layout_height"
>
@dimen/dp_136
</item>
<item
name=
"android:layout_weight"
>
1
</item>
<item
name=
"android:gravity"
>
center
</item>
<item
name=
"android:drawablePadding"
>
@dimen/dp_3
</item>
<item
name=
"android:paddingTop"
>
@dimen/dp_30
</item>
<item
name=
"android:textSize"
>
@dimen/sp_22
</item>
</style>
<style
name=
"OtherVehicleSpeed"
parent=
"Theme.HTAnticollision"
>
<item
name=
"android:textColor"
>
@color/color_1352C5
</item>
...
...
@@ -69,4 +66,14 @@
<style
name=
"OtherVehicleDistance"
parent=
"Theme.HTAnticollision"
>
<item
name=
"android:textColor"
>
@color/color_fff06313
</item>
</style>
<style
name=
"DialogStyle"
parent=
"Theme.HTAnticollision"
>
!-- 是否漂现在activity上 -->
<item
name=
"android:windowIsFloating"
>
true
</item>
<!-- 是否隐藏标题 -->
<item
name=
"android:windowNoTitle"
>
true
</item>
<!-- 是否允许背景变暗 -->
<item
name=
"android:backgroundDimEnabled"
>
true
</item>
<item
name=
"android:windowBackground"
>
@android:color/transparent
</item>
<item
name=
"hideNavigationIcon"
>
true
</item>
</style>
</resources>
\ No newline at end of file
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