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
1d65e955
Commit
1d65e955
authored
Jul 13, 2023
by
马乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.用Activity替换Fragment
parent
fdbd57de
Hide whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
2002 additions
and
2134 deletions
+2002
-2134
build.gradle
app/build.gradle
+5
-9
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+30
-19
AntiCollisionApp.kt
...c/main/java/com/waytous/anticollision/AntiCollisionApp.kt
+2
-0
ActivityViewModule.kt
...n/java/com/waytous/anticollision/di/ActivityViewModule.kt
+0
-78
FragmentModule.kt
.../main/java/com/waytous/anticollision/di/FragmentModule.kt
+16
-6
NetworkModule.kt
...c/main/java/com/waytous/anticollision/di/NetworkModule.kt
+7
-0
MainActivity.kt
...rc/main/java/com/waytous/anticollision/ui/MainActivity.kt
+0
-379
MainViewModel.kt
...c/main/java/com/waytous/anticollision/ui/MainViewModel.kt
+90
-22
SplashActivity.kt
.../main/java/com/waytous/anticollision/ui/SplashActivity.kt
+4
-3
CollectActivity.kt
...a/com/waytous/anticollision/ui/collect/CollectActivity.kt
+25
-31
HealthManagerActivity.kt
.../waytous/anticollision/ui/health/HealthManagerActivity.kt
+13
-0
HealthMangerFragment.kt
...m/waytous/anticollision/ui/health/HealthMangerFragment.kt
+0
-26
HomeActivity.kt
...in/java/com/waytous/anticollision/ui/home/HomeActivity.kt
+173
-0
HomeNoVideoFragment.kt
.../com/waytous/anticollision/ui/home/HomeNoVideoFragment.kt
+0
-78
UserSettingsActivity.kt
...waytous/anticollision/ui/settings/UserSettingsActivity.kt
+21
-0
UserSettingsFragment.kt
...waytous/anticollision/ui/settings/UserSettingsFragment.kt
+0
-33
DataStatisticsActivity.kt
...ous/anticollision/ui/statistics/DataStatisticsActivity.kt
+13
-0
DataStatisticsFragment.kt
...ous/anticollision/ui/statistics/DataStatisticsFragment.kt
+0
-23
HomeVideoActivity.kt
...a/com/waytous/anticollision/ui/video/HomeVideoActivity.kt
+107
-0
HomeVideoFragment.kt
...a/com/waytous/anticollision/ui/video/HomeVideoFragment.kt
+0
-91
ButtonMorePopup.kt
...java/com/waytous/anticollision/ui/view/ButtonMorePopup.kt
+39
-9
ButtonReportStatusPopup.kt
.../waytous/anticollision/ui/view/ButtonReportStatusPopup.kt
+25
-24
ButtonWorkStatusPopup.kt
...om/waytous/anticollision/ui/view/ButtonWorkStatusPopup.kt
+2
-4
MapExtensions.kt
...ain/java/com/waytous/anticollision/utils/MapExtensions.kt
+164
-2
VehicleAnnotation.kt
...in/java/com/waytous/anticollision/vo/VehicleAnnotation.kt
+0
-6
VehicleLocationInfo.kt
.../java/com/waytous/anticollision/vo/VehicleLocationInfo.kt
+23
-0
activity_collect.xml
app/src/main/res/layout/activity_collect.xml
+158
-147
activity_data_statistics.xml
app/src/main/res/layout/activity_data_statistics.xml
+135
-126
activity_health_manager.xml
app/src/main/res/layout/activity_health_manager.xml
+211
-201
activity_home.xml
app/src/main/res/layout/activity_home.xml
+270
-259
activity_home_video.xml
app/src/main/res/layout/activity_home_video.xml
+203
-194
activity_main.xml
app/src/main/res/layout/activity_main.xml
+0
-31
activity_splash.xml
app/src/main/res/layout/activity_splash.xml
+1
-1
activity_user_settings.xml
app/src/main/res/layout/activity_user_settings.xml
+119
-110
current_annotation_layout.xml
app/src/main/res/layout/current_annotation_layout.xml
+0
-0
dialog_delay_cause_select.xml
app/src/main/res/layout/dialog_delay_cause_select.xml
+1
-1
dialog_fault_cause_select.xml
app/src/main/res/layout/dialog_fault_cause_select.xml
+1
-1
dialog_standby_select.xml
app/src/main/res/layout/dialog_standby_select.xml
+1
-1
fragment_base.xml
app/src/main/res/layout/fragment_base.xml
+0
-15
layout_map_box.xml
app/src/main/res/layout/layout_map_box.xml
+116
-120
other_annotation_layout.xml
app/src/main/res/layout/other_annotation_layout.xml
+0
-0
popup_more_features.xml
app/src/main/res/layout/popup_more_features.xml
+27
-26
status_bar_layout.xml
app/src/main/res/layout/status_bar_layout.xml
+0
-0
activity_navigation.xml
app/src/main/res/navigation/activity_navigation.xml
+0
-19
mobile_navigation.xml
app/src/main/res/navigation/mobile_navigation.xml
+0
-39
No files found.
app/build.gradle
View file @
1d65e955
...
@@ -56,15 +56,13 @@ dependencies {
...
@@ -56,15 +56,13 @@ dependencies {
implementation
'androidx.core:core-ktx:1.10.1'
implementation
'androidx.core:core-ktx:1.10.1'
implementation
'androidx.appcompat:appcompat:1.6.1'
implementation
'androidx.appcompat:appcompat:1.6.1'
implementation
'androidx.activity:activity-ktx:1.
6.1
'
implementation
'androidx.activity:activity-ktx:1.
7.2
'
implementation
'com.google.android.material:material:1.9.0'
implementation
'com.google.android.material:material:1.9.0'
implementation
'androidx.constraintlayout:constraintlayout:2.1.4'
implementation
'androidx.constraintlayout:constraintlayout:2.1.4'
implementation
'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation
'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation
'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
implementation
'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
implementation
'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation
"androidx.room:room-runtime:2.5.2"
implementation
'androidx.navigation:navigation-ui-ktx:2.5.3'
implementation
"androidx.room:room-ktx:2.5.2"
implementation
"androidx.room:room-runtime:2.5.0"
implementation
"androidx.room:room-ktx:2.5.0"
implementation
'com.squareup.okhttp3:okhttp:4.10.0'
implementation
'com.squareup.okhttp3:okhttp:4.10.0'
implementation
'com.squareup.okhttp3:logging-interceptor:4.10.0'
implementation
'com.squareup.okhttp3:logging-interceptor:4.10.0'
...
@@ -78,20 +76,18 @@ dependencies {
...
@@ -78,20 +76,18 @@ dependencies {
implementation
'io.github.toggery:jt808-codec:2.0.3'
implementation
'io.github.toggery:jt808-codec:2.0.3'
implementation
'com.blankj:utilcodex:1.31.1'
implementation
'com.blankj:utilcodex:1.31.1'
implementation
'org.jetbrains.kotlin:kotlin-reflect:1.7.22'
implementation
'org.jetbrains.kotlin:kotlin-reflect:1.7.22'
implementation
'com.geyifeng.immersionbar:immersionbar:3.2.2'
implementation
'com.github.mik3y:usb-serial-for-android:3.5.1'
implementation
'com.github.mik3y:usb-serial-for-android:3.5.1'
implementation
'androidx.legacy:legacy-support-v4:1.0.0'
implementation
'androidx.legacy:legacy-support-v4:1.0.0'
implementation
'io.github.razerdp:BasePopup:3.2.1'
implementation
'io.github.razerdp:BasePopup:3.2.1'
// implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
// implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
implementation
'com.google.android.exoplayer:exoplayer:2.17.1'
implementation
'com.google.android.exoplayer:exoplayer:2.18.7'
implementation
'com.afollestad.material-dialogs:core:3.2.1'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
implementation
'com.squareup.retrofit2:converter-moshi:2.9.0'
implementation
'com.squareup.retrofit2:converter-moshi:2.9.0'
implementation
"com.google.dagger:hilt-android:2.46.1"
implementation
"com.google.dagger:hilt-android:2.46.1"
kapt
"com.google.dagger:hilt-compiler:2.44"
kapt
"com.google.dagger:hilt-compiler:2.44"
kapt
"androidx.room:room-compiler:2.5.
0
"
kapt
"androidx.room:room-compiler:2.5.
1
"
testImplementation
'junit:junit:4.13.2'
testImplementation
'junit:junit:4.13.2'
androidTestImplementation
'androidx.test.ext:junit:1.1.5'
androidTestImplementation
'androidx.test.ext:junit:1.1.5'
...
...
app/src/main/AndroidManifest.xml
View file @
1d65e955
...
@@ -2,34 +2,52 @@
...
@@ -2,34 +2,52 @@
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
>
xmlns:tools=
"http://schemas.android.com/tools"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<!-- 文件权限 -->
<!-- 文件权限 -->
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
tools:ignore=
"ScopedStorage"
/>
tools:ignore=
"ScopedStorage"
/>
<uses-permission
<uses-permission
android:name=
"android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
android:name=
"android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
tools:ignore=
"ProtectedPermissions"
/>
tools:ignore=
"ProtectedPermissions"
/>
<!-- 定位权限 -->
<!-- 定位权限 -->
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_COARSE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_COARSE_LOCATION"
/>
<application
<application
android:name=
".AntiCollisionApp"
android:name=
".AntiCollisionApp"
android:allowBackup=
"true"
android:allowBackup=
"true"
android:requestLegacyExternalStorage=
"true"
android:dataExtractionRules=
"@xml/data_extraction_rules"
android:dataExtractionRules=
"@xml/data_extraction_rules"
android:fullBackupContent=
"@xml/backup_rules"
android:fullBackupContent=
"@xml/backup_rules"
android:icon=
"@mipmap/waytous_logo"
android:icon=
"@mipmap/waytous_logo"
android:networkSecurityConfig=
"@xml/network_security_config"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:networkSecurityConfig=
"@xml/network_security_config"
android:requestLegacyExternalStorage=
"true"
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:theme=
"@style/Theme.HTAnticollision"
android:theme=
"@style/Theme.HTAnticollision"
android:usesCleartextTraffic=
"true"
android:usesCleartextTraffic=
"true"
tools:targetApi=
"31"
>
tools:targetApi=
"31"
>
<activity
<activity
android:name=
".SplashActivity"
android:name=
".ui.health.HealthManagerActivity"
android:exported=
"true"
android:screenOrientation=
"landscape"
/>
<activity
android:name=
".ui.statistics.DataStatisticsActivity"
android:exported=
"true"
android:screenOrientation=
"landscape"
/>
<activity
android:name=
".ui.settings.UserSettingsActivity"
android:exported=
"true"
android:screenOrientation=
"landscape"
/>
<activity
android:name=
".ui.video.HomeVideoActivity"
android:exported=
"true"
android:screenOrientation=
"landscape"
/>
<activity
android:name=
".ui.collect.CollectActivity"
android:exported=
"true"
android:screenOrientation=
"landscape"
/>
<activity
android:name=
".ui.SplashActivity"
android:exported=
"true"
android:exported=
"true"
android:screenOrientation=
"landscape"
android:screenOrientation=
"landscape"
android:theme=
"@style/SplashTheme"
>
android:theme=
"@style/SplashTheme"
>
...
@@ -40,17 +58,9 @@
...
@@ -40,17 +58,9 @@
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
<activity
android:name=
".ui.
Main
Activity"
android:name=
".ui.
home.Home
Activity"
android:exported=
"true"
android:exported=
"true"
android:screenOrientation=
"landscape"
>
android:screenOrientation=
"landscape"
/>
<intent-filter>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
<meta-data
android:name=
"android.app.lib_name"
android:value=
""
/>
</activity>
</application>
</application>
</manifest>
</manifest>
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/AntiCollisionApp.kt
View file @
1d65e955
package
com.waytous.anticollision
package
com.waytous.anticollision
import
android.app.Application
import
android.app.Application
import
com.blankj.utilcode.util.CrashUtils
import
com.blankj.utilcode.util.LogUtils
import
com.blankj.utilcode.util.LogUtils
import
com.blankj.utilcode.util.SPStaticUtils
import
com.blankj.utilcode.util.SPStaticUtils
import
com.blankj.utilcode.util.SPUtils
import
com.blankj.utilcode.util.SPUtils
...
@@ -13,6 +14,7 @@ class AntiCollisionApp: Application(){
...
@@ -13,6 +14,7 @@ class AntiCollisionApp: Application(){
super
.
onCreate
()
super
.
onCreate
()
Utils
.
init
(
this
)
Utils
.
init
(
this
)
LogUtils
.
getConfig
().
globalTag
=
"male"
LogUtils
.
getConfig
().
globalTag
=
"male"
CrashUtils
.
init
()
SPStaticUtils
.
setDefaultSPUtils
(
SPUtils
.
getInstance
(
"settings"
))
SPStaticUtils
.
setDefaultSPUtils
(
SPUtils
.
getInstance
(
"settings"
))
}
}
...
...
app/src/main/java/com/waytous/anticollision/di/ActivityViewModule.kt
deleted
100644 → 0
View file @
fdbd57de
package
com.waytous.anticollision.di
import
android.content.Context
import
android.view.LayoutInflater
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.LayoutMapBoxBinding
import
com.waytous.anticollision.databinding.PopupMoreFeaturesBinding
import
com.waytous.anticollision.databinding.PopupReportStatusBinding
import
com.waytous.anticollision.databinding.PopupWorkStatusEditBinding
import
com.waytous.anticollision.ui.view.ButtonMorePopup
import
com.waytous.anticollision.ui.view.ButtonReportStatusPopup
import
com.waytous.anticollision.ui.view.ButtonWorkStatusPopup
import
dagger.Module
import
dagger.Provides
import
dagger.hilt.InstallIn
import
dagger.hilt.android.components.ActivityComponent
import
dagger.hilt.android.qualifiers.ActivityContext
import
dagger.hilt.android.scopes.ActivityScoped
@InstallIn
(
ActivityComponent
::
class
)
@Module
object
ActivityViewModule
{
@ActivityScoped
@Provides
fun
provideMapBoxInflater
(
@ActivityContext
context
:
Context
):
LayoutMapBoxBinding
{
val
layoutInflater
=
LayoutInflater
.
from
(
context
).
also
{
it
.
inflate
(
R
.
layout
.
layout_map_box
,
null
)
}
return
LayoutMapBoxBinding
.
inflate
(
layoutInflater
,
null
,
false
)
}
@ActivityScoped
@Provides
fun
provideButtonMorePopupWindowInflater
(
@ActivityContext
context
:
Context
):
PopupMoreFeaturesBinding
{
val
layoutInflater
=
LayoutInflater
.
from
(
context
).
also
{
it
.
inflate
(
R
.
layout
.
popup_more_features
,
null
)
}
return
PopupMoreFeaturesBinding
.
inflate
(
layoutInflater
,
null
,
false
)
}
@ActivityScoped
@Provides
fun
provideReportStatusPopupWindowInflater
(
@ActivityContext
context
:
Context
):
PopupReportStatusBinding
{
val
layoutInflater
=
LayoutInflater
.
from
(
context
).
also
{
it
.
inflate
(
R
.
layout
.
popup_report_status
,
null
)
}
return
PopupReportStatusBinding
.
inflate
(
layoutInflater
,
null
,
false
)
}
@ActivityScoped
@Provides
fun
provideWorkStatusEditPopupWindowInflater
(
@ActivityContext
context
:
Context
):
PopupWorkStatusEditBinding
{
val
layoutInflater
=
LayoutInflater
.
from
(
context
).
also
{
it
.
inflate
(
R
.
layout
.
popup_work_status_edit
,
null
)
}
return
PopupWorkStatusEditBinding
.
inflate
(
layoutInflater
,
null
,
false
)
}
@ActivityScoped
@Provides
fun
provideButtonMorePopupWindow
(
@ActivityContext
context
:
Context
,
binding
:
PopupMoreFeaturesBinding
):
ButtonMorePopup
{
return
ButtonMorePopup
(
context
,
binding
)
}
@ActivityScoped
@Provides
fun
provideButtonReportStatusPopupWindow
(
@ActivityContext
context
:
Context
,
binding
:
PopupReportStatusBinding
):
ButtonReportStatusPopup
{
return
ButtonReportStatusPopup
(
context
,
binding
)
}
@ActivityScoped
@Provides
fun
provideButtonWorkStatusEditPopupWindow
(
@ActivityContext
context
:
Context
,
binding
:
PopupWorkStatusEditBinding
):
ButtonWorkStatusPopup
{
return
ButtonWorkStatusPopup
(
context
,
binding
)
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/di/Fragment
View
Module.kt
→
app/src/main/java/com/waytous/anticollision/di/FragmentModule.kt
View file @
1d65e955
...
@@ -3,20 +3,30 @@ package com.waytous.anticollision.di
...
@@ -3,20 +3,30 @@ package com.waytous.anticollision.di
import
android.content.Context
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
com.waytous.anticollision.R
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.LayoutMapBoxBinding
import
com.waytous.anticollision.databinding.RadioTabCollectBinding
import
com.waytous.anticollision.databinding.RadioTabCollectBinding
import
com.waytous.anticollision.databinding.RadioTabSettingsBinding
import
com.waytous.anticollision.databinding.RadioTabSettingsBinding
import
dagger.Module
import
dagger.Module
import
dagger.Provides
import
dagger.Provides
import
dagger.hilt.InstallIn
import
dagger.hilt.InstallIn
import
dagger.hilt.android.components.
Fragment
Component
import
dagger.hilt.android.components.
Activity
Component
import
dagger.hilt.android.qualifiers.ActivityContext
import
dagger.hilt.android.qualifiers.ActivityContext
import
dagger.hilt.android.scopes.
Fragment
Scoped
import
dagger.hilt.android.scopes.
Activity
Scoped
@InstallIn
(
Fragment
Component
::
class
)
@InstallIn
(
Activity
Component
::
class
)
@Module
@Module
object
Fragment
View
Module
{
object
FragmentModule
{
@FragmentScoped
@ActivityScoped
@Provides
fun
provideMapBoxInflater
(
@ActivityContext
context
:
Context
):
LayoutMapBoxBinding
{
val
layoutInflater
=
LayoutInflater
.
from
(
context
).
also
{
it
.
inflate
(
R
.
layout
.
layout_map_box
,
null
)
}
return
LayoutMapBoxBinding
.
inflate
(
layoutInflater
,
null
,
false
)
}
@ActivityScoped
@Provides
@Provides
fun
provideRadioTabCollect
(
@ActivityContext
context
:
Context
):
RadioTabCollectBinding
{
fun
provideRadioTabCollect
(
@ActivityContext
context
:
Context
):
RadioTabCollectBinding
{
val
layoutInflater
=
LayoutInflater
.
from
(
context
).
also
{
val
layoutInflater
=
LayoutInflater
.
from
(
context
).
also
{
...
@@ -25,7 +35,7 @@ object FragmentViewModule {
...
@@ -25,7 +35,7 @@ object FragmentViewModule {
return
RadioTabCollectBinding
.
inflate
(
layoutInflater
,
null
,
false
)
return
RadioTabCollectBinding
.
inflate
(
layoutInflater
,
null
,
false
)
}
}
@
Fragment
Scoped
@
Activity
Scoped
@Provides
@Provides
fun
provideRadioTabSettings
(
@ActivityContext
context
:
Context
):
RadioTabSettingsBinding
{
fun
provideRadioTabSettings
(
@ActivityContext
context
:
Context
):
RadioTabSettingsBinding
{
val
layoutInflater
=
LayoutInflater
.
from
(
context
).
also
{
val
layoutInflater
=
LayoutInflater
.
from
(
context
).
also
{
...
...
app/src/main/java/com/waytous/anticollision/di/NetworkModule.kt
View file @
1d65e955
...
@@ -4,6 +4,8 @@ import com.squareup.moshi.Moshi
...
@@ -4,6 +4,8 @@ import com.squareup.moshi.Moshi
import
com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
import
com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
import
com.waytous.anticollision.data.api.ApiConstants
import
com.waytous.anticollision.data.api.ApiConstants
import
com.waytous.anticollision.data.api.MapApiService
import
com.waytous.anticollision.data.api.MapApiService
import
com.waytous.anticollision.repository.MainRepository
import
com.waytous.anticollision.ui.MainViewModel
import
dagger.Module
import
dagger.Module
import
dagger.Provides
import
dagger.Provides
import
dagger.hilt.InstallIn
import
dagger.hilt.InstallIn
...
@@ -46,4 +48,8 @@ object NetworkModule {
...
@@ -46,4 +48,8 @@ object NetworkModule {
@Provides
@Provides
fun
provideMapApiService
(
retrofit
:
Retrofit
):
MapApiService
=
retrofit
.
create
(
MapApiService
::
class
.
java
)
fun
provideMapApiService
(
retrofit
:
Retrofit
):
MapApiService
=
retrofit
.
create
(
MapApiService
::
class
.
java
)
@Provides
fun
provideMainRepository
(
mapApiService
:
MapApiService
):
MainRepository
=
MainRepository
(
mapApiService
)
@Provides
fun
provideMainViewModel
(
repository
:
MainRepository
)
=
MainViewModel
(
repository
)
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/MainActivity.kt
deleted
100644 → 0
View file @
fdbd57de
package
com.waytous.anticollision.ui
import
android.os.Bundle
import
androidx.activity.viewModels
import
androidx.appcompat.app.AppCompatActivity
import
androidx.lifecycle.Lifecycle
import
androidx.lifecycle.lifecycleScope
import
androidx.lifecycle.repeatOnLifecycle
import
com.blankj.utilcode.util.LogUtils
import
com.blankj.utilcode.util.ScreenUtils
import
com.mapbox.geojson.Point
import
com.mapbox.maps.CameraOptions
import
com.mapbox.maps.Style
import
com.mapbox.maps.ViewAnnotationAnchor
import
com.mapbox.maps.extension.style.layers.properties.generated.IconAnchor
import
com.mapbox.maps.extension.style.style
import
com.mapbox.maps.plugin.animation.flyTo
import
com.mapbox.maps.plugin.annotation.AnnotationConfig
import
com.mapbox.maps.plugin.annotation.annotations
import
com.mapbox.maps.plugin.annotation.generated.PointAnnotationManager
import
com.mapbox.maps.plugin.annotation.generated.PointAnnotationOptions
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
import
com.waytous.anticollision.databinding.ActivityMainBinding
import
com.waytous.anticollision.databinding.CurrentVehicleViewAnnotationLayoutBinding
import
com.waytous.anticollision.databinding.LayoutMapBoxBinding
import
com.waytous.anticollision.databinding.OtherVehicleViewAnnotationLayoutBinding
import
com.waytous.anticollision.utils.BARRICADE_SOURCE
import
com.waytous.anticollision.utils.BitmapUtils
import
com.waytous.anticollision.utils.DIGGING_WORK_AREA_SOURCE
import
com.waytous.anticollision.utils.DUMP_AREA_SOURCE
import
com.waytous.anticollision.utils.ELECTRONIC_FENCE_SOURCE
import
com.waytous.anticollision.utils.LANE_NODE_SOURCE
import
com.waytous.anticollision.utils.LANE_SOURCE
import
com.waytous.anticollision.utils.LATITUDE
import
com.waytous.anticollision.utils.LONGITUDE
import
com.waytous.anticollision.utils.MY_MAP_BOX_STYLE
import
com.waytous.anticollision.utils.OBSTACLES_SOURCE
import
com.waytous.anticollision.utils.PARK_SPOT_SOURCE
import
com.waytous.anticollision.utils.RUNNABLE_AREA_SOURCE
import
com.waytous.anticollision.utils.STATIC_OBJECTS_SOURCE
import
com.waytous.anticollision.utils.STATION_AREA_SOURCE
import
com.waytous.anticollision.utils.TRUCK_PATH_LAYER
import
com.waytous.anticollision.utils.WET_AREA_SOURCE
import
com.waytous.anticollision.utils.addBarricadeLineLayer
import
com.waytous.anticollision.utils.addBarricadeSource
import
com.waytous.anticollision.utils.addDiggingWorkAreaFillLayer
import
com.waytous.anticollision.utils.addDiggingWorkAreaSource
import
com.waytous.anticollision.utils.addDiggingWorkAreaSymbolLayer
import
com.waytous.anticollision.utils.addDumpAreaFillLayer
import
com.waytous.anticollision.utils.addDumpAreaSource
import
com.waytous.anticollision.utils.addDumpAreaSymbolLayer
import
com.waytous.anticollision.utils.addElectronicFenceFillLayer
import
com.waytous.anticollision.utils.addElectronicFenceSource
import
com.waytous.anticollision.utils.addElectronicFenceSymbolLayer
import
com.waytous.anticollision.utils.addLaneLayer
import
com.waytous.anticollision.utils.addLaneNodeCircleLayer
import
com.waytous.anticollision.utils.addLaneNodeSource
import
com.waytous.anticollision.utils.addLaneNodeSymbolLayer
import
com.waytous.anticollision.utils.addLaneSource
import
com.waytous.anticollision.utils.addObstaclesFillLayer
import
com.waytous.anticollision.utils.addObstaclesSource
import
com.waytous.anticollision.utils.addObstaclesSymbolLayer
import
com.waytous.anticollision.utils.addParkSpotFillLayer
import
com.waytous.anticollision.utils.addParkSpotSource
import
com.waytous.anticollision.utils.addParkSpotSymbolLayer
import
com.waytous.anticollision.utils.addRunnableAreaLayer
import
com.waytous.anticollision.utils.addRunnableAreaSource
import
com.waytous.anticollision.utils.addStaticObjectsFillLayer
import
com.waytous.anticollision.utils.addStaticObjectsSource
import
com.waytous.anticollision.utils.addStaticObjectsSymbolLayer
import
com.waytous.anticollision.utils.addStationAreaFillLayer
import
com.waytous.anticollision.utils.addStationAreaSource
import
com.waytous.anticollision.utils.addStationAreaSymbolLayer
import
com.waytous.anticollision.utils.addTruckPathLineLayer
import
com.waytous.anticollision.utils.addTruckPathSource
import
com.waytous.anticollision.utils.addWetAreaFillLayer
import
com.waytous.anticollision.utils.addWetAreaSource
import
com.waytous.anticollision.utils.addWetAreaSymbolLayer
import
com.waytous.anticollision.utils.adjustLayerOrder
import
com.waytous.anticollision.vo.VehicleAnnotation
import
dagger.hilt.android.AndroidEntryPoint
import
kotlinx.coroutines.launch
import
java.math.BigDecimal
import
javax.inject.Inject
@AndroidEntryPoint
class
MainActivity
:
AppCompatActivity
()
{
private
lateinit
var
binding
:
ActivityMainBinding
private
val
viewModel
:
MainModel
by
viewModels
()
@Inject
lateinit
var
mapBinding
:
LayoutMapBoxBinding
private
val
mapboxMap
by
lazy
{
mapBinding
.
mapView
.
getMapboxMap
()
}
val
iconCurrentNormalVehicleBitmap
by
lazy
{
BitmapUtils
.
bitmapFromDrawableRes
(
this
,
R
.
drawable
.
my_vehicle_normal
)
}
private
val
iconOtherAlarmVehicleBitmap
by
lazy
{
BitmapUtils
.
bitmapFromDrawableRes
(
this
,
R
.
drawable
.
other_vehicle_normal
)
}
private
lateinit
var
viewAnnotationManager
:
ViewAnnotationManager
private
lateinit
var
pointAnnotationManager
:
PointAnnotationManager
private
val
cameraOptions
:
CameraOptions
by
lazy
{
CameraOptions
.
Builder
().
center
(
Point
.
fromLngLat
(
LONGITUDE
,
LATITUDE
)
).
zoom
(
14.0
).
build
()
}
companion
object
{
private
val
scaleLengths
=
listOf
(
5
,
10
,
20
,
50
,
100
,
200
,
500
,
1000
,
2000
,
5000
,
10000
,
20000
,
50000
,
100000
,
200000
,
500000
,
1000000
,
2000000
)
const
val
MINIMUM_ZOOM_LEVEL
=
11.0
const
val
MAXIMUM_ZOOM_LEVEL
=
26.0
const
val
DEFAULT_ZOOM_LEVEL
=
14.0
}
private
fun
setupMapBox
()
{
LogUtils
.
d
(
"setupMapBox"
)
mapboxMap
.
setCamera
(
cameraOptions
)
mapBinding
.
zoomIn
.
setOnClickListener
{
val
zoomLevel
=
BigDecimal
(
mapboxMap
.
cameraState
.
zoom
).
minus
(
BigDecimal
(
0.1
.
toString
()))
when
(
BigDecimal
(
MINIMUM_ZOOM_LEVEL
.
toString
()).
compareTo
(
zoomLevel
))
{
-
1
->
{
mapboxMap
.
setCamera
(
CameraOptions
.
Builder
().
zoom
(
zoomLevel
.
toDouble
()).
build
())
}
else
->
{
mapboxMap
.
setCamera
(
CameraOptions
.
Builder
().
zoom
(
DEFAULT_ZOOM_LEVEL
).
build
())
}
}
}
mapBinding
.
zoomOut
.
setOnClickListener
{
val
zoomLevel
=
BigDecimal
(
mapboxMap
.
cameraState
.
zoom
).
add
(
BigDecimal
(
0.1
.
toString
()))
when
(
BigDecimal
(
MAXIMUM_ZOOM_LEVEL
.
toString
()).
compareTo
(
zoomLevel
))
{
-
1
->
{
mapboxMap
.
setCamera
(
CameraOptions
.
Builder
().
zoom
(
DEFAULT_ZOOM_LEVEL
).
build
())
}
else
->
{
mapboxMap
.
setCamera
(
CameraOptions
.
Builder
().
zoom
(
zoomLevel
.
toDouble
()).
build
())
}
}
LogUtils
.
d
(
"zoom out:${mapBinding.mapView.scalebar.distancePerPixel}"
)
}
mapBinding
.
locationTruck
.
setOnClickListener
{
mapboxMap
.
flyTo
(
cameraOptions
)
}
mapboxMap
.
loadStyle
(
style
(
MY_MAP_BOX_STYLE
)
{
})
{
setupStyle
(
it
)
}
}
fun
addTempAnnotations
()
{
val
otherAnnotation
=
VehicleAnnotation
(
"KK-01"
,
36
,
25
,
Point
.
fromLngLat
(
LONGITUDE
,
LATITUDE
),
true
)
updateCurrentVehicleAnnotation
(
otherAnnotation
)
val
otherAnnotation1
=
VehicleAnnotation
(
"KK-02"
,
24
,
25
,
Point
.
fromLngLat
(
119.76739
,
49.37722
),
true
)
val
otherAnnotation2
=
VehicleAnnotation
(
"KK-03"
,
36
,
20
,
Point
.
fromLngLat
(
119.75694
,
49.38632
),
true
)
val
others
=
listOf
(
otherAnnotation1
,
otherAnnotation2
)
addOtherVehicleAnnotations
(
others
)
}
private
fun
initAnnotationManager
()
{
viewAnnotationManager
=
mapBinding
.
mapView
.
viewAnnotationManager
pointAnnotationManager
=
mapBinding
.
mapView
.
annotations
.
createPointAnnotationManager
(
AnnotationConfig
(
TRUCK_PATH_LAYER
)
)
}
fun
updateCurrentVehicleAnnotation
(
otherAnnotation
:
VehicleAnnotation
)
{
val
pointAnnotationOptions
:
PointAnnotationOptions
=
PointAnnotationOptions
()
.
withPoint
(
otherAnnotation
.
point
)
.
withIconImage
(
iconCurrentNormalVehicleBitmap
!!
)
.
withIconSize
(
0.25
)
.
withIconAnchor
(
IconAnchor
.
BOTTOM
)
.
withDraggable
(
false
)
val
pointAnnotation
=
pointAnnotationManager
.
create
(
pointAnnotationOptions
)
pointAnnotation
.
symbolSortKey
=
Double
.
MAX_VALUE
val
viewAnnotation
=
viewAnnotationManager
.
addViewAnnotation
(
resId
=
R
.
layout
.
current_vehicle_view_annotation_layout
,
options
=
viewAnnotationOptions
{
geometry
(
otherAnnotation
.
point
)
associatedFeatureId
(
pointAnnotation
.
featureIdentifier
)
anchor
(
ViewAnnotationAnchor
.
BOTTOM
)
offsetY
((
pointAnnotation
.
iconImageBitmap
?.
height
!!
*
0.25
).
toInt
())
allowOverlap
(
true
)
}
)
val
binding
=
CurrentVehicleViewAnnotationLayoutBinding
.
bind
(
viewAnnotation
)
binding
.
annotationCurrentVehicleNo
.
text
=
getString
(
R
.
string
.
annotation_vehicle_no
,
"KK-001"
)
binding
.
annotationCurrentVehicleSpeed
.
text
=
getString
(
R
.
string
.
annotation_vehicle_speed
,
36
)
}
fun
addOtherVehicleAnnotations
(
others
:
List
<
VehicleAnnotation
>)
{
others
.
forEach
{
vehicle
->
val
pointAnnotationOptions
:
PointAnnotationOptions
=
PointAnnotationOptions
()
.
withPoint
(
vehicle
.
point
)
.
withIconImage
(
iconOtherAlarmVehicleBitmap
!!
)
.
withIconSize
(
0.25
)
.
withIconAnchor
(
IconAnchor
.
BOTTOM
)
.
withDraggable
(
false
)
val
pointAnnotation
=
pointAnnotationManager
.
create
(
pointAnnotationOptions
)
pointAnnotation
.
symbolSortKey
=
Double
.
MAX_VALUE
val
viewAnnotation
=
viewAnnotationManager
.
addViewAnnotation
(
resId
=
R
.
layout
.
other_vehicle_view_annotation_layout
,
options
=
viewAnnotationOptions
{
geometry
(
vehicle
.
point
)
associatedFeatureId
(
pointAnnotation
.
featureIdentifier
)
anchor
(
ViewAnnotationAnchor
.
BOTTOM
)
offsetY
((
pointAnnotation
.
iconImageBitmap
?.
height
!!
*
0.25
).
toInt
())
allowOverlap
(
true
)
}
)
val
binding
=
OtherVehicleViewAnnotationLayoutBinding
.
bind
(
viewAnnotation
)
binding
.
annotationOtherVehicleNo
.
text
=
getString
(
R
.
string
.
annotation_vehicle_no
,
vehicle
.
vehicleNo
)
binding
.
annotationOtherVehicleSpeed
.
text
=
vehicle
.
speed
.
toString
()
binding
.
annotationOtherVehicleDistance
.
text
=
vehicle
.
distance
.
toString
()
}
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
ScreenUtils
.
setFullScreen
(
this
)
binding
=
ActivityMainBinding
.
inflate
(
layoutInflater
)
setContentView
(
binding
.
root
)
with
(
mapBinding
.
mapView
){
logo
.
enabled
=
false
compass
.
enabled
=
false
attribution
.
enabled
=
false
}
setupMapBox
()
}
private
fun
setupStyle
(
style
:
Style
)
{
lifecycleScope
.
launch
{
repeatOnLifecycle
(
Lifecycle
.
State
.
CREATED
)
{
viewModel
.
loadMapDataSource
().
collect
{
when
(
it
.
sourceId
){
OBSTACLES_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addObstaclesSource
(
it
.
geojson
)
style
.
addObstaclesFillLayer
()
style
.
addObstaclesSymbolLayer
()
}
}
ELECTRONIC_FENCE_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addElectronicFenceSource
(
it
.
geojson
)
style
.
addElectronicFenceFillLayer
()
style
.
addElectronicFenceSymbolLayer
()
}
}
WET_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addWetAreaSource
(
it
.
geojson
)
style
.
addWetAreaFillLayer
()
style
.
addWetAreaSymbolLayer
()
}
}
LANE_NODE_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addLaneNodeSource
(
it
.
geojson
)
style
.
addLaneNodeCircleLayer
()
style
.
addLaneNodeSymbolLayer
()
}
}
LANE_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addLaneSource
(
it
.
geojson
)
style
.
addLaneLayer
()
}
}
RUNNABLE_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addRunnableAreaSource
(
it
.
geojson
)
style
.
addRunnableAreaLayer
()
}
}
DUMP_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addDumpAreaSource
(
it
.
geojson
)
style
.
addDumpAreaFillLayer
()
style
.
addDumpAreaSymbolLayer
()
}
}
DIGGING_WORK_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addDiggingWorkAreaSource
(
it
.
geojson
)
style
.
addDiggingWorkAreaFillLayer
()
style
.
addDiggingWorkAreaSymbolLayer
()
}
}
BARRICADE_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addBarricadeSource
(
it
.
geojson
)
style
.
addBarricadeLineLayer
()
}
}
STATION_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addStationAreaSource
(
it
.
geojson
)
style
.
addStationAreaFillLayer
()
style
.
addStationAreaSymbolLayer
()
}
}
PARK_SPOT_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addParkSpotSource
(
it
.
geojson
)
style
.
addParkSpotFillLayer
()
style
.
addParkSpotSymbolLayer
()
}
}
STATIC_OBJECTS_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addStaticObjectsSource
(
it
.
geojson
)
style
.
addStaticObjectsFillLayer
()
style
.
addStaticObjectsSymbolLayer
()
}
}
else
->{
style
.
addTruckPathSource
()
style
.
addTruckPathLineLayer
()
}
}
style
.
adjustLayerOrder
()
}
}
}
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/MainModel.kt
→
app/src/main/java/com/waytous/anticollision/ui/Main
View
Model.kt
View file @
1d65e955
package
com.waytous.anticollision.ui
package
com.waytous.anticollision.ui
import
androidx.lifecycle.MutableLiveData
import
androidx.lifecycle.ViewModel
import
androidx.lifecycle.ViewModel
import
androidx.lifecycle.viewModelScope
import
androidx.lifecycle.viewModelScope
import
com.mapbox.geojson.Point
import
com.mapbox.geojson.Point
import
com.mapbox.maps.CameraOptions
import
com.waytous.anticollision.BuildConfig
import
com.waytous.anticollision.bean.MapDataSource
import
com.waytous.anticollision.bean.MapDataSource
import
com.waytous.anticollision.repository.MainRepository
import
com.waytous.anticollision.repository.MainRepository
import
com.waytous.anticollision.utils.
LATITUD
E
import
com.waytous.anticollision.utils.
TRUCK_PATH_SOURC
E
import
com.waytous.anticollision.
utils.LONGITUDE
import
com.waytous.anticollision.
vo.VehicleLocationInfo
import
dagger.hilt.android.lifecycle.HiltViewModel
import
dagger.hilt.android.lifecycle.HiltViewModel
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.ExperimentalCoroutinesApi
import
kotlinx.coroutines.ExperimentalCoroutinesApi
import
kotlinx.coroutines.flow.MutableStateFlow
import
kotlinx.coroutines.flow.MutableStateFlow
import
kotlinx.coroutines.flow.StateFlow
import
kotlinx.coroutines.flow.flattenMerge
import
kotlinx.coroutines.flow.flattenMerge
import
kotlinx.coroutines.flow.flow
import
kotlinx.coroutines.flow.flowOf
import
kotlinx.coroutines.flow.flowOf
import
kotlinx.coroutines.flow.flowOn
import
kotlinx.coroutines.flow.stateIn
import
kotlinx.coroutines.flow.stateIn
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
import
java.math.BigDecimal
import
java.math.BigDecimal
import
javax.inject.Inject
import
javax.inject.Inject
@HiltViewModel
@HiltViewModel
class
MainModel
@Inject
constructor
(
private
val
mainRepository
:
MainRepository
)
:
ViewModel
()
{
class
Main
View
Model
@Inject
constructor
(
private
val
mainRepository
:
MainRepository
)
:
ViewModel
()
{
val
zoom
:
MutableLiveData
<
BigDecimal
>
by
lazy
{
private
val
_cameraOptions
=
MutableStateFlow
(
CameraOptions
.
Builder
()
MutableLiveData
(
BigDecimal
(
16.0
))
.
center
(
Point
.
fromLngLat
(
BuildConfig
.
DEFAULT_LONGITUDE
,
BuildConfig
.
DEFAULT_LATITUDE
))
}
.
zoom
(
DEFAULT_ZOOM_VALUE
.
toDouble
())
.
build
()
)
val
center
:
MutableLiveData
<
Point
>
by
lazy
{
val
cameraOptions
:
StateFlow
<
CameraOptions
>
=
_cameraOptions
MutableLiveData
(
Point
.
fromLngLat
(
LONGITUDE
,
LATITUDE
))
}
private
val
_obstaclesSource
=
MutableStateFlow
(
MapDataSource
())
private
val
_obstaclesSource
=
MutableStateFlow
(
MapDataSource
())
val
obstaclesSource
:
StateFlow
<
MapDataSource
>
=
_obstaclesSource
private
val
_electronicFence
=
MutableStateFlow
(
MapDataSource
())
private
val
_electronicFence
=
MutableStateFlow
(
MapDataSource
())
val
electronicFence
:
StateFlow
<
MapDataSource
>
=
_electronicFence
private
val
_wetArea
=
MutableStateFlow
(
MapDataSource
())
private
val
_wetArea
=
MutableStateFlow
(
MapDataSource
())
val
wetArea
:
StateFlow
<
MapDataSource
>
=
_wetArea
private
val
_laneNode
=
MutableStateFlow
(
MapDataSource
())
private
val
_laneNode
=
MutableStateFlow
(
MapDataSource
())
val
laneNode
:
StateFlow
<
MapDataSource
>
=
_laneNode
private
val
_lane
=
MutableStateFlow
(
MapDataSource
())
private
val
_lane
=
MutableStateFlow
(
MapDataSource
())
val
lane
:
StateFlow
<
MapDataSource
>
=
_lane
private
val
_runnableArea
=
MutableStateFlow
(
MapDataSource
())
private
val
_runnableArea
=
MutableStateFlow
(
MapDataSource
())
val
runnableArea
:
StateFlow
<
MapDataSource
>
=
_runnableArea
private
val
_dumpArea
=
MutableStateFlow
(
MapDataSource
())
private
val
_dumpArea
=
MutableStateFlow
(
MapDataSource
())
val
dumpArea
:
StateFlow
<
MapDataSource
>
=
_dumpArea
private
val
_diggingWorkArea
=
MutableStateFlow
(
MapDataSource
())
private
val
_diggingWorkArea
=
MutableStateFlow
(
MapDataSource
())
val
diggingWorkArea
:
StateFlow
<
MapDataSource
>
=
_diggingWorkArea
private
val
_barricade
=
MutableStateFlow
(
MapDataSource
())
private
val
_barricade
=
MutableStateFlow
(
MapDataSource
())
val
barricade
:
StateFlow
<
MapDataSource
>
=
_barricade
private
val
_stationArea
=
MutableStateFlow
(
MapDataSource
())
private
val
_stationArea
=
MutableStateFlow
(
MapDataSource
())
val
stationArea
:
StateFlow
<
MapDataSource
>
=
_stationArea
private
val
_parkSpot
=
MutableStateFlow
(
MapDataSource
())
private
val
_parkSpot
=
MutableStateFlow
(
MapDataSource
())
val
parkSpot
:
StateFlow
<
MapDataSource
>
=
_parkSpot
private
val
_staticObjects
=
MutableStateFlow
(
MapDataSource
())
private
val
_staticObjects
=
MutableStateFlow
(
MapDataSource
())
val
staticObjects
:
StateFlow
<
MapDataSource
>
=
_staticObjects
private
val
_truckPathSource
=
MutableStateFlow
(
MapDataSource
(
TRUCK_PATH_SOURCE
))
val
truckPathSource
:
StateFlow
<
MapDataSource
>
=
_truckPathSource
init
{
init
{
viewModelScope
.
launch
{
viewModelScope
.
launch
{
mainRepository
.
remoteObstaclesVersion
().
collect
{
mainRepository
.
remoteObstaclesVersion
().
collect
{
...
@@ -138,21 +171,55 @@ class MainModel @Inject constructor(private val mainRepository: MainRepository)
...
@@ -138,21 +171,55 @@ class MainModel @Inject constructor(private val mainRepository: MainRepository)
}
}
}
}
}
}
viewModelScope
.
launch
{
flow
{
emit
(
_cameraOptions
.
value
)
}
}
}
}
@OptIn
(
ExperimentalCoroutinesApi
::
class
)
@OptIn
(
ExperimentalCoroutinesApi
::
class
)
suspend
fun
loadMapDataSource
()
=
flowOf
(
suspend
fun
loadMapDataSource
()
=
flowOf
(
_obstaclesSource
,
mainRepository
.
remoteObstaclesVersion
(),
_electronicFence
,
mainRepository
.
remoteElectronicFenceVersion
(),
_wetArea
,
mainRepository
.
remoteWetAreaVersion
(),
_laneNode
,
mainRepository
.
remoteLaneNodeVersion
(),
_lane
,
mainRepository
.
remoteLaneVersion
(),
_runnableArea
,
mainRepository
.
remoteRunnableAreaVersion
(),
_dumpArea
,
mainRepository
.
remoteDumpAreaVersion
(),
_diggingWorkArea
,
mainRepository
.
remoteDiggingWorkAreaVersion
(),
_barricade
,
mainRepository
.
remoteBarricadeVersion
(),
_stationArea
,
mainRepository
.
remoteStationAreaVersion
(),
_parkSpot
,
mainRepository
.
remoteParkSpotVersion
(),
_staticObjects
mainRepository
.
remoteStaticObjectsVersion
(),
flowOf
(
MapDataSource
(
TRUCK_PATH_SOURCE
)),
).
flattenMerge
().
stateIn
(
viewModelScope
)
).
flattenMerge
().
stateIn
(
viewModelScope
)
suspend
fun
updateAroundVehicles
(
vehicleInfo
:
List
<
VehicleLocationInfo
>)
=
flow
{
emit
(
vehicleInfo
)
}.
flowOn
(
Dispatchers
.
IO
).
stateIn
(
viewModelScope
)
fun
updateZoom
(
zoom
:
BigDecimal
){
when
{
zoom
.
compareTo
(
MIN_ZOOM_VALUE
)
==
-
1
->{
_cameraOptions
.
value
=
_cameraOptions
.
value
.
toBuilder
().
zoom
(
MIN_ZOOM_VALUE
.
toDouble
()).
build
()
}
zoom
.
compareTo
(
MAX_ZOOM_VALUE
)
==
1
->{
_cameraOptions
.
value
=
_cameraOptions
.
value
.
toBuilder
().
zoom
(
MAX_ZOOM_VALUE
.
toDouble
()).
build
()
}
else
->{
_cameraOptions
.
value
=
_cameraOptions
.
value
.
toBuilder
().
zoom
(
zoom
.
toDouble
()).
build
()
}
}
}
companion
object
{
val
DEFAULT_ZOOM_VALUE
=
BigDecimal
(
"14.0"
)
val
MAX_ZOOM_VALUE
=
BigDecimal
(
"22.0"
)
val
MIN_ZOOM_VALUE
=
BigDecimal
(
"8.0"
)
}
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/SplashActivity.kt
→
app/src/main/java/com/waytous/anticollision/
ui/
SplashActivity.kt
View file @
1d65e955
package
com.waytous.anticollision
package
com.waytous.anticollision
.ui
import
android.content.Intent
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
androidx.appcompat.app.AppCompatActivity
import
androidx.appcompat.app.AppCompatActivity
import
com.blankj.utilcode.util.BarUtils
import
com.blankj.utilcode.util.BarUtils
import
com.blankj.utilcode.util.ColorUtils
import
com.blankj.utilcode.util.ColorUtils
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.ActivitySplashBinding
import
com.waytous.anticollision.databinding.ActivitySplashBinding
import
com.waytous.anticollision.ui.
Main
Activity
import
com.waytous.anticollision.ui.
home.Home
Activity
class
SplashActivity
:
AppCompatActivity
()
{
class
SplashActivity
:
AppCompatActivity
()
{
...
@@ -25,7 +26,7 @@ class SplashActivity : AppCompatActivity() {
...
@@ -25,7 +26,7 @@ class SplashActivity : AppCompatActivity() {
binding
.
loadingProgressBar
.
progress
=
57
binding
.
loadingProgressBar
.
progress
=
57
binding
.
loadingProgressBar
.
show
()
binding
.
loadingProgressBar
.
show
()
binding
.
loadingProgressBar
.
postDelayed
({
binding
.
loadingProgressBar
.
postDelayed
({
startActivity
(
Intent
(
this
,
Main
Activity
::
class
.
java
))
startActivity
(
Intent
(
this
,
Home
Activity
::
class
.
java
))
},
2000
)
},
2000
)
}
}
...
...
app/src/main/java/com/waytous/anticollision/ui/collect/Collect
Fragment
.kt
→
app/src/main/java/com/waytous/anticollision/ui/collect/Collect
Activity
.kt
View file @
1d65e955
package
com.waytous.anticollision.ui.collect
package
com.waytous.anticollision.ui.collect
import
android.os.Bundle
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.widget.AdapterView
import
android.widget.AdapterView
import
android.widget.AdapterView.OnItemSelectedListener
import
androidx.appcompat.app.AppCompatActivity
import
androidx.fragment.app.Fragment
import
com.blankj.utilcode.util.BarUtils
import
androidx.navigation.fragment.findNavController
import
com.blankj.utilcode.util.LogUtils
import
com.blankj.utilcode.util.LogUtils
import
com.blankj.utilcode.util.ScreenUtils
import
com.waytous.anticollision.R
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.FragmentCollectBinding
import
com.waytous.anticollision.databinding.ActivityCollectBinding
import
com.waytous.anticollision.databinding.LayoutMapBoxBinding
import
com.waytous.anticollision.databinding.RadioTabCollectBinding
import
com.waytous.anticollision.databinding.RadioTabCollectBinding
import
com.waytous.anticollision.databinding.RadioTabSettingsBinding
import
com.waytous.anticollision.databinding.RadioTabSettingsBinding
import
com.waytous.anticollision.ui.MainViewModel
import
com.waytous.anticollision.utils.setupMapBox
import
dagger.hilt.android.AndroidEntryPoint
import
dagger.hilt.android.AndroidEntryPoint
import
javax.inject.Inject
import
javax.inject.Inject
@AndroidEntryPoint
@AndroidEntryPoint
class
Collect
Fragment
:
Fragment
()
{
class
Collect
Activity
:
AppCompatActivity
()
{
private
var
_binding
:
FragmentCollectBinding
?
=
null
lateinit
var
binding
:
ActivityCollectBinding
@Inject
@Inject
lateinit
var
mapBoxBinding
:
LayoutMapBoxBinding
lateinit
var
mainViewModel
:
MainViewModel
@Inject
@Inject
lateinit
var
tabCollectBinding
:
RadioTabCollectBinding
lateinit
var
tabCollectBinding
:
RadioTabCollectBinding
@Inject
@Inject
lateinit
var
tabSettingsBinding
:
RadioTabSettingsBinding
lateinit
var
tabSettingsBinding
:
RadioTabSettingsBinding
private
val
itemSelectedListener
by
lazy
{
private
val
itemSelectedListener
by
lazy
{
object
:
OnItemSelectedListener
{
object
:
AdapterView
.
OnItemSelectedListener
{
override
fun
onItemSelected
(
override
fun
onItemSelected
(
parent
:
AdapterView
<*>?,
parent
:
AdapterView
<*>?,
view
:
View
?,
view
:
View
?,
...
@@ -53,7 +53,6 @@ class CollectFragment : Fragment() {
...
@@ -53,7 +53,6 @@ class CollectFragment : Fragment() {
}
}
}
}
private
val
binding
get
()
=
_binding
!!
private
val
iconCalibrates
by
lazy
{
private
val
iconCalibrates
by
lazy
{
listOf
(
tabCollectBinding
.
vehicleLeftFrontWheel
,
listOf
(
tabCollectBinding
.
vehicleLeftFrontWheel
,
...
@@ -65,31 +64,27 @@ class CollectFragment : Fragment() {
...
@@ -65,31 +64,27 @@ class CollectFragment : Fragment() {
tabCollectBinding
.
vehicleBackAxleCenter
)
tabCollectBinding
.
vehicleBackAxleCenter
)
}
}
override
fun
onCreate
View
(
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
super
.
onCreate
(
savedInstanceState
)
savedInstanceState
:
Bundle
?
ScreenUtils
.
setFullScreen
(
this
)
):
View
{
BarUtils
.
setNavBarVisibility
(
this
,
false
)
_binding
=
FragmentCollectBinding
.
inflate
(
inflater
,
container
,
false
)
binding
=
ActivityCollectBinding
.
inflate
(
layoutInflater
)
context
?:
return
binding
.
root
setContentView
(
binding
.
root
)
binding
.
collectMapWrapper
.
addView
(
mapBoxBinding
.
root
)
binding
.
titleBar
.
statusBarDriverInfo
.
visibility
=
View
.
VISIBLE
initTabLayout
()
initTabLayout
()
binding
.
collectTabBtnToHome
.
setOnClickListener
{
setupMapBox
(
binding
.
mapContainer
,
mainViewModel
)
findNavController
().
navigate
(
R
.
id
.
navigation_home
)
}
return
binding
.
root
}
}
private
fun
initTabLayout
(){
private
fun
initTabLayout
(){
binding
.
collectT
abContent
.
addView
(
tabCollectBinding
.
root
)
binding
.
t
abContent
.
addView
(
tabCollectBinding
.
root
)
tabCollectBinding
.
collectSpinnerVehicleParts
.
onItemSelectedListener
=
itemSelectedListener
tabCollectBinding
.
collectSpinnerVehicleParts
.
onItemSelectedListener
=
itemSelectedListener
binding
.
collectRadioGroup
.
setOnCheckedChangeListener
{
_
,
checkedId
->
binding
.
tabContainer
.
setOnCheckedChangeListener
{
_
,
checkedId
->
binding
.
collectT
abContent
.
removeAllViews
()
binding
.
t
abContent
.
removeAllViews
()
if
(
checkedId
==
R
.
id
.
collectT
abCollect
)
{
if
(
checkedId
==
R
.
id
.
t
abCollect
)
{
binding
.
collectT
abContent
.
addView
(
tabCollectBinding
.
root
)
binding
.
t
abContent
.
addView
(
tabCollectBinding
.
root
)
}
else
{
}
else
{
binding
.
collectT
abContent
.
addView
(
tabSettingsBinding
.
root
)
binding
.
t
abContent
.
addView
(
tabSettingsBinding
.
root
)
}
}
}
}
}
}
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/health/HealthManagerActivity.kt
0 → 100644
View file @
1d65e955
package
com.waytous.anticollision.ui.health
import
android.os.Bundle
import
androidx.appcompat.app.AppCompatActivity
import
com.waytous.anticollision.R
class
HealthManagerActivity
:
AppCompatActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_health_manager
)
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/health/HealthMangerFragment.kt
deleted
100644 → 0
View file @
fdbd57de
package
com.waytous.anticollision.ui.health
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.fragment.app.Fragment
import
com.waytous.anticollision.R
class
HealthMangerFragment
:
Fragment
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
{
// Inflate the layout for this fragment
return
inflater
.
inflate
(
R
.
layout
.
fragment_health_manger
,
container
,
false
)
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/home/HomeActivity.kt
0 → 100644
View file @
1d65e955
package
com.waytous.anticollision.ui.home
import
android.os.Bundle
import
android.view.View
import
android.view.View.OnClickListener
import
androidx.appcompat.app.AppCompatActivity
import
com.blankj.utilcode.util.BarUtils
import
com.blankj.utilcode.util.ScreenUtils
import
com.waytous.anticollision.databinding.ActivityHomeBinding
import
com.waytous.anticollision.ui.MainViewModel
import
com.waytous.anticollision.ui.view.ButtonMorePopup
import
com.waytous.anticollision.ui.view.ButtonReportStatusPopup
import
com.waytous.anticollision.ui.view.ButtonWorkStatusPopup
import
com.waytous.anticollision.utils.setupMapBox
import
dagger.hilt.android.AndroidEntryPoint
import
javax.inject.Inject
@AndroidEntryPoint
class
HomeActivity
:
AppCompatActivity
(),
OnClickListener
{
private
lateinit
var
binding
:
ActivityHomeBinding
@Inject
lateinit
var
mainViewModel
:
MainViewModel
lateinit
var
popupMoreFeatures
:
ButtonMorePopup
lateinit
var
popupWorkStatusEdit
:
ButtonWorkStatusPopup
lateinit
var
popupReportStatus
:
ButtonReportStatusPopup
companion
object
{
private
val
scaleLengths
=
listOf
(
5
,
10
,
20
,
50
,
100
,
200
,
500
,
1000
,
2000
,
5000
,
10000
,
20000
,
50000
,
100000
,
200000
,
500000
,
1000000
,
2000000
)
const
val
MINIMUM_ZOOM_LEVEL
=
11.0
const
val
MAXIMUM_ZOOM_LEVEL
=
26.0
const
val
DEFAULT_ZOOM_LEVEL
=
14.0
}
// fun addTempAnnotations() {
// val otherAnnotation = VehicleLocationInfo(
// "KK-01", 36, 25,
// Point.fromLngLat(LONGITUDE, LATITUDE), true
// )
// updateCurrentVehicleAnnotation(otherAnnotation)
// val otherAnnotation1 =
// VehicleLocationInfo("KK-02", 24, 25, Point.fromLngLat(119.76739, 49.37722), true)
// val otherAnnotation2 =
// VehicleLocationInfo("KK-03", 36, 20, Point.fromLngLat(119.75694, 49.38632), true)
// val others = listOf(otherAnnotation1, otherAnnotation2)
// addOtherVehicleAnnotations(others)
// }
// private fun initAnnotationManager() {
// viewAnnotationManager = mapBinding.mapView.viewAnnotationManager
// pointAnnotationManager =
// mapBinding.mapView.annotations.createPointAnnotationManager(
// AnnotationConfig(TRUCK_PATH_LAYER)
// )
// }
// fun updateCurrentVehicleAnnotation(otherAnnotation: VehicleLocationInfo) {
// val pointAnnotationOptions: PointAnnotationOptions = PointAnnotationOptions()
// .withPoint(otherAnnotation.point)
// .withIconImage(iconCurrentNormalVehicleBitmap!!)
// .withIconSize(0.25)
// .withIconAnchor(IconAnchor.BOTTOM)
// .withDraggable(false)
// val pointAnnotation = pointAnnotationManager.create(pointAnnotationOptions)
// pointAnnotation.symbolSortKey = Double.MAX_VALUE
// val viewAnnotation = viewAnnotationManager.addViewAnnotation(
// resId = R.layout.current_annotation_layout,
// options = viewAnnotationOptions {
// geometry(otherAnnotation.point)
// associatedFeatureId(pointAnnotation.featureIdentifier)
// anchor(ViewAnnotationAnchor.BOTTOM)
// offsetY((pointAnnotation.iconImageBitmap?.height!! * 0.25).toInt())
// allowOverlap(true)
// }
// )
// val binding = CurrentAnnotationLayoutBinding.bind(viewAnnotation)
// binding.annotationCurrentVehicleNo.text =
// getString(R.string.annotation_vehicle_no, "KK-001")
// binding.annotationCurrentVehicleSpeed.text =
// getString(R.string.annotation_vehicle_speed, 36)
// }
//
// fun addOtherVehicleAnnotations(others: List<VehicleLocationInfo>) {
// others.forEach { vehicle ->
// val pointAnnotationOptions: PointAnnotationOptions = PointAnnotationOptions()
// .withPoint(vehicle.point)
// .withIconImage(iconOtherAlarmVehicleBitmap!!)
// .withIconSize(0.25)
// .withIconAnchor(IconAnchor.BOTTOM)
// .withDraggable(false)
// val pointAnnotation = pointAnnotationManager.create(pointAnnotationOptions)
// pointAnnotation.symbolSortKey = Double.MAX_VALUE
// val viewAnnotation = viewAnnotationManager.addViewAnnotation(
// resId = R.layout.other_annotation_layout,
// options = viewAnnotationOptions {
// geometry(vehicle.point)
// associatedFeatureId(pointAnnotation.featureIdentifier)
// anchor(ViewAnnotationAnchor.BOTTOM)
// offsetY((pointAnnotation.iconImageBitmap?.height!! * 0.25).toInt())
// allowOverlap(true)
// }
// )
// val binding = OtherAnnotationLayoutBinding.bind(viewAnnotation)
// binding.annotationOtherVehicleNo.text = getString(R.string.annotation_vehicle_no, vehicle.vehicleNo)
// binding.annotationOtherVehicleSpeed.text = vehicle.speed.toString()
// binding.annotationOtherVehicleDistance.text = vehicle.distance.toString()
// }
// }
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
ScreenUtils
.
setFullScreen
(
this
)
BarUtils
.
setNavBarVisibility
(
this
,
false
)
binding
=
ActivityHomeBinding
.
inflate
(
layoutInflater
)
setContentView
(
binding
.
root
)
binding
.
titleBar
.
statusBarDriverInfo
.
visibility
=
View
.
GONE
initPopupWindow
()
binding
.
more
.
setOnClickListener
(
this
)
binding
.
workStatusEdit
.
setOnClickListener
(
this
)
binding
.
statusReport
.
setOnClickListener
(
this
)
setupMapBox
(
binding
.
mapContainer
,
mainViewModel
)
}
private
fun
initPopupWindow
(){
popupMoreFeatures
=
ButtonMorePopup
(
this
).
also
{
it
.
bindLifecycleOwner
(
this
)
}
popupWorkStatusEdit
=
ButtonWorkStatusPopup
(
this
).
also
{
it
.
bindLifecycleOwner
(
this
)
}
popupReportStatus
=
ButtonReportStatusPopup
(
this
).
also
{
it
.
bindLifecycleOwner
(
this
)
}
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
)
{
binding
.
more
->{
popupMoreFeatures
.
showPopupWindow
(
binding
.
more
)
}
binding
.
workStatusEdit
->{
popupWorkStatusEdit
.
showPopupWindow
(
binding
.
workStatusLayout
)
}
binding
.
statusReport
->{
popupReportStatus
.
showPopupWindow
(
binding
.
statusReport
)
}
}
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/home/HomeNoVideoFragment.kt
deleted
100644 → 0
View file @
fdbd57de
package
com.waytous.anticollision.ui.home
import
android.os.Bundle
import
android.text.SpannableString
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.fragment.app.Fragment
import
androidx.lifecycle.ViewModelProvider
import
com.blankj.utilcode.util.BarUtils
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.FragmentNoVideoHomeBinding
import
com.waytous.anticollision.databinding.LayoutMapBoxBinding
import
com.waytous.anticollision.ui.view.ButtonMorePopup
import
com.waytous.anticollision.ui.view.ButtonReportStatusPopup
import
com.waytous.anticollision.ui.view.ButtonWorkStatusPopup
import
com.waytous.anticollision.utils.setTextSize
import
dagger.hilt.android.AndroidEntryPoint
import
javax.inject.Inject
@AndroidEntryPoint
class
HomeNoVideoFragment
:
Fragment
()
{
private
var
_binding
:
FragmentNoVideoHomeBinding
?
=
null
private
val
binding
get
()
=
_binding
!!
@Inject
lateinit
var
mapBoxBinding
:
LayoutMapBoxBinding
@Inject
lateinit
var
popupMoreFeatures
:
ButtonMorePopup
@Inject
lateinit
var
popupWorkStatusEdit
:
ButtonWorkStatusPopup
@Inject
lateinit
var
popupReportStatus
:
ButtonReportStatusPopup
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
{
BarUtils
.
setNavBarVisibility
(
requireActivity
(),
false
)
val
homeViewModel
=
ViewModelProvider
(
this
)[
HomeViewModel
::
class
.
java
]
_binding
=
FragmentNoVideoHomeBinding
.
inflate
(
inflater
,
container
,
false
)
context
?:
return
binding
.
root
binding
.
noVideoMapWrapper
.
addView
(
mapBoxBinding
.
root
)
setTodayCarriedNum
(
18
)
setTodayIllegallyNum
(
1
)
binding
.
workStatusEdit
.
setOnClickListener
{
popupWorkStatusEdit
.
showPopupWindow
(
binding
.
defaultCurrentWorkStatusLayout
)
}
binding
.
defaultToggleMore
.
setOnClickListener
{
popupMoreFeatures
.
showPopupWindow
(
binding
.
defaultToggleMore
)
}
binding
.
defaultReportStatus
.
setOnClickListener
{
popupReportStatus
.
showPopupWindow
(
binding
.
defaultReportStatus
)
}
return
binding
.
root
}
private
fun
setTodayCarriedNum
(
num
:
Int
)
{
val
templateString
=
getString
(
R
.
string
.
today_carried_text
,
num
)
val
spannableString
=
SpannableString
(
templateString
)
binding
.
todayCarried
.
setTextSize
(
spannableString
,
templateString
,
"今日运载(车)"
)
}
private
fun
setTodayIllegallyNum
(
num
:
Int
)
{
val
templateString
=
getString
(
R
.
string
.
today_illegally_text
,
num
)
val
spannableString
=
SpannableString
(
templateString
)
binding
.
illegallyNum
.
setTextSize
(
spannableString
,
templateString
,
"违章/警告(次)"
)
}
override
fun
onDestroyView
()
{
super
.
onDestroyView
()
_binding
=
null
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/settings/UserSettingsActivity.kt
0 → 100644
View file @
1d65e955
package
com.waytous.anticollision.ui.settings
import
android.os.Bundle
import
androidx.appcompat.app.AppCompatActivity
import
com.blankj.utilcode.util.BarUtils
import
com.blankj.utilcode.util.ScreenUtils
import
com.waytous.anticollision.databinding.ActivityUserSettingsBinding
class
UserSettingsActivity
:
AppCompatActivity
()
{
lateinit
var
binding
:
ActivityUserSettingsBinding
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
ScreenUtils
.
setFullScreen
(
this
)
BarUtils
.
setNavBarVisibility
(
this
,
false
)
binding
=
ActivityUserSettingsBinding
.
inflate
(
layoutInflater
)
setContentView
(
binding
.
root
)
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/settings/UserSettingsFragment.kt
deleted
100644 → 0
View file @
fdbd57de
package
com.waytous.anticollision.ui.settings
import
androidx.lifecycle.ViewModelProvider
import
android.os.Bundle
import
androidx.fragment.app.Fragment
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
com.waytous.anticollision.R
class
UserSettingsFragment
:
Fragment
()
{
companion
object
{
fun
newInstance
()
=
UserSettingsFragment
()
}
private
lateinit
var
viewModel
:
UserSettingsViewModel
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
{
return
inflater
.
inflate
(
R
.
layout
.
fragment_user_settings
,
container
,
false
)
}
override
fun
onActivityCreated
(
savedInstanceState
:
Bundle
?)
{
super
.
onActivityCreated
(
savedInstanceState
)
viewModel
=
ViewModelProvider
(
this
)[
UserSettingsViewModel
::
class
.
java
]
// TODO: Use the ViewModel
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/statistics/DataStatisticsActivity.kt
0 → 100644
View file @
1d65e955
package
com.waytous.anticollision.ui.statistics
import
android.os.Bundle
import
androidx.appcompat.app.AppCompatActivity
import
com.waytous.anticollision.R
class
DataStatisticsActivity
:
AppCompatActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_data_statistics
)
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/statistics/DataStatisticsFragment.kt
deleted
100644 → 0
View file @
fdbd57de
package
com.waytous.anticollision.ui.statistics
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.fragment.app.Fragment
import
com.waytous.anticollision.databinding.FragmentDataStatisticsBinding
class
DataStatisticsFragment
:
Fragment
()
{
private
lateinit
var
binding
:
FragmentDataStatisticsBinding
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
{
binding
=
FragmentDataStatisticsBinding
.
inflate
(
inflater
)
return
binding
.
root
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/video/HomeVideoActivity.kt
0 → 100644
View file @
1d65e955
package
com.waytous.anticollision.ui.video
import
android.net.Uri
import
android.os.Bundle
import
android.text.SpannableString
import
android.view.View
import
androidx.appcompat.app.AppCompatActivity
import
com.blankj.utilcode.util.BarUtils
import
com.blankj.utilcode.util.ScreenUtils
import
com.google.android.exoplayer2.ExoPlayer
import
com.google.android.exoplayer2.MediaItem
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.ActivityHomeVideoBinding
import
com.waytous.anticollision.ui.MainViewModel
import
com.waytous.anticollision.ui.view.ButtonMorePopup
import
com.waytous.anticollision.ui.view.ButtonReportStatusPopup
import
com.waytous.anticollision.ui.view.ButtonWorkStatusPopup
import
com.waytous.anticollision.utils.setTextSize
import
com.waytous.anticollision.utils.setupMapBox
import
java.io.File
import
javax.inject.Inject
class
HomeVideoActivity
:
AppCompatActivity
(),
View
.
OnClickListener
{
private
lateinit
var
binding
:
ActivityHomeVideoBinding
@Inject
lateinit
var
mainViewModel
:
MainViewModel
lateinit
var
popupMoreFeatures
:
ButtonMorePopup
lateinit
var
popupWorkStatusEdit
:
ButtonWorkStatusPopup
lateinit
var
popupReportStatus
:
ButtonReportStatusPopup
private
var
player1
:
ExoPlayer
?
=
null
private
var
player2
:
ExoPlayer
?
=
null
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
ScreenUtils
.
setFullScreen
(
this
)
BarUtils
.
setNavBarVisibility
(
this
,
false
)
binding
=
ActivityHomeVideoBinding
.
inflate
(
layoutInflater
)
setContentView
(
binding
.
root
)
binding
.
titleBar
.
statusBarDriverInfo
.
visibility
=
View
.
VISIBLE
val
templateString
=
getString
(
R
.
string
.
current_speed
,
36
)
val
spannableString
=
SpannableString
(
templateString
)
binding
.
speedText
.
setTextSize
(
spannableString
,
templateString
)
initPlayer
()
initPopupWindow
()
binding
.
more
.
setOnClickListener
(
this
)
binding
.
workStatusEdit
.
setOnClickListener
(
this
)
binding
.
reportStatus
.
setOnClickListener
(
this
)
setupMapBox
(
binding
.
mapContainer
,
mainViewModel
)
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
)
{
binding
.
more
->{
popupMoreFeatures
.
showPopupWindow
(
binding
.
more
)
}
binding
.
workStatusEdit
->{
popupWorkStatusEdit
.
showPopupWindow
(
binding
.
workStatusLayout
)
}
binding
.
reportStatus
->{
popupReportStatus
.
showPopupWindow
(
binding
.
reportStatus
)
}
}
}
private
fun
initPopupWindow
(){
popupMoreFeatures
=
ButtonMorePopup
(
this
).
also
{
it
.
bindLifecycleOwner
(
this
)
}
popupWorkStatusEdit
=
ButtonWorkStatusPopup
(
this
).
also
{
it
.
bindLifecycleOwner
(
this
)
}
popupReportStatus
=
ButtonReportStatusPopup
(
this
).
also
{
it
.
bindLifecycleOwner
(
this
)
}
}
private
fun
initPlayer
()
{
val
uri1
=
Uri
.
fromFile
(
File
(
filesDir
,
"飞书20230420-181456.mp4"
))
player1
=
ExoPlayer
.
Builder
(
this
).
build
().
apply
{
setMediaItem
(
MediaItem
.
Builder
().
setUri
(
uri1
).
build
())
}
binding
.
videoView1
.
player
=
player1
player1
?.
prepare
()
val
uri2
=
Uri
.
fromFile
(
File
(
filesDir
,
"飞书20230420-181512.mp4"
))
player2
=
ExoPlayer
.
Builder
(
this
).
build
().
apply
{
setMediaItem
(
MediaItem
.
Builder
().
setUri
(
uri2
).
build
())
}
binding
.
videoView2
.
player
=
player2
player2
?.
prepare
()
player1
?.
play
()
player2
?.
play
()
}
override
fun
onDestroy
()
{
player1
?.
release
()
player2
?.
release
()
super
.
onDestroy
()
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/video/HomeVideoFragment.kt
deleted
100644 → 0
View file @
fdbd57de
package
com.waytous.anticollision.ui.video
import
android.net.Uri
import
android.os.Bundle
import
android.text.SpannableString
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.fragment.app.Fragment
import
androidx.fragment.app.viewModels
import
com.google.android.exoplayer2.ExoPlayer
import
com.google.android.exoplayer2.MediaItem
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.FragmentVideoHomeBinding
import
com.waytous.anticollision.databinding.LayoutMapBoxBinding
import
com.waytous.anticollision.ui.view.ButtonMorePopup
import
com.waytous.anticollision.ui.view.ButtonReportStatusPopup
import
com.waytous.anticollision.ui.view.ButtonWorkStatusPopup
import
com.waytous.anticollision.utils.setTextSize
import
dagger.hilt.android.AndroidEntryPoint
import
java.io.File
import
javax.inject.Inject
@AndroidEntryPoint
class
HomeVideoFragment
:
Fragment
()
{
private
lateinit
var
binding
:
FragmentVideoHomeBinding
@Inject
lateinit
var
mapBoxBinding
:
LayoutMapBoxBinding
@Inject
lateinit
var
popupMoreFeatures
:
ButtonMorePopup
@Inject
lateinit
var
popupWorkStatusEdit
:
ButtonWorkStatusPopup
@Inject
lateinit
var
popupReportStatus
:
ButtonReportStatusPopup
private
var
player1
:
ExoPlayer
?
=
null
private
var
player2
:
ExoPlayer
?
=
null
private
val
viewModel
:
VideoHomeViewModel
by
viewModels
()
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
{
binding
=
FragmentVideoHomeBinding
.
inflate
(
inflater
,
container
,
false
)
context
?:
return
binding
.
root
val
templateString
=
getString
(
R
.
string
.
current_speed
,
36
)
val
spannableString
=
SpannableString
(
templateString
)
binding
.
workStatusEdit
.
setOnClickListener
{
popupWorkStatusEdit
.
showPopupWindow
(
binding
.
currentWorkStatusLayout
)
}
binding
.
speedText
.
setTextSize
(
spannableString
,
templateString
)
binding
.
videoMapWrapper
.
addView
(
mapBoxBinding
.
root
)
initPlayer
()
binding
.
toggleMore
.
setOnClickListener
{
popupMoreFeatures
.
showPopupWindow
(
it
)
}
return
binding
.
root
}
private
fun
initPlayer
()
{
val
uri1
=
Uri
.
fromFile
(
File
(
requireActivity
().
filesDir
,
"飞书20230420-181456.mp4"
))
player1
=
activity
?.
let
{
ExoPlayer
.
Builder
(
it
).
build
().
apply
{
setMediaItem
(
MediaItem
.
Builder
().
setUri
(
uri1
).
build
())
}
}
binding
.
videoView1
.
player
=
player1
player1
?.
prepare
()
val
uri2
=
Uri
.
fromFile
(
File
(
requireActivity
().
filesDir
,
"飞书20230420-181512.mp4"
))
player2
=
activity
?.
let
{
ExoPlayer
.
Builder
(
it
).
build
().
apply
{
setMediaItem
(
MediaItem
.
Builder
().
setUri
(
uri2
).
build
())
}
}
binding
.
videoView2
.
player
=
player2
player2
?.
prepare
()
player1
?.
play
()
player2
?.
play
()
}
override
fun
onDestroyView
()
{
player1
?.
release
()
player2
?.
release
()
super
.
onDestroyView
()
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/view/ButtonMorePopup.kt
View file @
1d65e955
package
com.waytous.anticollision.ui.view
package
com.waytous.anticollision.ui.view
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.view.Gravity
import
android.view.Gravity
import
androidx.navigation.NavController
import
android.view.View
import
android.view.View.OnClickListener
import
androidx.appcompat.widget.AppCompatTextView
import
com.waytous.anticollision.R
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.PopupMoreFeaturesBinding
import
com.waytous.anticollision.ui.collect.CollectActivity
import
com.waytous.anticollision.ui.health.HealthManagerActivity
import
com.waytous.anticollision.ui.settings.UserSettingsActivity
import
com.waytous.anticollision.ui.statistics.DataStatisticsActivity
import
razerdp.basepopup.BasePopupWindow
import
razerdp.basepopup.BasePopupWindow
import
javax.inject.Inject
import
javax.inject.Inject
class
ButtonMorePopup
@Inject
constructor
(
context
:
Context
?,
val
binding
:
PopupMoreFeaturesBinding
)
:
BasePopupWindow
(
context
)
{
class
ButtonMorePopup
@Inject
constructor
(
context
:
Context
)
:
BasePopupWindow
(
context
),
OnClickListener
{
init
{
init
{
contentView
=
binding
.
root
contentView
=
createPopupById
(
R
.
layout
.
popup_more_features
)
setOutSideDismiss
(
true
)
setOutSideDismiss
(
true
)
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
maskOffsetY
=
20
setBackgroundColor
(
R
.
color
.
color_99000000
)
setBackgroundColor
(
R
.
color
.
color_99000000
)
contentView
.
findViewById
<
AppCompatTextView
>(
R
.
id
.
featureCollect
).
setOnClickListener
(
this
)
contentView
.
findViewById
<
AppCompatTextView
>(
R
.
id
.
featureHealth
).
setOnClickListener
(
this
)
contentView
.
findViewById
<
AppCompatTextView
>(
R
.
id
.
featureData
).
setOnClickListener
(
this
)
contentView
.
findViewById
<
AppCompatTextView
>(
R
.
id
.
featureSettings
).
setOnClickListener
(
this
)
contentView
.
findViewById
<
AppCompatTextView
>(
R
.
id
.
featureReboot
).
setOnClickListener
(
this
)
contentView
.
findViewById
<
AppCompatTextView
>(
R
.
id
.
featurePowerOff
).
setOnClickListener
(
this
)
}
}
fun
navigationTo
(
navController
:
NavController
){
binding
.
moreFeatureCollect
.
setOnClickListener
{
override
fun
onClick
(
v
:
View
?)
{
dismiss
()
dismiss
()
navController
.
navigate
(
R
.
id
.
collectFragment
)
when
(
v
?.
id
){
R
.
id
.
featureCollect
->{
context
.
startActivity
(
Intent
(
context
,
CollectActivity
::
class
.
java
))
}
R
.
id
.
featureHealth
->{
context
.
startActivity
(
Intent
(
context
,
HealthManagerActivity
::
class
.
java
))
}
R
.
id
.
featureData
->{
context
.
startActivity
(
Intent
(
context
,
DataStatisticsActivity
::
class
.
java
))
}
R
.
id
.
featureSettings
->{
context
.
startActivity
(
Intent
(
context
,
UserSettingsActivity
::
class
.
java
))
}
R
.
id
.
featureReboot
->{
}
R
.
id
.
featurePowerOff
->{
}
}
}
}
}
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/view/ButtonReportStatusPopup.kt
View file @
1d65e955
package
com.waytous.anticollision.ui.view
package
com.waytous.anticollision.ui.view
import
android.app.Dialog
import
android.content.Context
import
android.content.Context
import
android.view.Gravity
import
android.view.Gravity
import
android.view.View
import
android.view.View.OnClickListener
import
com.waytous.anticollision.R
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.PopupReportStatusBinding
import
razerdp.basepopup.BasePopupWindow
import
razerdp.basepopup.BasePopupWindow
import
javax.inject.Inject
class
ButtonReportStatusPopup
@Inject
constructor
(
context
:
Context
?,
val
binding
:
PopupReportStatusBinding
)
:
BasePopupWindow
(
context
)
{
class
ButtonReportStatusPopup
(
val
context
:
Context
?)
:
BasePopupWindow
(
context
),
OnClickListener
{
private
var
delayCauseDialog
:
DelayCauseDialog
private
var
faultCauseDialog
:
FaultCauseDialog
private
var
standbyDialog
:
StandbyDialog
init
{
init
{
contentView
=
binding
.
root
contentView
=
createPopupById
(
R
.
layout
.
popup_report_status
)
setOutSideDismiss
(
true
)
setOutSideDismiss
(
true
)
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
setBackgroundColor
(
R
.
color
.
color_99000000
)
setBackgroundColor
(
R
.
color
.
color_99000000
)
delayCauseDialog
=
DelayCauseDialog
(
context
!!
,
R
.
style
.
DialogStyle
)
faultCauseDialog
=
FaultCauseDialog
(
context
,
R
.
style
.
DialogStyle
)
standbyDialog
=
StandbyDialog
(
context
,
R
.
style
.
DialogStyle
)
}
}
fun
itemDumping
(){
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
}
R
.
id
.
reportDialogDelay
->{
delayCauseDialog
.
show
()
fun
itemDelay
(
dialog
:
Dialog
){
}
binding
.
reportDialogDelay
.
setOnClickListener
{
R
.
id
.
reportDialogFault
->{
dialog
.
show
()
faultCauseDialog
.
show
()
}
}
}
R
.
id
.
reportDialogStandby
->{
standbyDialog
.
show
()
fun
itemFault
(
dialog
:
Dialog
){
}
binding
.
reportDialogFault
.
setOnClickListener
{
dialog
.
show
()
}
}
fun
itemStandby
(
dialog
:
Dialog
){
binding
.
reportDialogStandby
.
setOnClickListener
{
dialog
.
show
()
}
}
}
}
}
}
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/ui/view/ButtonWorkStatusPopup.kt
View file @
1d65e955
...
@@ -3,13 +3,11 @@ package com.waytous.anticollision.ui.view
...
@@ -3,13 +3,11 @@ package com.waytous.anticollision.ui.view
import
android.content.Context
import
android.content.Context
import
android.view.Gravity
import
android.view.Gravity
import
com.waytous.anticollision.R
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.PopupWorkStatusEditBinding
import
razerdp.basepopup.BasePopupWindow
import
razerdp.basepopup.BasePopupWindow
import
javax.inject.Inject
class
ButtonWorkStatusPopup
@Inject
constructor
(
context
:
Context
?,
val
binding
:
PopupWorkStatusEditBinding
)
:
BasePopupWindow
(
context
)
{
class
ButtonWorkStatusPopup
(
context
:
Context
)
:
BasePopupWindow
(
context
)
{
init
{
init
{
contentView
=
binding
.
root
contentView
=
createPopupById
(
R
.
layout
.
popup_work_status_edit
)
setOutSideDismiss
(
true
)
setOutSideDismiss
(
true
)
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
popupGravity
=
Gravity
.
TOP
or
Gravity
.
CENTER
setBackgroundColor
(
R
.
color
.
color_99000000
)
setBackgroundColor
(
R
.
color
.
color_99000000
)
...
...
app/src/main/java/com/waytous/anticollision/utils/MapExtensions.kt
View file @
1d65e955
package
com.waytous.anticollision.utils
package
com.waytous.anticollision.utils
import
android.graphics.Color
import
android.graphics.Color
import
androidx.appcompat.app.AppCompatActivity
import
androidx.lifecycle.Lifecycle
import
androidx.lifecycle.lifecycleScope
import
androidx.lifecycle.repeatOnLifecycle
import
com.blankj.utilcode.util.LogUtils
import
com.blankj.utilcode.util.LogUtils
import
com.mapbox.maps.LayerPosition
import
com.mapbox.maps.LayerPosition
import
com.mapbox.maps.MapboxMap
import
com.mapbox.maps.Style
import
com.mapbox.maps.Style
import
com.mapbox.maps.extension.style.expressions.dsl.generated.get
import
com.mapbox.maps.extension.style.expressions.dsl.generated.get
import
com.mapbox.maps.extension.style.layers.addLayer
import
com.mapbox.maps.extension.style.layers.addLayer
...
@@ -18,6 +23,12 @@ import com.mapbox.maps.extension.style.layers.properties.generated.TextRotationA
...
@@ -18,6 +23,12 @@ import com.mapbox.maps.extension.style.layers.properties.generated.TextRotationA
import
com.mapbox.maps.extension.style.layers.properties.generated.Visibility
import
com.mapbox.maps.extension.style.layers.properties.generated.Visibility
import
com.mapbox.maps.extension.style.sources.addSource
import
com.mapbox.maps.extension.style.sources.addSource
import
com.mapbox.maps.extension.style.sources.generated.geoJsonSource
import
com.mapbox.maps.extension.style.sources.generated.geoJsonSource
import
com.mapbox.maps.plugin.animation.flyTo
import
com.waytous.anticollision.R
import
com.waytous.anticollision.databinding.LayoutMapBoxBinding
import
com.waytous.anticollision.ui.MainViewModel
import
kotlinx.coroutines.launch
import
java.math.BigDecimal
const
val
MY_MAP_BOX_STYLE
=
"asset://style.json"
const
val
MY_MAP_BOX_STYLE
=
"asset://style.json"
...
@@ -73,6 +84,8 @@ const val PARK_SPOT_TEXT_LAYER = "parkSpotTextLayer"
...
@@ -73,6 +84,8 @@ const val PARK_SPOT_TEXT_LAYER = "parkSpotTextLayer"
const
val
TRUCK_PATH_SOURCE
=
"truckPathSource"
const
val
TRUCK_PATH_SOURCE
=
"truckPathSource"
const
val
TRUCK_PATH_LAYER
=
"truckPathLayer"
const
val
TRUCK_PATH_LAYER
=
"truckPathLayer"
const
val
ADJUST_LAYER_ORDER
=
"adjustLayerOrder"
const
val
LONGITUDE
=
119.7622539014
const
val
LONGITUDE
=
119.7622539014
const
val
LATITUDE
=
49.3795031825
const
val
LATITUDE
=
49.3795031825
const
val
ZOOM
=
16.0
const
val
ZOOM
=
16.0
...
@@ -687,4 +700,153 @@ fun Style.adjustLayerOrder(){
...
@@ -687,4 +700,153 @@ fun Style.adjustLayerOrder(){
RUNNABLE_AREA_LAYER
,
LayerPosition
(
null
,
RUNNABLE_AREA_LAYER
,
LayerPosition
(
null
,
STATIC_OBJECTS_LAYER
,
null
)
STATIC_OBJECTS_LAYER
,
null
)
)
)
}
}
\ No newline at end of file
internal
fun
AppCompatActivity
.
setupMapBoxStyle
(
mapBox
:
MapboxMap
,
viewModel
:
MainViewModel
){
mapBox
.
loadStyleUri
(
MY_MAP_BOX_STYLE
)
mapBox
.
getStyle
{
style
->
lifecycleScope
.
launch
{
repeatOnLifecycle
(
Lifecycle
.
State
.
CREATED
)
{
viewModel
.
loadMapDataSource
().
collect
{
when
(
it
.
sourceId
){
OBSTACLES_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addObstaclesSource
(
it
.
geojson
)
style
.
addObstaclesFillLayer
()
style
.
addObstaclesSymbolLayer
()
}
}
ELECTRONIC_FENCE_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addElectronicFenceSource
(
it
.
geojson
)
style
.
addElectronicFenceFillLayer
()
style
.
addElectronicFenceSymbolLayer
()
}
}
WET_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addWetAreaSource
(
it
.
geojson
)
style
.
addWetAreaFillLayer
()
style
.
addWetAreaSymbolLayer
()
}
}
LANE_NODE_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addLaneNodeSource
(
it
.
geojson
)
style
.
addLaneNodeCircleLayer
()
style
.
addLaneNodeSymbolLayer
()
}
}
LANE_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addLaneSource
(
it
.
geojson
)
style
.
addLaneLayer
()
}
}
RUNNABLE_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addRunnableAreaSource
(
it
.
geojson
)
style
.
addRunnableAreaLayer
()
}
}
DUMP_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addDumpAreaSource
(
it
.
geojson
)
style
.
addDumpAreaFillLayer
()
style
.
addDumpAreaSymbolLayer
()
}
}
DIGGING_WORK_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addDiggingWorkAreaSource
(
it
.
geojson
)
style
.
addDiggingWorkAreaFillLayer
()
style
.
addDiggingWorkAreaSymbolLayer
()
}
}
BARRICADE_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addBarricadeSource
(
it
.
geojson
)
style
.
addBarricadeLineLayer
()
}
}
STATION_AREA_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addStationAreaSource
(
it
.
geojson
)
style
.
addStationAreaFillLayer
()
style
.
addStationAreaSymbolLayer
()
}
}
PARK_SPOT_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addParkSpotSource
(
it
.
geojson
)
style
.
addParkSpotFillLayer
()
style
.
addParkSpotSymbolLayer
()
}
}
STATIC_OBJECTS_SOURCE
->{
if
(
it
.
geojson
.
isNotEmpty
()&&
it
.
version
!=
"-1"
)
{
style
.
addStaticObjectsSource
(
it
.
geojson
)
style
.
addStaticObjectsFillLayer
()
style
.
addStaticObjectsSymbolLayer
()
}
}
TRUCK_PATH_SOURCE
->{
style
.
addTruckPathSource
()
style
.
addTruckPathLineLayer
()
}
}
style
.
adjustLayerOrder
()
}
}
}
}
}
private
fun
AppCompatActivity
.
zoomOut
(
boxBinding
:
LayoutMapBoxBinding
,
viewModel
:
MainViewModel
){
boxBinding
.
zoomOut
.
setOnClickListener
{
lifecycleScope
.
launch
{
repeatOnLifecycle
(
Lifecycle
.
State
.
CREATED
)
{
viewModel
.
updateZoom
(
BigDecimal
(
"${boxBinding.mapView.getMapboxMap().cameraState.zoom}"
).
add
(
BigDecimal
(
"0.1"
)
))
}
}
}
}
private
fun
AppCompatActivity
.
zoomIn
(
boxBinding
:
LayoutMapBoxBinding
,
viewModel
:
MainViewModel
){
boxBinding
.
zoomIn
.
setOnClickListener
{
lifecycleScope
.
launch
{
repeatOnLifecycle
(
Lifecycle
.
State
.
CREATED
)
{
viewModel
.
updateZoom
(
BigDecimal
(
"${boxBinding.mapView.getMapboxMap().cameraState.zoom}"
).
minus
(
BigDecimal
(
"0.1"
)
))
}
}
}
}
private
fun
locationTruck
(
boxBinding
:
LayoutMapBoxBinding
,
viewModel
:
MainViewModel
){
boxBinding
.
locationTruck
.
setOnClickListener
{
boxBinding
.
mapView
.
getMapboxMap
().
flyTo
(
viewModel
.
cameraOptions
.
value
)
}
}
fun
AppCompatActivity
.
setupMapBox
(
boxBinding
:
LayoutMapBoxBinding
,
viewModel
:
MainViewModel
){
val
mapBox
=
boxBinding
.
mapView
.
getMapboxMap
()
lifecycleScope
.
launch
{
repeatOnLifecycle
(
Lifecycle
.
State
.
CREATED
)
{
viewModel
.
cameraOptions
.
collect
{
mapBox
.
setCamera
(
it
)
}
}
}
zoomOut
(
boxBinding
,
viewModel
)
zoomIn
(
boxBinding
,
viewModel
)
locationTruck
(
boxBinding
,
viewModel
)
setupMapBoxStyle
(
boxBinding
.
mapView
.
getMapboxMap
(),
viewModel
)
}
fun
AppCompatActivity
.
vehicleIcon
()
=
BitmapUtils
.
bitmapFromDrawableRes
(
this
,
R
.
drawable
.
my_vehicle_normal
)
fun
AppCompatActivity
.
otherVehicleIcon
()
=
BitmapUtils
.
bitmapFromDrawableRes
(
this
,
R
.
drawable
.
my_vehicle_normal
)
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/vo/VehicleAnnotation.kt
deleted
100644 → 0
View file @
fdbd57de
package
com.waytous.anticollision.vo
import
com.mapbox.geojson.Point
data class
VehicleAnnotation
(
val
vehicleNo
:
String
,
val
speed
:
Int
,
val
distance
:
Int
,
val
point
:
Point
,
val
isShow
:
Boolean
)
\ No newline at end of file
app/src/main/java/com/waytous/anticollision/vo/VehicleLocationInfo.kt
0 → 100644
View file @
1d65e955
package
com.waytous.anticollision.vo
data class
VehicleLocationInfo
(
/**时间戳*/
val
timeStamp
:
Long
,
/**车辆id*/
val
vehicleId
:
String
,
/**车辆类型*/
val
vehicleType
:
Int
,
/**车辆状态*/
val
vehicleStatus
:
Int
,
/**车辆位置:纬度*/
val
latitude
:
Double
,
/**车辆位置:经度*/
val
longitude
:
Double
,
/**车辆位置:海拔*/
val
altitude
:
Double
,
/**车辆位置:航向*/
val
direction
:
Double
,
/**车辆速度*/
val
velocity
:
Float
)
\ No newline at end of file
app/src/main/res/layout/
fragment
_collect.xml
→
app/src/main/res/layout/
activity
_collect.xml
View file @
1d65e955
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.LinearLayoutCompat
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"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
tools:context=
".ui.collect.CollectFragment"
>
tools:context=
".ui.collect.CollectActivity"
>
<include
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/titleBar"
layout=
"@layout/status_bar_layout"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RadioGroup
android:id=
"@+id/tabContainer"
android:layout_width=
"@dimen/dp_300"
android:layout_height=
"@dimen/dp_50"
android:layout_marginStart=
"@dimen/dp_18"
android:layout_marginTop=
"@dimen/dp_15"
android:background=
"@drawable/background_collect_tab_text"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/tabCollect"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"wrap_content"
style=
"@style/StatusBarTextStyle"
android:background=
"@drawable/background_collect_radiobutton"
android:checked=
"true"
android:button=
"@null"
android:textColor=
"@drawable/radiobutton_text_color_default_btn"
android:text=
"@string/more_feature_collect"
android:layout_weight=
"1"
/>
<RadioButton
android:id=
"@+id/tabSettings"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
style=
"@style/StatusBarTextStyle"
android:background=
"@drawable/background_collect_radiobutton"
android:button=
"@null"
android:textColor=
"@drawable/radiobutton_text_color_default_btn"
android:text=
"@string/more_feature_settings"
android:layout_weight=
"1"
/>
</RadioGroup>
<FrameLayout
android:id=
"@+id/tabContent"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_18"
app:layout_constraintTop_toBottomOf=
"@id/tabContainer"
app:layout_constraintStart_toStartOf=
"@id/tabContainer"
app:layout_constraintEnd_toEndOf=
"@id/tabContainer"
/>
<include
android:id=
"@+id/mapContainer"
layout=
"@layout/layout_map_box"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_0"
android:layout_marginStart=
"@dimen/dp_15"
android:layout_marginEnd=
"@dimen/dp_18"
app:layout_constraintBottom_toBottomOf=
"@id/tabContent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/tabContainer"
app:layout_constraintTop_toTopOf=
"@id/tabContainer"
/>
<RadioGroup
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/collectRadioGroup"
android:id=
"@+id/more"
android:layout_width=
"@dimen/dp_300"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/dp_50"
android:layout_marginStart=
"@dimen/dp_18"
android:layout_marginTop=
"@dimen/dp_15"
android:background=
"@drawable/background_collect_tab_text"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/collectTabCollect"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
style=
"@style/StatusBarTextStyle"
android:layout_marginStart=
"@dimen/dp_18"
android:background=
"@drawable/background_collect_radiobutton"
android:layout_marginTop=
"@dimen/dp_14"
android:checked=
"true"
android:layout_marginBottom=
"@dimen/dp_15"
android:button=
"@null"
android:adjustViewBounds=
"true"
android:textColor=
"@drawable/radiobutton_text_color_default_btn"
android:background=
"@drawable/background_more_btn"
android:text=
"@string/more_feature_collect"
android:clickable=
"true"
android:layout_weight=
"1"
/>
android:contentDescription=
"@string/toggle_more"
<RadioButton
android:focusable=
"true"
android:id=
"@+id/collectTabSettings"
app:layout_constraintTop_toBottomOf=
"@id/tabContent"
android:layout_width=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/tabContent"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/backHome"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
style=
"@style/StatusBarTextStyle"
android:layout_marginStart=
"@dimen/dp_18"
android:background=
"@drawable/background_collect_radiobutton"
android:drawableLeft=
"@drawable/background_btn_home_drawable"
android:button=
"@null"
android:background=
"@drawable/background_collect_btn_back_to_home"
android:textColor=
"@drawable/radiobutton_text_color_default_btn"
android:textColor=
"@drawable/color_text_btn"
android:text=
"@string/more_feature_settings"
android:clickable=
"true"
android:layout_weight=
"1"
/>
android:paddingStart=
"@dimen/dp_54"
</RadioGroup>
android:drawablePadding=
"@dimen/dp_3"
<FrameLayout
android:contentDescription=
"@string/toggle_more"
android:id=
"@+id/collectTabContent"
android:gravity=
"center_vertical"
android:layout_width=
"wrap_content"
android:focusable=
"true"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/sp_28"
android:layout_marginTop=
"@dimen/dp_18"
android:text=
"@string/back_to_home"
app:layout_constraintTop_toBottomOf=
"@id/collectRadioGroup"
app:layout_constraintTop_toTopOf=
"@id/more"
app:layout_constraintStart_toStartOf=
"@id/collectRadioGroup"
/>
app:layout_constraintStart_toEndOf=
"@id/more"
<FrameLayout
app:layout_constraintBottom_toBottomOf=
"@id/more"
/>
android:id=
"@+id/collectMapWrapper"
<androidx.appcompat.widget.AppCompatTextView
layout=
"@layout/layout_map_box"
android:id=
"@+id/btnUpload"
android:layout_width=
"0dp"
android:layout_width=
"wrap_content"
android:layout_height=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_15"
android:background=
"@drawable/background_collect_tab_btn_upload"
android:layout_marginEnd=
"@dimen/dp_18"
android:layout_marginEnd=
"@dimen/dp_18"
app:layout_constraintBottom_toBottomOf=
"@id/collectTabContent"
android:gravity=
"center"
app:layout_constraintEnd_toEndOf=
"parent"
android:text=
"@string/upload"
app:layout_constraintStart_toEndOf=
"@id/collectRadioGroup"
android:textColor=
"@drawable/color_text_btn_1"
app:layout_constraintTop_toTopOf=
"@id/collectRadioGroup"
/>
android:textSize=
"@dimen/sp_26"
<androidx.appcompat.widget.AppCompatImageView
android:focusable=
"true"
android:id=
"@+id/collectTabToggleMore"
android:clickable=
"true"
android:layout_width=
"wrap_content"
app:layout_constraintTop_toTopOf=
"@id/more"
android:layout_height=
"wrap_content"
app:layout_constraintBottom_toBottomOf=
"@id/more"
android:layout_marginStart=
"@dimen/dp_18"
app:layout_constraintEnd_toEndOf=
"@id/mapContainer"
/>
android:layout_marginTop=
"@dimen/dp_14"
<androidx.appcompat.widget.AppCompatTextView
android:layout_marginBottom=
"@dimen/dp_15"
android:id=
"@+id/btnEnd"
android:adjustViewBounds=
"true"
android:layout_width=
"wrap_content"
android:background=
"@drawable/background_more_btn"
android:layout_height=
"wrap_content"
android:clickable=
"true"
android:background=
"@drawable/background_collect_tab_btn_end"
android:contentDescription=
"@string/toggle_more"
android:layout_marginEnd=
"@dimen/dp_100"
android:focusable=
"true"
android:gravity=
"center"
app:layout_constraintTop_toBottomOf=
"@id/collectTabContent"
android:text=
"@string/end"
app:layout_constraintBottom_toBottomOf=
"parent"
android:textColor=
"@drawable/color_text_btn_1"
app:layout_constraintStart_toStartOf=
"@id/collectTabContent"
/>
android:textSize=
"@dimen/sp_26"
<androidx.appcompat.widget.AppCompatTextView
android:focusable=
"true"
android:id=
"@+id/collectTabBtnToHome"
android:clickable=
"true"
android:layout_width=
"wrap_content"
app:layout_constraintTop_toTopOf=
"@id/more"
android:layout_height=
"wrap_content"
app:layout_constraintBottom_toBottomOf=
"@id/more"
android:layout_marginStart=
"@dimen/dp_18"
app:layout_constraintEnd_toStartOf=
"@id/btnUpload"
/>
android:drawableLeft=
"@drawable/background_btn_home_drawable"
<androidx.appcompat.widget.AppCompatTextView
android:background=
"@drawable/background_collect_btn_back_to_home"
android:id=
"@+id/btnTap"
android:textColor=
"@drawable/color_text_btn"
android:layout_width=
"wrap_content"
android:clickable=
"true"
android:layout_height=
"wrap_content"
android:paddingStart=
"@dimen/dp_54"
android:background=
"@drawable/background_collect_tab_btn_tap"
android:drawablePadding=
"@dimen/dp_3"
android:layout_marginEnd=
"14dp"
android:contentDescription=
"@string/toggle_more"
android:gravity=
"center"
android:gravity=
"center_vertical"
android:text=
"@string/tap"
android:focusable=
"true"
android:textColor=
"@drawable/color_text_btn_2"
android:textSize=
"@dimen/sp_28"
android:textSize=
"@dimen/sp_26"
android:text=
"@string/back_to_home"
android:focusable=
"true"
app:layout_constraintTop_toTopOf=
"@id/collectTabToggleMore"
android:clickable=
"true"
app:layout_constraintStart_toEndOf=
"@id/collectTabToggleMore"
app:layout_constraintTop_toTopOf=
"@id/more"
app:layout_constraintBottom_toBottomOf=
"@id/collectTabToggleMore"
/>
app:layout_constraintBottom_toBottomOf=
"@id/more"
<androidx.appcompat.widget.AppCompatTextView
app:layout_constraintEnd_toStartOf=
"@id/btnEnd"
/>
android:id=
"@+id/collectTabBtnToUpload"
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"wrap_content"
android:id=
"@+id/btnPause"
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:background=
"@drawable/background_collect_tab_btn_upload"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/dp_18"
android:background=
"@drawable/background_collect_tab_btn_pause"
android:gravity=
"center"
android:layout_marginEnd=
"14dp"
android:text=
"@string/upload"
android:gravity=
"center"
android:textColor=
"@drawable/color_text_btn_1"
android:text=
"@string/pause"
android:textSize=
"@dimen/sp_26"
android:textColor=
"@drawable/color_text_btn_2"
android:focusable=
"true"
android:textSize=
"@dimen/sp_26"
android:clickable=
"true"
android:focusable=
"true"
app:layout_constraintTop_toTopOf=
"@id/collectTabToggleMore"
android:clickable=
"true"
app:layout_constraintBottom_toBottomOf=
"@id/collectTabToggleMore"
app:layout_constraintTop_toTopOf=
"@id/more"
app:layout_constraintEnd_toEndOf=
"@id/collectMapWrapper"
/>
app:layout_constraintBottom_toBottomOf=
"@id/more"
<androidx.appcompat.widget.AppCompatTextView
app:layout_constraintEnd_toStartOf=
"@id/btnTap"
/>
android:id=
"@+id/collectTabBtnToEnd"
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_width=
"wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat>
android:layout_height=
"wrap_content"
\ No newline at end of file
android:background=
"@drawable/background_collect_tab_btn_end"
android:layout_marginEnd=
"@dimen/dp_100"
android:gravity=
"center"
android:text=
"@string/end"
android:textColor=
"@drawable/color_text_btn_1"
android:textSize=
"@dimen/sp_26"
android:focusable=
"true"
android:clickable=
"true"
app:layout_constraintTop_toTopOf=
"@id/collectTabToggleMore"
app:layout_constraintBottom_toBottomOf=
"@id/collectTabToggleMore"
app:layout_constraintEnd_toStartOf=
"@id/collectTabBtnToUpload"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/collectTabBtnTap"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/background_collect_tab_btn_tap"
android:layout_marginEnd=
"14dp"
android:gravity=
"center"
android:text=
"@string/tap"
android:textColor=
"@drawable/color_text_btn_2"
android:textSize=
"@dimen/sp_26"
android:focusable=
"true"
android:clickable=
"true"
app:layout_constraintTop_toTopOf=
"@id/collectTabToggleMore"
app:layout_constraintBottom_toBottomOf=
"@id/collectTabToggleMore"
app:layout_constraintEnd_toStartOf=
"@id/collectTabBtnToEnd"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/collectTabBtnPause"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/background_collect_tab_btn_pause"
android:layout_marginEnd=
"14dp"
android:gravity=
"center"
android:text=
"@string/pause"
android:textColor=
"@drawable/color_text_btn_2"
android:textSize=
"@dimen/sp_26"
android:focusable=
"true"
android:clickable=
"true"
app:layout_constraintTop_toTopOf=
"@id/collectTabToggleMore"
app:layout_constraintBottom_toBottomOf=
"@id/collectTabToggleMore"
app:layout_constraintEnd_toStartOf=
"@id/collectTabBtnTap"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/
fragment
_data_statistics.xml
→
app/src/main/res/layout/
activity
_data_statistics.xml
View file @
1d65e955
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.
constraintlayout.widget.ConstraintLayou
t
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.
appcompat.widget.LinearLayoutCompa
t
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_ffe5e5e5"
android:orientation=
"vertical"
tools:context=
".ui.statistics.DataStatisticsFragment"
>
tools:context=
".ui.statistics.DataStatisticsActivity"
>
<include
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:id=
"@+id/dataStatisticsTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_12"
android:layout_marginTop=
"@dimen/dp_12"
android:drawableStart=
"@mipmap/icon_data_statistics_tiny"
android:drawablePadding=
"@dimen/dp_3"
android:gravity=
"center"
android:text=
"@string/data_statistics_title"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_30"
android:textStyle=
"bold"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataStatisticsLastCommitTime"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/dp_20"
android:id=
"@+id/titleBar"
android:gravity=
"center"
layout=
"@layout/status_bar_layout"
/>
android:text=
"@string/data_statistics_detail_today"
<androidx.constraintlayout.widget.ConstraintLayout
android:textColor=
"@color/color_ff333333"
android:layout_width=
"match_parent"
android:textSize=
"@dimen/sp_30"
android:layout_height=
"match_parent"
android:textStyle=
"bold"
android:background=
"@color/color_ffe5e5e5"
>
app:layout_constraintStart_toEndOf=
"@id/dataStatisticsTitle"
<androidx.appcompat.widget.AppCompatTextView
app:layout_constraintEnd_toEndOf=
"parent"
android:id=
"@+id/dataStatisticsTitle"
app:layout_constraintTop_toTopOf=
"@id/dataStatisticsTitle"
android:layout_width=
"wrap_content"
app:layout_constraintBottom_toBottomOf=
"@id/dataStatisticsTitle"
/>
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_12"
android:layout_marginTop=
"@dimen/dp_12"
android:drawableStart=
"@mipmap/icon_data_statistics_tiny"
android:drawablePadding=
"@dimen/dp_3"
android:gravity=
"center"
android:text=
"@string/data_statistics_title"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_30"
android:textStyle=
"bold"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<RadioGroup
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataStatisticsRadioGroup"
android:id=
"@+id/tabTitle"
android:layout_width=
"@dimen/dp_132"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/dp_578"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_13"
android:layout_marginEnd=
"@dimen/dp_20"
android:background=
"@drawable/background_user_settings_radio_group"
android:gravity=
"center"
android:gravity=
"center_horizontal"
android:text=
"@string/data_statistics_detail_today"
android:orientation=
"vertical"
android:textColor=
"@color/color_ff333333"
app:layout_constraintStart_toStartOf=
"parent"
android:textSize=
"@dimen/sp_30"
app:layout_constraintTop_toBottomOf=
"@id/dataStatisticsTitle"
>
android:textStyle=
"bold"
app:layout_constraintStart_toEndOf=
"@id/dataStatisticsTitle"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/dataStatisticsTitle"
app:layout_constraintBottom_toBottomOf=
"@id/dataStatisticsTitle"
/>
<RadioButton
<RadioGroup
android:id=
"@+id/dataStatisticsProduction"
android:id=
"@+id/tabContainer"
android:layout_width=
"@dimen/dp_98"
android:layout_width=
"@dimen/dp_132"
android:layout_height=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_578"
android:layout_marginTop=
"@dimen/dp_27"
android:layout_marginTop=
"@dimen/dp_13"
android:background=
"@drawable/background_user_settings_radio_button"
android:background=
"@drawable/background_user_settings_radio_group"
android:button=
"@null"
android:checked=
"true"
android:drawableTop=
"@drawable/icon_production"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:paddingTop=
"@dimen/dp_8"
android:orientation=
"vertical"
android:text=
"@string/data_statistics_production"
app:layout_constraintStart_toStartOf=
"parent"
android:textColor=
"@drawable/color_text_btn_4"
app:layout_constraintTop_toBottomOf=
"@id/dataStatisticsTitle"
>
android:textSize=
"@dimen/sp_20"
/>
<RadioButton
<RadioButton
android:id=
"@+id/dataStatisticsTask"
android:id=
"@+id/tabProduction"
android:layout_width=
"@dimen/dp_98"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_marginTop=
"@dimen/dp_16"
android:layout_marginTop=
"@dimen/dp_27"
android:background=
"@drawable/background_user_settings_radio_button"
android:background=
"@drawable/background_user_settings_radio_button"
android:button=
"@null"
android:button=
"@null"
android:drawableTop=
"@drawable/icon_task"
android:checked=
"true"
android:gravity=
"center_horizontal"
android:drawableTop=
"@drawable/icon_production"
android:paddingTop=
"@dimen/dp_8"
android:gravity=
"center_horizontal"
android:text=
"@string/data_statistics_task"
android:paddingTop=
"@dimen/dp_8"
android:textColor=
"@drawable/color_text_btn_4"
android:text=
"@string/data_statistics_production"
android:textSize=
"@dimen/sp_20"
/>
android:textColor=
"@drawable/color_text_btn_4"
android:textSize=
"@dimen/sp_20"
/>
<RadioButton
<RadioButton
android:id=
"@+id/dataStatisticsLog"
android:id=
"@+id/tabTask"
android:layout_width=
"@dimen/dp_98"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_marginTop=
"@dimen/dp_16"
android:layout_marginTop=
"@dimen/dp_16"
android:background=
"@drawable/background_user_settings_radio_button"
android:background=
"@drawable/background_user_settings_radio_button"
android:button=
"@null"
android:button=
"@null"
android:drawableTop=
"@drawable/icon_log"
android:drawableTop=
"@drawable/icon_task"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:paddingTop=
"@dimen/dp_8"
android:paddingTop=
"@dimen/dp_8"
android:text=
"@string/data_statistics_log"
android:text=
"@string/data_statistics_task"
android:textColor=
"@drawable/color_text_btn_4"
android:textColor=
"@drawable/color_text_btn_4"
android:textSize=
"@dimen/sp_20"
/>
android:textSize=
"@dimen/sp_20"
/>
</RadioGroup>
<androidx.recyclerview.widget.RecyclerView
<RadioButton
android:id=
"@+id/dataStatisticsList"
android:id=
"@+id/tabLog"
android:layout_width=
"@dimen/dp_0"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_98"
android:layout_marginStart=
"@dimen/dp_8"
android:layout_marginTop=
"@dimen/dp_16"
android:layout_marginEnd=
"@dimen/dp_18"
android:background=
"@drawable/background_user_settings_radio_button"
app:layout_constraintTop_toTopOf=
"@id/dataStatisticsRadioGroup"
android:button=
"@null"
app:layout_constraintStart_toEndOf=
"@id/dataStatisticsRadioGroup"
android:drawableTop=
"@drawable/icon_log"
app:layout_constraintBottom_toBottomOf=
"@id/dataStatisticsRadioGroup"
android:gravity=
"center_horizontal"
app:layout_constraintEnd_toEndOf=
"parent"
/>
android:paddingTop=
"@dimen/dp_8"
android:text=
"@string/data_statistics_log"
android:textColor=
"@drawable/color_text_btn_4"
android:textSize=
"@dimen/sp_20"
/>
</RadioGroup>
<androidx.appcompat.widget.AppCompatImageView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/dataStatisticsToggleMore"
android:id=
"@+id/dataStatisticsList"
android:layout_width=
"wrap_content"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"wrap_content"
android:layout_height=
"@dimen/dp_0"
android:layout_marginStart=
"@dimen/dp_18"
android:layout_marginStart=
"@dimen/dp_8"
android:adjustViewBounds=
"true"
android:layout_marginEnd=
"@dimen/dp_18"
android:background=
"@drawable/background_more_btn"
app:layout_constraintTop_toTopOf=
"@id/tabContainer"
android:clickable=
"true"
app:layout_constraintStart_toEndOf=
"@id/tabContainer"
android:contentDescription=
"@string/toggle_more"
app:layout_constraintBottom_toBottomOf=
"@id/tabContainer"
android:focusable=
"true"
app:layout_constraintEnd_toEndOf=
"parent"
/>
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/dataStatisticsRadioGroup"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/dataStatisticsToHome"
android:id=
"@+id/more"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_15"
android:layout_marginStart=
"@dimen/dp_18"
android:background=
"@drawable/background_collect_btn_back_to_home"
android:adjustViewBounds=
"true"
android:clickable=
"true"
android:background=
"@drawable/background_more_btn"
android:contentDescription=
"@string/toggle_more"
android:clickable=
"true"
android:drawableLeft=
"@drawable/background_btn_home_drawable"
android:contentDescription=
"@string/toggle_more"
android:drawablePadding=
"@dimen/dp_3"
android:focusable=
"true"
android:focusable=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
android:gravity=
"center_vertical"
app:layout_constraintStart_toStartOf=
"parent"
android:paddingLeft=
"@dimen/dp_54"
app:layout_constraintTop_toBottomOf=
"@id/tabContainer"
/>
android:text=
"@string/back_to_home"
android:textColor=
"@drawable/color_text_btn"
android:textSize=
"@dimen/sp_28"
app:layout_constraintBottom_toBottomOf=
"@id/dataStatisticsToggleMore"
app:layout_constraintStart_toEndOf=
"@id/dataStatisticsToggleMore"
app:layout_constraintTop_toTopOf=
"@id/dataStatisticsToggleMore"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/goHome"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_15"
android:background=
"@drawable/background_collect_btn_back_to_home"
android:clickable=
"true"
android:contentDescription=
"@string/toggle_more"
android:drawableLeft=
"@drawable/background_btn_home_drawable"
android:drawablePadding=
"@dimen/dp_3"
android:focusable=
"true"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/dp_54"
android:text=
"@string/back_to_home"
android:textColor=
"@drawable/color_text_btn"
android:textSize=
"@dimen/sp_28"
app:layout_constraintBottom_toBottomOf=
"@id/more"
app:layout_constraintStart_toEndOf=
"@id/more"
app:layout_constraintTop_toTopOf=
"@id/more"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
app/src/main/res/layout/
fragment_health_man
ger.xml
→
app/src/main/res/layout/
activity_health_mana
ger.xml
View file @
1d65e955
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.
constraintlayout.widget.ConstraintLayou
t
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.
appcompat.widget.LinearLayoutCompa
t
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_ffe5e5e5"
android:orientation=
"vertical"
tools:context=
".ui.health.HealthMangerFragment"
>
tools:context=
".ui.health.HealthManagerActivity"
>
<include
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:id=
"@+id/healthManagerTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_12"
android:layout_marginTop=
"@dimen/dp_12"
android:drawableStart=
"@mipmap/icon_health_manger_tiny"
android:drawablePadding=
"@dimen/dp_3"
android:gravity=
"center"
android:text=
"@string/health_manger_title"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_30"
android:textStyle=
"bold"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/healthManagerLastCommitTime"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/dp_20"
android:id=
"@+id/titleBar"
android:text=
"2021.11.08 12:12:45"
layout=
"@layout/status_bar_layout"
/>
android:textColor=
"@color/color_ff333333"
<androidx.constraintlayout.widget.ConstraintLayout
android:textSize=
"@dimen/sp_20"
android:layout_width=
"match_parent"
app:layout_constraintBottom_toBottomOf=
"@id/healthManagerTitle"
android:layout_height=
"match_parent"
app:layout_constraintEnd_toEndOf=
"parent"
android:background=
"@color/color_ffe5e5e5"
>
app:layout_constraintTop_toTopOf=
"@id/healthManagerTitle"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/healthManagerTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_12"
android:layout_marginTop=
"@dimen/dp_12"
android:drawableStart=
"@mipmap/icon_health_manger_tiny"
android:drawablePadding=
"@dimen/dp_3"
android:gravity=
"center"
android:text=
"@string/health_manger_title"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_30"
android:textStyle=
"bold"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"wrap_content"
android:id=
"@+id/committedTime"
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_marginEnd=
"@dimen/dp_10"
android:layout_height=
"wrap_content"
android:drawableStart=
"@mipmap/icon_message_remind"
android:layout_marginEnd=
"@dimen/dp_20"
android:drawablePadding=
"@dimen/dp_3"
android:text=
"2021.11.08 12:12:45"
android:gravity=
"center"
android:textColor=
"@color/color_ff333333"
android:text=
"@string/health_manger_last_detection_time"
android:textSize=
"@dimen/sp_20"
android:textColor=
"@color/color_ff333333"
app:layout_constraintBottom_toBottomOf=
"@id/healthManagerTitle"
android:textSize=
"@dimen/sp_20"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"@id/healthManagerLastCommitTime"
app:layout_constraintTop_toTopOf=
"@id/healthManagerTitle"
/>
app:layout_constraintEnd_toStartOf=
"@id/healthManagerLastCommitTime"
app:layout_constraintTop_toTopOf=
"@id/healthManagerLastCommitTime"
/>
<RadioGroup
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/healthManagerRadioGroup"
android:layout_width=
"wrap_content"
android:layout_width=
"@dimen/dp_132"
android:layout_height=
"wrap_content"
android:layout_height=
"@dimen/dp_578"
android:layout_marginEnd=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_13"
android:drawableStart=
"@mipmap/icon_message_remind"
android:background=
"@drawable/background_user_settings_radio_group"
android:drawablePadding=
"@dimen/dp_3"
android:gravity=
"center_horizontal"
android:gravity=
"center"
android:orientation=
"vertical"
android:text=
"@string/health_manger_last_detection_time"
app:layout_constraintStart_toStartOf=
"parent"
android:textColor=
"@color/color_ff333333"
app:layout_constraintTop_toBottomOf=
"@id/healthManagerTitle"
>
android:textSize=
"@dimen/sp_20"
app:layout_constraintBottom_toBottomOf=
"@id/committedTime"
app:layout_constraintEnd_toStartOf=
"@id/committedTime"
app:layout_constraintTop_toTopOf=
"@id/committedTime"
/>
<RadioButton
<RadioGroup
android:id=
"@+id/healthManagerVehicleInspection"
android:id=
"@+id/tabContainer"
android:layout_width=
"@dimen/dp_98"
android:layout_width=
"@dimen/dp_132"
android:layout_height=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_578"
android:layout_marginTop=
"@dimen/dp_27"
android:layout_marginTop=
"@dimen/dp_13"
android:background=
"@drawable/background_user_settings_radio_button"
android:background=
"@drawable/background_user_settings_radio_group"
android:button=
"@null"
android:checked=
"true"
android:drawableTop=
"@drawable/icon_vehicle_inspection"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:paddingTop=
"@dimen/dp_8"
android:orientation=
"vertical"
android:text=
"@string/health_manger_vehicle_inspection"
app:layout_constraintStart_toStartOf=
"parent"
android:textColor=
"@drawable/color_text_btn_4"
app:layout_constraintTop_toBottomOf=
"@id/healthManagerTitle"
>
android:textSize=
"@dimen/sp_20"
/>
<RadioButton
<RadioButton
android:id=
"@+id/healthManagerHardwareInspection"
android:id=
"@+id/tabVehicleInspection"
android:layout_width=
"@dimen/dp_98"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_marginTop=
"@dimen/dp_16"
android:layout_marginTop=
"@dimen/dp_27"
android:background=
"@drawable/background_user_settings_radio_button"
android:background=
"@drawable/background_user_settings_radio_button"
android:button=
"@null"
android:button=
"@null"
android:drawableTop=
"@drawable/icon_hardware_inspection"
android:checked=
"true"
android:gravity=
"center_horizontal"
android:drawableTop=
"@drawable/icon_vehicle_inspection"
android:paddingTop=
"@dimen/dp_8"
android:gravity=
"center_horizontal"
android:text=
"@string/health_manger_hardware_inspection"
android:paddingTop=
"@dimen/dp_8"
android:textColor=
"@drawable/color_text_btn_4"
android:text=
"@string/health_manger_vehicle_inspection"
android:textSize=
"@dimen/sp_20"
/>
android:textColor=
"@drawable/color_text_btn_4"
android:textSize=
"@dimen/sp_20"
/>
<RadioButton
<RadioButton
android:id=
"@+id/healthManagerSoft
wareInspection"
android:id=
"@+id/tabHard
wareInspection"
android:layout_width=
"@dimen/dp_98"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_marginTop=
"@dimen/dp_16"
android:layout_marginTop=
"@dimen/dp_16"
android:background=
"@drawable/background_user_settings_radio_button"
android:background=
"@drawable/background_user_settings_radio_button"
android:button=
"@null"
android:button=
"@null"
android:drawableTop=
"@drawable/icon_soft
ware_inspection"
android:drawableTop=
"@drawable/icon_hard
ware_inspection"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:paddingTop=
"@dimen/dp_8"
android:paddingTop=
"@dimen/dp_8"
android:text=
"@string/health_manger_soft
ware_inspection"
android:text=
"@string/health_manger_hard
ware_inspection"
android:textColor=
"@drawable/color_text_btn_4"
android:textColor=
"@drawable/color_text_btn_4"
android:textSize=
"@dimen/sp_20"
/>
android:textSize=
"@dimen/sp_20"
/>
<RadioButton
<RadioButton
android:id=
"@+id/healthManagerStaticInspection"
android:id=
"@+id/tabSoftwareInspection"
android:layout_width=
"@dimen/dp_98"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_marginTop=
"@dimen/dp_16"
android:layout_marginTop=
"@dimen/dp_16"
android:background=
"@drawable/background_user_settings_radio_button"
android:background=
"@drawable/background_user_settings_radio_button"
android:button=
"@null"
android:button=
"@null"
android:drawableTop=
"@drawable/icon_static_inspection"
android:drawableTop=
"@drawable/icon_software_inspection"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:paddingTop=
"@dimen/dp_8"
android:paddingTop=
"@dimen/dp_8"
android:text=
"@string/health_manger_static_inspection"
android:text=
"@string/health_manger_software_inspection"
android:textColor=
"@drawable/color_text_btn_4"
android:textColor=
"@drawable/color_text_btn_4"
android:textSize=
"@dimen/sp_20"
/>
android:textSize=
"@dimen/sp_20"
/>
</RadioGroup>
<androidx.constraintlayout.widget.ConstraintLayout
<RadioButton
android:id=
"@+id/healthMangerInspectionItemHeader"
android:id=
"@+id/tabStaticInspection"
android:layout_width=
"@dimen/dp_0"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_60"
android:layout_height=
"@dimen/dp_98"
android:layout_marginStart=
"@dimen/dp_6"
android:layout_marginTop=
"@dimen/dp_16"
android:layout_marginEnd=
"@dimen/dp_18"
android:background=
"@drawable/background_user_settings_radio_button"
android:background=
"@drawable/background_collect_tab_text"
android:button=
"@null"
app:layout_constraintTop_toTopOf=
"@id/healthManagerRadioGroup"
android:drawableTop=
"@drawable/icon_static_inspection"
app:layout_constraintStart_toEndOf=
"@id/healthManagerRadioGroup"
android:gravity=
"center_horizontal"
app:layout_constraintEnd_toEndOf=
"parent"
>
android:paddingTop=
"@dimen/dp_8"
<androidx.appcompat.widget.AppCompatTextView
android:text=
"@string/health_manger_static_inspection"
android:id=
"@+id/healthMangerInspectionItems"
android:textColor=
"@drawable/color_text_btn_4"
android:textSize=
"@dimen/sp_20"
/>
</RadioGroup>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/healthMangerInspectionItemHeader"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_60"
android:layout_marginStart=
"@dimen/dp_6"
android:layout_marginEnd=
"@dimen/dp_18"
android:background=
"@drawable/background_collect_tab_text"
app:layout_constraintTop_toTopOf=
"@id/tabContainer"
app:layout_constraintStart_toEndOf=
"@id/tabContainer"
app:layout_constraintEnd_toEndOf=
"parent"
>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/healthMangerInspectionItems"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_28"
android:text=
"@string/health_manger_inspection_items"
android:textSize=
"@dimen/sp_22"
android:textColor=
"@color/color_ff333333"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatCheckBox
android:id=
"@+id/healthMangerAllPassed"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/dp_73"
android:text=
"@string/health_manger_all_passed"
android:textSize=
"@dimen/sp_24"
android:textColor=
"@color/color_ff3785f8"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/healthManagerInspectionList"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_0"
android:layout_marginTop=
"@dimen/dp_6"
android:scrollbars=
"vertical"
android:scrollbarSize=
"@dimen/dp_18"
android:scrollbarThumbVertical=
"@color/color_ff3785f8"
android:scrollbarTrackVertical=
"@android:color/transparent"
app:layout_constraintStart_toStartOf=
"@id/healthMangerInspectionItemHeader"
app:layout_constraintTop_toBottomOf=
"@id/healthMangerInspectionItemHeader"
app:layout_constraintBottom_toBottomOf=
"@id/tabContainer"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/more"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_28"
android:layout_marginStart=
"@dimen/dp_18"
android:text=
"@string/health_manger_inspection_items"
android:adjustViewBounds=
"true"
android:textSize=
"@dimen/sp_22"
android:background=
"@drawable/background_more_btn"
android:textColor=
"@color/color_ff333333"
android:clickable=
"true"
android:contentDescription=
"@string/toggle_more"
android:focusable=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_to
TopOf=
"parent"
app:layout_constraintTop_to
BottomOf=
"@id/tabContainer"
/>
app:layout_constraintBottom_toBottomOf=
"parent"
/>
<androidx.appcompat.widget.AppCompat
CheckBox
<androidx.appcompat.widget.AppCompat
TextView
android:id=
"@+id/
healthMangerAllPassed
"
android:id=
"@+id/
goHome
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/dp_73"
android:layout_marginStart=
"@dimen/dp_15"
android:text=
"@string/health_manger_all_passed"
android:background=
"@drawable/background_collect_btn_back_to_home"
android:textSize=
"@dimen/sp_24"
android:clickable=
"true"
android:textColor=
"@color/color_ff3785f8"
android:contentDescription=
"@string/toggle_more"
android:drawableLeft=
"@drawable/background_btn_home_drawable"
android:drawablePadding=
"@dimen/dp_3"
android:focusable=
"true"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/dp_54"
android:text=
"@string/back_to_home"
android:textColor=
"@drawable/color_text_btn"
android:textSize=
"@dimen/sp_28"
app:layout_constraintBottom_toBottomOf=
"@id/more"
app:layout_constraintStart_toEndOf=
"@id/more"
app:layout_constraintTop_toTopOf=
"@id/more"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/healthManagerCommit"
android:layout_width=
"@dimen/dp_180"
android:layout_height=
"@dimen/dp_84"
android:layout_marginEnd=
"@dimen/dp_18"
android:background=
"@drawable/background_btn_commit"
android:clickable=
"true"
android:contentDescription=
"@string/toggle_more"
android:drawableLeft=
"@mipmap/icon_submit_pressed"
android:drawablePadding=
"@dimen/dp_3"
android:focusable=
"true"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/dp_36"
android:text=
"@string/commit"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_28"
app:layout_constraintBottom_toBottomOf=
"@id/more"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/more"
/>
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.recyclerview.widget.RecyclerView
\ No newline at end of file
android:id=
"@+id/healthManagerInspectionList"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_0"
android:layout_marginTop=
"@dimen/dp_6"
android:scrollbars=
"vertical"
android:scrollbarSize=
"@dimen/dp_18"
android:scrollbarThumbVertical=
"@color/color_ff3785f8"
android:scrollbarTrackVertical=
"@android:color/transparent"
app:layout_constraintStart_toStartOf=
"@id/healthMangerInspectionItemHeader"
app:layout_constraintTop_toBottomOf=
"@id/healthMangerInspectionItemHeader"
app:layout_constraintBottom_toBottomOf=
"@id/healthManagerRadioGroup"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/healthManagerToggleMore"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_18"
android:adjustViewBounds=
"true"
android:background=
"@drawable/background_more_btn"
android:clickable=
"true"
android:contentDescription=
"@string/toggle_more"
android:focusable=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/healthManagerRadioGroup"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/healthManagerToHome"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_15"
android:background=
"@drawable/background_collect_btn_back_to_home"
android:clickable=
"true"
android:contentDescription=
"@string/toggle_more"
android:drawableLeft=
"@drawable/background_btn_home_drawable"
android:drawablePadding=
"@dimen/dp_3"
android:focusable=
"true"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/dp_54"
android:text=
"@string/back_to_home"
android:textColor=
"@drawable/color_text_btn"
android:textSize=
"@dimen/sp_28"
app:layout_constraintBottom_toBottomOf=
"@id/healthManagerToggleMore"
app:layout_constraintStart_toEndOf=
"@id/healthManagerToggleMore"
app:layout_constraintTop_toTopOf=
"@id/healthManagerToggleMore"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/healthManagerCommit"
android:layout_width=
"@dimen/dp_180"
android:layout_height=
"@dimen/dp_84"
android:layout_marginEnd=
"@dimen/dp_18"
android:background=
"@drawable/background_btn_commit"
android:clickable=
"true"
android:contentDescription=
"@string/toggle_more"
android:drawableLeft=
"@mipmap/icon_submit_pressed"
android:drawablePadding=
"@dimen/dp_3"
android:focusable=
"true"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/dp_36"
android:text=
"@string/commit"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_28"
app:layout_constraintBottom_toBottomOf=
"@id/healthManagerToggleMore"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/healthManagerToggleMore"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/layout/
fragment_no_video
_home.xml
→
app/src/main/res/layout/
activity
_home.xml
View file @
1d65e955
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.
constraintlayout.widget.ConstraintLayou
t
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.
appcompat.widget.LinearLayoutCompa
t
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".ui.home.HomeNoVideoFragment"
>
android:orientation=
"vertical"
android:background=
"@mipmap/background_main_light"
<androidx.appcompat.widget.AppCompatImageView
android:padding=
"4dp"
android:id=
"@+id/defaultWorkingAvatar"
tools:context=
".ui.home.HomeActivity"
>
android:layout_width=
"wrap_content"
<include
android:layout_height=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_marginStart=
"@dimen/dp_14"
android:layout_marginTop=
"@dimen/dp_14"
android:adjustViewBounds=
"true"
android:padding=
"@dimen/dp_3"
android:src=
"@mipmap/icon_avatar_normal"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultVehicleNumber"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_14"
android:layout_marginTop=
"@dimen/dp_20"
android:maxEms=
"6"
android:maxLength=
"6"
android:text=
"@string/default_vehicle_number"
app:layout_constraintStart_toEndOf=
"@id/defaultWorkingAvatar"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultDriverName"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_1"
android:id=
"@+id/titleBar"
android:maxEms=
"4"
layout=
"@layout/status_bar_layout"
/>
android:maxLength=
"4"
android:text=
"@string/default_driver_name"
app:layout_constraintStart_toStartOf=
"@id/defaultVehicleNumber"
app:layout_constraintTop_toBottomOf=
"@id/defaultVehicleNumber"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultMatterType"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:background=
"@drawable/background_status_bar_matter_status"
android:maxEms=
"2"
android:maxLength=
"2"
android:text=
"@string/default_matter_type"
app:layout_constraintStart_toStartOf=
"@id/defaultDriverName"
app:layout_constraintTop_toBottomOf=
"@id/defaultDriverName"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/statusBarReadyType"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"7dp"
android:background=
"@drawable/background_status_bar_ready_status"
android:maxEms=
"2"
android:maxLength=
"2"
android:text=
"@string/default_ready_type"
android:textColor=
"@color/white"
app:layout_constraintStart_toEndOf=
"@id/defaultMatterType"
app:layout_constraintTop_toTopOf=
"@id/defaultMatterType"
/>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/speedStatusArea"
android:layout_width=
"match_parent"
android:layout_width=
"@dimen/dp_294"
android:layout_height=
"match_parent"
>
android:layout_height=
"@dimen/dp_86"
<androidx.appcompat.widget.AppCompatImageView
android:layout_marginStart=
"@dimen/dp_20"
android:id=
"@+id/avatar"
android:layout_marginTop=
"@dimen/dp_19"
android:layout_width=
"wrap_content"
android:background=
"@mipmap/background_speed_state_normal_light"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:layout_marginStart=
"@dimen/dp_14"
app:layout_constraintStart_toStartOf=
"parent"
android:layout_marginTop=
"@dimen/dp_14"
app:layout_constraintTop_toBottomOf=
"@id/defaultMatterType"
>
android:adjustViewBounds=
"true"
android:padding=
"@dimen/dp_3"
android:src=
"@mipmap/icon_avatar_normal"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultSpeedText"
android:id=
"@+id/vehicleNum"
android:layout_width=
"@dimen/dp_66"
style=
"@style/StatusBarTextStyle"
android:layout_height=
"@dimen/dp_66"
android:layout_width=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_32"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_1"
android:layout_marginStart=
"@dimen/dp_14"
android:text=
"@string/current_speed2"
android:layout_marginTop=
"@dimen/dp_20"
android:textColor=
"@color/white"
android:maxEms=
"6"
android:textSize=
"@dimen/sp_42"
android:maxLength=
"6"
app:layout_constraintBottom_toBottomOf=
"parent"
android:text=
"@string/default_vehicle_number"
app:layout_constraintStart_toStartOf=
"parent"
/>
app:layout_constraintStart_toEndOf=
"@id/avatar"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/driverName"
style=
"@style/StatusBarTextStyle"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_1"
android:text=
"@string/current_speed_unit"
android:maxEms=
"4"
android:textColor=
"@color/white"
android:maxLength=
"4"
app:layout_constraintBaseline_toBaselineOf=
"@id/defaultSpeedText"
android:text=
"@string/default_driver_name"
app:layout_constraintStart_toEndOf=
"@id/defaultSpeedText"
/>
app:layout_constraintStart_toStartOf=
"@id/vehicleNum"
app:layout_constraintTop_toBottomOf=
"@id/vehicleNum"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/matterType"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:background=
"@drawable/background_status_bar_matter_status"
android:maxEms=
"2"
android:maxLength=
"2"
android:text=
"@string/default_matter_type"
app:layout_constraintStart_toStartOf=
"@id/driverName"
app:layout_constraintTop_toBottomOf=
"@id/driverName"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/readyType"
style=
"@style/StatusBarTextStyle"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/dp_26"
android:layout_marginStart=
"7dp"
android:text=
"@string/current_speed_text"
android:background=
"@drawable/background_status_bar_ready_status"
android:maxEms=
"2"
android:maxLength=
"2"
android:text=
"@string/default_ready_type"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
app:layout_constraintBaseline_toBaselineOf=
"@id/defaultSpeedText"
app:layout_constraintStart_toEndOf=
"@id/matterType"
app:layout_constraintEnd_toEndOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"@id/matterType"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatTextView
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/todayCarried"
android:id=
"@+id/currentSpeedLayout"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"@dimen/dp_294"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/dp_86"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_20"
android:layout_marginTop=
"@dimen/dp_16"
android:layout_marginTop=
"@dimen/dp_19"
android:background=
"@mipmap/background_today_carried_light"
android:background=
"@mipmap/background_speed_state_normal_light"
android:text=
"@string/today_carried_text"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/speedStatusArea"
app:layout_constraintTop_toBottomOf=
"@id/readyType"
>
app:layout_constraintTop_toBottomOf=
"@id/speedStatusArea"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/illegallyNum
"
android:id=
"@+id/currentSpeed
"
style=
"@style/StatusBarTextStyle
"
android:layout_width=
"@dimen/dp_66
"
android:layout_width=
"wrap_content
"
android:layout_height=
"@dimen/dp_66
"
android:layout_height=
"wrap_content
"
android:layout_marginStart=
"@dimen/dp_32
"
android:layout_marginStart=
"@dimen/dp_24
"
android:layout_marginBottom=
"@dimen/dp_1
"
android:background=
"@mipmap/background_warning_illegally
"
android:text=
"@string/current_speed2
"
android:text=
"@string/today_illegally_text
"
android:textColor=
"@color/white
"
android:textColor=
"@color/color_fffc5454
"
android:textSize=
"@dimen/sp_42
"
app:layout_constraintStart_toEndOf=
"@id/todayCarried
"
app:layout_constraintBottom_toBottomOf=
"parent
"
app:layout_constraintTop_toTopOf=
"@id/todayCarried
"
/>
app:layout_constraintStart_toStartOf=
"parent
"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultDispatchCommandText
"
style=
"@style/StatusBarTextStyle
"
style=
"@style/StatusBarTextStyle
"
android:layout_width=
"wrap_content
"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:layout_height=
"wrap_content
"
android:layout_marginBottom=
"@dimen/dp_15
"
android:layout_marginTop=
"@dimen/dp_21
"
android:text=
"@string/current_speed_unit
"
android:text=
"@string/dispatch_command_text
"
android:textColor=
"@color/white
"
app:layout_constraintStart_toStartOf=
"@id/todayCarri
ed"
app:layout_constraintBaseline_toBaselineOf=
"@id/currentSpe
ed"
app:layout_constraintTop_toBottomOf=
"@id/todayCarri
ed"
/>
app:layout_constraintStart_toEndOf=
"@id/currentSpe
ed"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultDispatchedCommTim
e"
style=
"@style/StatusBarTextStyl
e"
style=
"@style/StatusBarTextStyle
"
android:layout_width=
"wrap_content
"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:layout_height=
"wrap_content
"
android:layout_marginEnd=
"@dimen/dp_26
"
android:layout_marginTop=
"@dimen/dp_5
"
android:text=
"@string/current_speed_text
"
android:text=
"2023/3/10 08:12:34
"
android:textColor=
"@color/white
"
android:textSize=
"24sp
"
app:layout_constraintBaseline_toBaselineOf=
"@id/currentSpeed
"
app:layout_constraintStart_toStartOf=
"@id/defaultDispatchCommandText"
app:layout_constraintEnd_toEndOf=
"parent"
/>
app:layout_constraintTop_toBottomOf=
"@id/defaultDispatchCommandText"
/
>
</androidx.constraintlayout.widget.ConstraintLayout
>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultDispatchedImage"
android:id=
"@+id/todayCarried"
android:layout_width=
"wrap_content"
style=
"@style/StatusBarTextStyle"
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_18"
android:layout_height=
"wrap_content"
android:adjustViewBounds=
"true"
android:layout_marginTop=
"@dimen/dp_16"
android:src=
"@mipmap/icon_dispatching_light"
android:background=
"@mipmap/background_today_carried_light"
app:layout_constraintStart_toStartOf=
"@id/defaultDispatchedCommTime"
android:text=
"@string/today_carried_text"
app:layout_constraintTop_toBottomOf=
"@id/defaultDispatchedCommTime"
/>
app:layout_constraintStart_toStartOf=
"@id/currentSpeedLayout"
app:layout_constraintTop_toBottomOf=
"@id/currentSpeedLayout"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultLoadArea
"
android:id=
"@+id/illegallyNum
"
style=
"@style/StatusBarTextStyle"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_6
"
android:layout_marginStart=
"@dimen/dp_24
"
android:layout_marginTop=
"@dimen/dp_12
"
android:background=
"@mipmap/background_warning_illegally
"
android:text=
"@string/default_load_area
"
android:text=
"@string/today_illegally_text
"
android:textSize=
"@dimen/sp_30
"
android:textColor=
"@color/color_fffc5454
"
app:layout_constraintStart_toEndOf=
"@id/defaultDispatchedImage
"
app:layout_constraintStart_toEndOf=
"@id/todayCarried
"
app:layout_constraintTop_toBottomOf=
"@id/defaultDispatchedCommTime
"
/>
app:layout_constraintTop_toTopOf=
"@id/todayCarried
"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultUnloadArea"
android:id=
"@+id/dispatchText"
style=
"@style/StatusBarTextStyle"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:layout_marginTop=
"@dimen/dp_21"
android:text=
"@string/default_unload_area"
android:text=
"@string/dispatch_command_text"
android:textSize=
"@dimen/sp_30"
app:layout_constraintStart_toStartOf=
"@id/todayCarried"
app:layout_constraintStart_toStartOf=
"@id/defaultLoadArea"
app:layout_constraintTop_toBottomOf=
"@id/todayCarried"
/>
app:layout_constraintTop_toBottomOf=
"@id/defaultLoadArea"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultReminderInfoText
"
android:id=
"@+id/dispatchTime
"
style=
"@style/StatusBarTextStyle"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_18
"
android:layout_marginTop=
"@dimen/dp_5
"
android:background=
"@drawable/drawable_bg_reminder_info
"
android:text=
"2023/3/10 08:12:34
"
android:text=
"@string/reminder_info_text
"
android:textSize=
"24sp
"
app:layout_constraintStart_toStartOf=
"@id/defaultDispatchedCommTime
"
app:layout_constraintStart_toStartOf=
"@id/dispatchText
"
app:layout_constraintTop_toBottomOf=
"@id/defaultUnloadArea
"
/>
app:layout_constraintTop_toBottomOf=
"@id/dispatchText
"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/defaultToggleMore"
android:id=
"@+id/dispatchImage"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"20dp"
android:layout_marginTop=
"@dimen/dp_18"
android:paddingStart=
"59dp"
android:adjustViewBounds=
"true"
android:gravity=
"center_vertical"
android:src=
"@mipmap/icon_dispatching_light"
android:drawablePadding=
"5dp"
app:layout_constraintStart_toStartOf=
"@id/dispatchTime"
android:drawableLeft=
"@drawable/background_more_default_textview_drawable"
app:layout_constraintTop_toBottomOf=
"@id/dispatchTime"
/>
android:background=
"@drawable/background_more_default_btn"
android:text=
"@string/toggle_more_text"
android:textColor=
"@drawable/color_text_btn"
android:textSize=
"28sp"
android:focusable=
"true"
android:clickable=
"true"
app:layout_constraintTop_toBottomOf=
"@id/defaultReminderInfoText"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/defaultCurrentWorkStatusLayout"
android:id=
"@+id/loadingArea"
android:layout_width=
"wrap_content"
style=
"@style/StatusBarTextStyle"
android:layout_height=
"0dp"
android:layout_width=
"wrap_content"
android:background=
"@drawable/background_working_status"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:layout_marginStart=
"@dimen/dp_6"
app:layout_constraintBottom_toBottomOf=
"@id/defaultToggleMore"
android:layout_marginTop=
"@dimen/dp_12"
app:layout_constraintTop_toTopOf=
"@id/defaultToggleMore"
android:text=
"@string/default_load_area"
app:layout_constraintEnd_toEndOf=
"parent"
android:textSize=
"@dimen/sp_30"
app:layout_constraintStart_toStartOf=
"parent"
>
app:layout_constraintStart_toEndOf=
"@id/dispatchImage"
app:layout_constraintTop_toBottomOf=
"@id/dispatchTime"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/currentWorkStatus"
android:id=
"@+id/unloadingArea"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginTop=
"8dp"
android:layout_marginStart=
"9dp"
android:text=
"@string/default_unload_area"
android:layout_marginTop=
"7dp"
android:textSize=
"@dimen/sp_30"
android:layout_marginBottom=
"7dp"
app:layout_constraintStart_toStartOf=
"@id/loadingArea"
android:drawableStart=
"@mipmap/icon_current_status_empty_light"
app:layout_constraintTop_toBottomOf=
"@id/loadingArea"
/>
android:drawablePadding=
"10dp"
android:gravity=
"center_vertical"
android:text=
"@string/work_status_empty"
android:textColor=
"@color/home_text_color"
android:textSize=
"28sp"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/workStatusEdit"
android:id=
"@+id/reminderInfoText"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginTop=
"@dimen/dp_18"
android:layout_marginStart=
"20dp"
android:background=
"@drawable/drawable_bg_reminder_info"
android:layout_marginEnd=
"20dp"
android:text=
"@string/reminder_info_text"
android:background=
"@drawable/background_work_status_edit_btn"
app:layout_constraintStart_toStartOf=
"@id/dispatchTime"
android:clickable=
"true"
app:layout_constraintTop_toBottomOf=
"@id/unloadingArea"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/more"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_20"
android:paddingLeft=
"@dimen/dp_59"
android:gravity=
"center_vertical"
android:drawablePadding=
"@dimen/dp_5"
android:drawableLeft=
"@drawable/background_more_default_textview_drawable"
android:background=
"@drawable/background_more_default_btn"
android:text=
"@string/toggle_more_text"
android:textColor=
"@drawable/color_text_btn"
android:textSize=
"28sp"
android:focusable=
"true"
android:focusable=
"true"
android:paddingStart=
"10dp"
android:clickable=
"true"
android:paddingTop=
"4dp"
app:layout_constraintTop_toBottomOf=
"@id/reminderInfoText"
android:paddingEnd=
"10dp"
app:layout_constraintStart_toStartOf=
"parent"
android:paddingBottom=
"4dp"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
android:text=
"@string/work_status_edit"
android:textColor=
"#ff3684f9"
android:textSize=
"24sp"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/defaultReportStatus"
android:id=
"@+id/workStatusLayout"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"0dp"
android:layout_height=
"wrap_content"
android:background=
"@drawable/background_working_status"
android:background=
"@drawable/background_report_default_btn"
android:orientation=
"horizontal"
android:text=
"@string/toggle_status_report"
app:layout_constraintBottom_toBottomOf=
"@id/more"
android:textSize=
"28sp"
app:layout_constraintTop_toTopOf=
"@id/more"
android:focusable=
"true"
app:layout_constraintEnd_toEndOf=
"parent"
android:clickable=
"true"
app:layout_constraintStart_toStartOf=
"parent"
>
android:textColor=
"@drawable/color_text_btn"
app:layout_constraintTop_toTopOf=
"@id/defaultToggleMore"
app:layout_constraintEnd_toEndOf=
"@id/noVideoMapWrapper"
/>
<FrameLayout
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/noVideoMapWrapper"
android:id=
"@+id/currentWorkStatus"
android:layout_width=
"0dp"
android:layout_width=
"wrap_content"
android:layout_height=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"16dp"
android:layout_gravity=
"center_vertical"
android:layout_marginBottom=
"4dp"
android:layout_marginStart=
"9dp"
app:layout_constraintBottom_toBottomOf=
"@id/defaultReminderInfoText"
android:layout_marginTop=
"7dp"
app:layout_constraintEnd_toEndOf=
"parent"
android:layout_marginBottom=
"7dp"
app:layout_constraintStart_toStartOf=
"@id/guideline4"
android:drawableStart=
"@mipmap/icon_current_status_empty_light"
app:layout_constraintTop_toTopOf=
"@id/defaultWorkingAvatar"
/>
android:drawablePadding=
"10dp"
android:gravity=
"center_vertical"
android:text=
"@string/work_status_empty"
android:textColor=
"@color/home_text_color"
android:textSize=
"28sp"
/>
<androidx.constraintlayout.widget.Guideline
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/guideline4"
android:id=
"@+id/workStatusEdit"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:layout_gravity=
"center_vertical"
app:layout_constraintGuide_begin=
"334dp"
/>
android:layout_marginStart=
"20dp"
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_marginEnd=
"20dp"
\ No newline at end of file
android:background=
"@drawable/background_work_status_edit_btn"
android:clickable=
"true"
android:focusable=
"true"
android:paddingStart=
"10dp"
android:paddingTop=
"4dp"
android:paddingEnd=
"10dp"
android:paddingBottom=
"4dp"
android:text=
"@string/work_status_edit"
android:textColor=
"#ff3684f9"
android:textSize=
"24sp"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/statusReport"
style=
"@style/StatusBarTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/background_report_default_btn"
android:text=
"@string/toggle_status_report"
android:textSize=
"28sp"
android:focusable=
"true"
android:clickable=
"true"
android:textColor=
"@drawable/color_text_btn"
app:layout_constraintTop_toTopOf=
"@id/more"
app:layout_constraintEnd_toEndOf=
"@id/mapContainer"
/>
<include
android:id=
"@+id/mapContainer"
layout=
"@layout/layout_map_box"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_0"
android:layout_marginEnd=
"@dimen/dp_16"
android:layout_marginBottom=
"@dimen/dp_4"
app:layout_constraintBottom_toBottomOf=
"@id/reminderInfoText"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/guideline4"
app:layout_constraintTop_toTopOf=
"@id/avatar"
/>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/guideline4"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:layout_constraintGuide_begin=
"@dimen/dp_334"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
app/src/main/res/layout/
fragment_video_home
.xml
→
app/src/main/res/layout/
activity_home_video
.xml
View file @
1d65e955
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.
constraintlayout.widget.ConstraintLayou
t
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.
appcompat.widget.LinearLayoutCompa
t
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".ui.video.HomeVideoFragment"
>
android:orientation=
"vertical"
tools:context=
".ui.video.HomeVideoActivity"
>
<androidx.appcompat.widget.AppCompatImageView
<include
android:id=
"@+id/workingAvatar"
android:layout_width=
"match_parent"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"16dp"
android:adjustViewBounds=
"true"
android:src=
"@mipmap/icon_avatar_normal"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/speedText"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"12dp"
android:id=
"@+id/titleBar"
android:background=
"@drawable/drawable_bg_speed_txt"
layout=
"@layout/status_bar_layout"
/>
android:gravity=
"center"
<androidx.constraintlayout.widget.ConstraintLayout
android:text=
"@string/current_speed"
android:layout_width=
"match_parent"
android:textColor=
"@color/home_text_color"
android:layout_height=
"match_parent"
>
android:textSize=
"16sp"
<androidx.appcompat.widget.AppCompatImageView
app:layout_constraintBottom_toBottomOf=
"@+id/workingAvatar"
android:id=
"@+id/workingAvatar"
app:layout_constraintStart_toEndOf=
"@id/workingAvatar"
android:layout_width=
"wrap_content"
app:layout_constraintTop_toTopOf=
"@id/workingAvatar"
android:layout_height=
"wrap_content"
tools:ignore=
"SmallSp"
/>
android:layout_marginStart=
"@dimen/dp_16"
android:layout_marginTop=
"@dimen/dp_16"
<androidx.appcompat.widget.AppCompatTextView
android:adjustViewBounds=
"true"
android:id=
"@+id/dispatchedCommTime"
android:src=
"@mipmap/icon_avatar_normal"
android:layout_width=
"wrap_content"
app:layout_constraintStart_toStartOf=
"parent"
android:layout_height=
"36dp"
app:layout_constraintTop_toTopOf=
"parent"
/>
android:layout_marginStart=
"18dp"
<androidx.appcompat.widget.AppCompatTextView
android:layout_marginTop=
"6dp"
android:id=
"@+id/speedText"
android:gravity=
"center"
android:layout_width=
"wrap_content"
android:text=
"2023/3/10 08:12:34"
android:layout_height=
"wrap_content"
android:textColor=
"@color/home_text_color"
android:layout_marginStart=
"@dimen/dp_12"
android:textSize=
"24sp"
android:background=
"@drawable/drawable_bg_speed_txt"
app:layout_constraintStart_toEndOf=
"@id/speedText"
android:gravity=
"center"
app:layout_constraintTop_toTopOf=
"@id/speedText"
/>
android:text=
"@string/current_speed"
android:textColor=
"@color/home_text_color"
<androidx.appcompat.widget.AppCompatTextView
android:textSize=
"@dimen/sp_16"
android:id=
"@+id/loadingArea"
app:layout_constraintBottom_toBottomOf=
"@+id/workingAvatar"
android:layout_width=
"wrap_content"
app:layout_constraintStart_toEndOf=
"@id/workingAvatar"
android:layout_height=
"40dp"
app:layout_constraintTop_toTopOf=
"@id/workingAvatar"
android:layout_marginTop=
"12dp"
tools:ignore=
"SmallSp"
/>
android:gravity=
"center"
android:text=
"装载区01"
android:textColor=
"@color/home_text_color"
android:textSize=
"30sp"
app:layout_constraintStart_toStartOf=
"@id/dispatchedCommTime"
app:layout_constraintTop_toBottomOf=
"@id/dispatchedCommTime"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/toFlag"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"8dp"
android:adjustViewBounds=
"true"
android:gravity=
"center"
android:src=
"@mipmap/icon_arrow_light"
app:layout_constraintBottom_toBottomOf=
"@id/loadingArea"
app:layout_constraintStart_toEndOf=
"@id/loadingArea"
app:layout_constraintTop_toTopOf=
"@id/loadingArea"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/unloadingArea"
android:layout_width=
"wrap_content"
android:layout_height=
"40dp"
android:layout_marginStart=
"16dp"
android:gravity=
"center"
android:text=
"卸载区01"
android:textColor=
"@color/home_text_color"
android:textSize=
"30sp"
app:layout_constraintStart_toEndOf=
"@id/toFlag"
app:layout_constraintTop_toTopOf=
"@id/loadingArea"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/reminderInfoText"
style=
"@style/ReminderInfoTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"24dp"
android:background=
"@drawable/drawable_bg_reminder_info1"
android:text=
"@string/reminder_info_text"
app:layout_constraintStart_toEndOf=
"@id/unloadingArea"
app:layout_constraintTop_toTopOf=
"@id/dispatchedCommTime"
tools:ignore=
"SmallSp"
/>
<FrameLayout
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/videoMapWrapper"
android:id=
"@+id/dispatchedTime"
android:layout_width=
"0dp"
android:layout_width=
"wrap_content"
android:layout_height=
"0dp"
android:layout_height=
"@dimen/dp_36"
android:layout_marginTop=
"18dp"
android:layout_marginStart=
"@dimen/dp_18"
android:layout_marginBottom=
"14dp"
android:layout_marginTop=
"@dimen/dp_6"
app:layout_constraintBottom_toTopOf=
"@id/toggleMore"
android:gravity=
"center"
app:layout_constraintEnd_toEndOf=
"@id/reminderInfoText"
android:text=
"2023/3/10 08:12:34"
app:layout_constraintStart_toStartOf=
"@id/workingAvatar"
android:textColor=
"@color/home_text_color"
app:layout_constraintTop_toBottomOf=
"@id/workingAvatar"
/>
android:textSize=
"@dimen/sp_24"
app:layout_constraintStart_toEndOf=
"@id/speedText"
app:layout_constraintTop_toTopOf=
"@id/speedText"
/>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/toggleMore"
android:id=
"@+id/loadingArea"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"@dimen/dp_40"
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"@dimen/dp_12"
android:layout_marginBottom=
"15dp"
android:gravity=
"center"
android:adjustViewBounds=
"true"
android:text=
"装载区01"
android:background=
"@drawable/background_more_btn"
android:textColor=
"@color/home_text_color"
android:clickable=
"true"
android:textSize=
"@dimen/sp_30"
android:contentDescription=
"@string/toggle_more"
app:layout_constraintStart_toStartOf=
"@id/dispatchedTime"
android:focusable=
"true"
app:layout_constraintTop_toBottomOf=
"@id/dispatchedTime"
/>
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/currentWorkStatusLayout"
android:id=
"@+id/toFlag"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"0dp"
android:layout_height=
"wrap_content"
android:background=
"@drawable/background_working_status"
android:layout_marginStart=
"@dimen/dp_16"
android:orientation=
"horizontal"
android:layout_marginTop=
"@dimen/dp_8"
app:layout_constraintBottom_toBottomOf=
"@id/toggleMore"
android:adjustViewBounds=
"true"
app:layout_constraintEnd_toStartOf=
"@id/guideline2"
android:gravity=
"center"
app:layout_constraintStart_toStartOf=
"parent"
android:src=
"@mipmap/icon_arrow_light"
app:layout_constraintTop_toTopOf=
"@id/toggleMore"
>
app:layout_constraintBottom_toBottomOf=
"@id/loadingArea"
app:layout_constraintStart_toEndOf=
"@id/loadingArea"
app:layout_constraintTop_toTopOf=
"@id/loadingArea"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/
currentWorkStatus
"
android:id=
"@+id/
unloadingArea
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"@dimen/dp_40"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"@dimen/dp_16"
android:layout_marginStart=
"9dp"
android:gravity=
"center"
android:layout_marginTop=
"7dp"
android:text=
"卸载区01"
android:layout_marginBottom=
"7dp"
android:drawableStart=
"@mipmap/icon_current_status_empty_light"
android:drawablePadding=
"10dp"
android:gravity=
"center_vertical"
android:text=
"@string/work_status_empty"
android:textColor=
"@color/home_text_color"
android:textColor=
"@color/home_text_color"
android:textSize=
"28sp"
/>
android:textSize=
"@dimen/sp_30"
app:layout_constraintStart_toEndOf=
"@id/toFlag"
app:layout_constraintTop_toTopOf=
"@id/loadingArea"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/workStatusEdit"
android:id=
"@+id/reminderInfoText"
style=
"@style/ReminderInfoTextStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_24"
android:background=
"@drawable/drawable_bg_reminder_info1"
android:text=
"@string/reminder_info_text"
app:layout_constraintStart_toEndOf=
"@id/unloadingArea"
app:layout_constraintTop_toTopOf=
"@id/dispatchedTime"
tools:ignore=
"SmallSp"
/>
<include
android:id=
"@+id/mapContainer"
layout=
"@layout/layout_map_box"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_0"
android:layout_marginTop=
"@dimen/dp_18"
android:layout_marginBottom=
"@dimen/dp_14"
app:layout_constraintBottom_toTopOf=
"@id/more"
app:layout_constraintEnd_toEndOf=
"@id/reminderInfoText"
app:layout_constraintStart_toStartOf=
"@id/workingAvatar"
app:layout_constraintTop_toBottomOf=
"@id/workingAvatar"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/more"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_
gravity=
"center_vertical
"
android:layout_
marginStart=
"@dimen/dp_15
"
android:layout_margin
Start=
"20dp
"
android:layout_margin
Bottom=
"@dimen/dp_15
"
android:
layout_marginEnd=
"20dp
"
android:
adjustViewBounds=
"true
"
android:background=
"@drawable/background_
work_status_edit
_btn"
android:background=
"@drawable/background_
more
_btn"
android:clickable=
"true"
android:clickable=
"true"
android:contentDescription=
"@string/toggle_more"
android:focusable=
"true"
android:focusable=
"true"
android:paddingStart=
"10dp"
app:layout_constraintBottom_toBottomOf=
"parent"
android:paddingTop=
"4dp"
app:layout_constraintStart_toStartOf=
"parent"
/>
android:paddingEnd=
"10dp"
android:paddingBottom=
"4dp"
android:text=
"@string/work_status_edit"
android:textColor=
"#ff3684f9"
android:textSize=
"24sp"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/reportStatus"
android:id=
"@+id/workStatusLayout"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"@dimen/dp_0"
android:background=
"@drawable/background_report_btn"
android:background=
"@drawable/background_working_status"
android:clickable=
"true"
android:orientation=
"horizontal"
android:focusable=
"true"
app:layout_constraintBottom_toBottomOf=
"@id/more"
android:contentDescription=
"@string/report_status"
app:layout_constraintEnd_toStartOf=
"@id/guideline2"
app:layout_constraintBottom_toBottomOf=
"@id/toggleMore"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@id/reminderInfoText"
app:layout_constraintTop_toTopOf=
"@id/more"
>
app:layout_constraintTop_toTopOf=
"@id/toggleMore"
/>
<androidx.appcompat.widget.AppCompatTextView
<com.google.android.exoplayer2.ui.StyledPlayerView
android:id=
"@+id/workStatus"
android:id=
"@+id/videoView1"
android:layout_width=
"wrap_content"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"0dp"
android:layout_gravity=
"center_vertical"
app:layout_constraintBottom_toBottomOf=
"@id/guideline3"
android:layout_marginStart=
"@dimen/dp_9"
app:layout_constraintEnd_toEndOf=
"parent"
android:layout_marginTop=
"@dimen/dp_7"
app:layout_constraintStart_toStartOf=
"@id/guideline2"
android:layout_marginBottom=
"@dimen/dp_7"
app:layout_constraintTop_toTopOf=
"parent"
android:drawableStart=
"@mipmap/icon_current_status_empty_light"
app:resize_mode=
"fill"
android:drawablePadding=
"@dimen/dp_10"
app:use_controller=
"false"
/>
android:gravity=
"center_vertical"
android:text=
"@string/work_status_empty"
<com.google.android.exoplayer2.ui.StyledPlayerView
android:textColor=
"@color/home_text_color"
android:id=
"@+id/videoView2"
android:textSize=
"@dimen/sp_28"
/>
android:layout_width=
"0dp"
android:layout_height=
"0dp"
<androidx.appcompat.widget.AppCompatTextView
app:layout_constraintBottom_toBottomOf=
"parent"
android:id=
"@+id/workStatusEdit"
app:layout_constraintEnd_toEndOf=
"parent"
android:layout_width=
"wrap_content"
app:layout_constraintStart_toStartOf=
"@id/guideline2"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toTopOf=
"@id/guideline3"
android:layout_gravity=
"center_vertical"
app:resize_mode=
"fill"
android:layout_marginStart=
"@dimen/dp_20"
app:use_controller=
"false"
/>
android:layout_marginEnd=
"@dimen/dp_20"
android:background=
"@drawable/background_work_status_edit_btn"
<androidx.constraintlayout.widget.Guideline
android:clickable=
"true"
android:id=
"@+id/guideline2"
android:focusable=
"true"
android:layout_width=
"wrap_content"
android:paddingStart=
"@dimen/dp_10"
android:layout_height=
"wrap_content"
android:paddingTop=
"@dimen/dp_4"
android:orientation=
"vertical"
android:paddingEnd=
"@dimen/dp_10"
app:layout_constraintGuide_percent=
"0.62"
/>
android:paddingBottom=
"@dimen/dp_4"
android:text=
"@string/work_status_edit"
android:textColor=
"#ff3684f9"
android:textSize=
"@dimen/sp_24"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/reportStatus"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/background_report_btn"
android:clickable=
"true"
android:focusable=
"true"
android:contentDescription=
"@string/report_status"
app:layout_constraintBottom_toBottomOf=
"@id/more"
app:layout_constraintEnd_toEndOf=
"@id/reminderInfoText"
app:layout_constraintTop_toTopOf=
"@id/more"
/>
<com.google.android.exoplayer2.ui.StyledPlayerView
android:id=
"@+id/videoView1"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_0"
app:layout_constraintBottom_toBottomOf=
"@id/guideline3"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/guideline2"
app:layout_constraintTop_toTopOf=
"parent"
app:resize_mode=
"fill"
app:use_controller=
"false"
/>
<com.google.android.exoplayer2.ui.StyledPlayerView
android:id=
"@+id/videoView2"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_0"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/guideline2"
app:layout_constraintTop_toTopOf=
"@id/guideline3"
app:resize_mode=
"fill"
app:use_controller=
"false"
/>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/guideline2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:layout_constraintGuide_percent=
"0.62"
/>
<androidx.constraintlayout.widget.Guideline
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/guideline3"
android:id=
"@+id/guideline3"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
app:layout_constraintGuide_percent=
"0.5"
/>
app:layout_constraintGuide_percent=
"0.5"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
app/src/main/res/layout/activity_main.xml
deleted
100644 → 0
View file @
fdbd57de
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@mipmap/background_main_light"
android:padding=
"4dp"
>
<include
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/statusBarMain"
layout=
"@layout/layout_status_bar"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<androidx.fragment.app.FragmentContainerView
android:id=
"@+id/nav_host_fragment_activity_main"
android:name=
"androidx.navigation.fragment.NavHostFragment"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
app:defaultNavHost=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/statusBarMain"
app:navGraph=
"@navigation/mobile_navigation"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_splash.xml
View file @
1d65e955
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".SplashActivity"
>
tools:context=
".
ui.
SplashActivity"
>
<ImageView
<ImageView
android:layout_width=
"166dp"
android:layout_width=
"166dp"
...
...
app/src/main/res/layout/
fragment
_user_settings.xml
→
app/src/main/res/layout/
activity
_user_settings.xml
View file @
1d65e955
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_ffe5e5e5"
android:orientation=
"vertical"
tools:context=
".ui.settings.UserSettingsFragment"
>
tools:context=
".ui.settings.UserSettingsActivity"
>
<include
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"match_parent"
android:id=
"@+id/userSettingsTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:id=
"@+id/titleBar"
android:drawableStart=
"@mipmap/icon_settings_tiny"
layout=
"@layout/status_bar_layout"
/>
android:drawablePadding=
"@dimen/dp_3"
<androidx.constraintlayout.widget.ConstraintLayout
android:text=
"@string/user_settings_title"
android:layout_width=
"match_parent"
android:textColor=
"@color/color_ff333333"
android:layout_height=
"match_parent"
android:textSize=
"@dimen/sp_30"
android:background=
"@color/color_ffe5e5e5"
>
android:textStyle=
"bold"
<androidx.appcompat.widget.AppCompatTextView
android:layout_marginTop=
"@dimen/dp_12"
android:id=
"@+id/settingsTitle"
android:layout_marginStart=
"@dimen/dp_12"
android:layout_width=
"wrap_content"
app:layout_constraintStart_toStartOf=
"parent"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toTopOf=
"parent"
/>
android:gravity=
"center"
<RadioGroup
android:drawableStart=
"@mipmap/icon_settings_tiny"
android:id=
"@+id/useSettingsRadioGroup"
android:drawablePadding=
"@dimen/dp_3"
android:layout_width=
"@dimen/dp_132"
android:text=
"@string/user_settings_title"
android:layout_height=
"@dimen/dp_578"
android:textColor=
"@color/color_ff333333"
android:layout_marginTop=
"@dimen/dp_13"
android:textSize=
"@dimen/sp_30"
android:gravity=
"center_horizontal"
android:textStyle=
"bold"
android:background=
"@drawable/background_user_settings_radio_group"
android:layout_marginTop=
"@dimen/dp_12"
app:layout_constraintTop_toBottomOf=
"@id/userSettingsTitle"
android:layout_marginStart=
"@dimen/dp_12"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
android:orientation=
"vertical"
>
app:layout_constraintTop_toTopOf=
"parent"
/>
<RadioButton
<RadioGroup
android:id=
"@+id/userSettingsVehicleInfo"
android:id=
"@+id/tabContainer"
android:layout_width=
"@dimen/dp_98"
android:layout_width=
"@dimen/dp_132"
android:layout_height=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_578"
android:gravity=
"center_horizontal"
android:layout_marginTop=
"@dimen/dp_13"
android:drawableTop=
"@drawable/icon_user_settings_vehicle_info"
android:button=
"@null"
android:background=
"@drawable/background_user_settings_radio_button"
android:text=
"@string/vehicle_info"
android:textSize=
"@dimen/sp_20"
android:textColor=
"@drawable/color_text_btn_4"
android:paddingTop=
"@dimen/dp_8"
android:layout_marginTop=
"@dimen/dp_27"
android:checked=
"true"
/>
<RadioButton
android:id=
"@+id/userSettingsNetwork"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:drawableTop=
"@drawable/icon_user_settings_network"
android:background=
"@drawable/background_user_settings_radio_group"
android:button=
"@null"
app:layout_constraintTop_toBottomOf=
"@id/settingsTitle"
android:background=
"@drawable/background_user_settings_radio_button"
app:layout_constraintStart_toStartOf=
"parent"
android:text=
"@string/network_settings"
android:orientation=
"vertical"
>
android:textSize=
"@dimen/sp_20"
<RadioButton
android:textColor=
"@drawable/color_text_btn_4"
android:id=
"@+id/tabVehicleInfo"
android:paddingTop=
"@dimen/dp_8"
android:layout_width=
"@dimen/dp_98"
android:layout_marginTop=
"@dimen/dp_16"
/>
android:layout_height=
"@dimen/dp_98"
<RadioButton
android:gravity=
"center_horizontal"
android:id=
"@+id/userSettingsFixedInfo"
android:drawableTop=
"@drawable/icon_user_settings_vehicle_info"
android:layout_width=
"@dimen/dp_98"
android:button=
"@null"
android:layout_height=
"@dimen/dp_98"
android:background=
"@drawable/background_user_settings_radio_button"
android:gravity=
"center_horizontal"
android:text=
"@string/vehicle_info"
android:drawableTop=
"@drawable/icon_user_settings_fixed_info"
android:textSize=
"@dimen/sp_20"
android:button=
"@null"
android:textColor=
"@drawable/color_text_btn_4"
android:background=
"@drawable/background_user_settings_radio_button"
android:paddingTop=
"@dimen/dp_8"
android:text=
"@string/fixed_info"
android:layout_marginTop=
"@dimen/dp_27"
android:textSize=
"@dimen/sp_20"
android:checked=
"true"
/>
android:textColor=
"@drawable/color_text_btn_4"
<RadioButton
android:paddingTop=
"@dimen/dp_8"
android:id=
"@+id/tabNetwork"
android:layout_marginTop=
"@dimen/dp_16"
/>
android:layout_width=
"@dimen/dp_98"
</RadioGroup>
android:layout_height=
"@dimen/dp_98"
<FrameLayout
android:gravity=
"center_horizontal"
android:id=
"@+id/userSettingsContentWrapper"
android:drawableTop=
"@drawable/icon_user_settings_network"
android:layout_width=
"@dimen/dp_0"
android:button=
"@null"
android:layout_height=
"@dimen/dp_0"
android:background=
"@drawable/background_user_settings_radio_button"
app:layout_constraintTop_toTopOf=
"@id/useSettingsRadioGroup"
android:text=
"@string/network_settings"
app:layout_constraintBottom_toBottomOf=
"@id/useSettingsRadioGroup"
android:textSize=
"@dimen/sp_20"
app:layout_constraintStart_toStartOf=
"@id/useSettingsRadioGroup"
/>
android:textColor=
"@drawable/color_text_btn_4"
<androidx.appcompat.widget.AppCompatImageView
android:paddingTop=
"@dimen/dp_8"
android:id=
"@+id/useSettingsToggleMore"
android:layout_marginTop=
"@dimen/dp_16"
/>
android:layout_width=
"wrap_content"
<RadioButton
android:layout_height=
"wrap_content"
android:id=
"@+id/tabFixedInfo"
android:layout_marginStart=
"@dimen/dp_18"
android:layout_width=
"@dimen/dp_98"
android:adjustViewBounds=
"true"
android:layout_height=
"@dimen/dp_98"
android:background=
"@drawable/background_more_btn"
android:gravity=
"center_horizontal"
android:clickable=
"true"
android:drawableTop=
"@drawable/icon_user_settings_fixed_info"
android:contentDescription=
"@string/toggle_more"
android:button=
"@null"
android:focusable=
"true"
android:background=
"@drawable/background_user_settings_radio_button"
app:layout_constraintBottom_toBottomOf=
"parent"
android:text=
"@string/fixed_info"
app:layout_constraintStart_toStartOf=
"parent"
android:textSize=
"@dimen/sp_20"
app:layout_constraintTop_toBottomOf=
"@id/useSettingsRadioGroup"
/>
android:textColor=
"@drawable/color_text_btn_4"
android:paddingTop=
"@dimen/dp_8"
android:layout_marginTop=
"@dimen/dp_16"
/>
</RadioGroup>
<FrameLayout
android:id=
"@+id/tabContent"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_0"
app:layout_constraintTop_toTopOf=
"@id/tabContainer"
app:layout_constraintBottom_toBottomOf=
"@id/tabContainer"
app:layout_constraintStart_toStartOf=
"@id/tabContainer"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/more"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_18"
android:adjustViewBounds=
"true"
android:background=
"@drawable/background_more_btn"
android:clickable=
"true"
android:contentDescription=
"@string/toggle_more"
android:focusable=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tabContainer"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/useSettingsToHome"
android:id=
"@+id/goHome"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_15"
android:layout_marginStart=
"@dimen/dp_15"
android:background=
"@drawable/background_collect_btn_back_to_home"
android:background=
"@drawable/background_collect_btn_back_to_home"
android:clickable=
"true"
android:clickable=
"true"
android:contentDescription=
"@string/toggle_more"
android:contentDescription=
"@string/toggle_more"
android:drawableLeft=
"@drawable/background_btn_home_drawable"
android:drawableLeft=
"@drawable/background_btn_home_drawable"
android:drawablePadding=
"@dimen/dp_3"
android:drawablePadding=
"@dimen/dp_3"
android:focusable=
"true"
android:focusable=
"true"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:paddingLeft=
"@dimen/dp_54"
android:paddingLeft=
"@dimen/dp_54"
android:text=
"@string/back_to_home"
android:text=
"@string/back_to_home"
android:textColor=
"@drawable/color_text_btn"
android:textColor=
"@drawable/color_text_btn"
android:textSize=
"@dimen/sp_28"
android:textSize=
"@dimen/sp_28"
app:layout_constraintBottom_toBottomOf=
"@id/useSettingsToggleMore"
app:layout_constraintBottom_toBottomOf=
"@id/more"
app:layout_constraintStart_toEndOf=
"@id/useSettingsToggleMore"
app:layout_constraintStart_toEndOf=
"@id/more"
app:layout_constraintTop_toTopOf=
"@id/useSettingsToggleMore"
/>
app:layout_constraintTop_toTopOf=
"@id/more"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
app/src/main/res/layout/current_
vehicle_view_
annotation_layout.xml
→
app/src/main/res/layout/current_annotation_layout.xml
View file @
1d65e955
File moved
app/src/main/res/layout/dialog_delay_cause_select.xml
View file @
1d65e955
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
android:layout_width=
"@dimen/dp_984"
android:layout_width=
"@dimen/dp_984"
android:layout_height=
"@dimen/dp_636"
android:layout_height=
"@dimen/dp_636"
app:cardCornerRadius=
"@dimen/dp_20"
app:cardCornerRadius=
"@dimen/dp_20"
tools:context=
".ui.
Main
Activity"
>
tools:context=
".ui.
home.Home
Activity"
>
<androidx.core.widget.NestedScrollView
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
...
...
app/src/main/res/layout/dialog_fault_cause_select.xml
View file @
1d65e955
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
android:layout_width=
"@dimen/dp_984"
android:layout_width=
"@dimen/dp_984"
android:layout_height=
"@dimen/dp_636"
android:layout_height=
"@dimen/dp_636"
app:cardCornerRadius=
"@dimen/dp_20"
app:cardCornerRadius=
"@dimen/dp_20"
tools:context=
".ui.
Main
Activity"
>
tools:context=
".ui.
home.Home
Activity"
>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
...
...
app/src/main/res/layout/dialog_standby_select.xml
View file @
1d65e955
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
android:layout_width=
"@dimen/dp_560"
android:layout_width=
"@dimen/dp_560"
android:layout_height=
"@dimen/dp_340"
android:layout_height=
"@dimen/dp_340"
app:cardCornerRadius=
"@dimen/dp_20"
app:cardCornerRadius=
"@dimen/dp_20"
tools:context=
".ui.
Main
Activity"
>
tools:context=
".ui.
home.Home
Activity"
>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
...
...
app/src/main/res/layout/fragment_base.xml
deleted
100644 → 0
View file @
fdbd57de
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".ui.BaseMapFragment"
>
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:text=
"@string/hello_blank_fragment"
/>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/layout_map_box.xml
View file @
1d65e955
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<
FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
androidx.cardview.widget.CardView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/drawable_bg_map_box"
android:background=
"@drawable/drawable_bg_map_box"
a
ndroid:padding=
"@dimen/dp_3
"
a
pp:cardCornerRadius=
"@dimen/dp_16
"
tools:context=
".ui.
Main
Activity"
>
tools:context=
".ui.
home.Home
Activity"
>
<androidx.c
ardview.widget.CardView
<androidx.c
onstraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
a
pp:cardCornerRadius=
"@dimen/dp_16
"
>
a
ndroid:layout_margin=
"@dimen/dp_3
"
>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"0dp"
<androidx.constraintlayout.widget.ConstraintLayout
app:layout_constraintBottom_toTopOf=
"@id/collectDataText"
android:layout_width=
"match_parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<com.mapbox.maps.MapView
android:id=
"@+id/mapView"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
app:layout_constraintBottom_to
TopOf=
"@id/collectDataTex
t"
app:layout_constraintBottom_to
BottomOf=
"paren
t"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
app:layout_constraintTop_toTopOf=
"parent"
<com.mapbox.maps.MapView
app:mapbox_resourcesAccessToken=
"@string/map_box_public_key"
android:id=
"@+id/mapView"
app:mapbox_scaleBarBorderWidth=
"0dp"
android:layout_width=
"0dp"
app:mapbox_scaleBarHeight=
"5dp"
android:layout_height=
"0dp"
app:mapbox_scaleBarGravity=
"bottom|right"
app:layout_constraintBottom_toBottomOf=
"parent"
app:mapbox_scaleBarIsMetricUnits=
"true"
app:layout_constraintEnd_toEndOf=
"parent"
app:mapbox_scaleBarMarginBottom=
"38dp"
app:layout_constraintStart_toStartOf=
"parent"
app:mapbox_scaleBarMarginRight=
"0dp"
app:layout_constraintTop_toTopOf=
"parent"
app:mapbox_scaleBarPrimaryColor=
"@color/black"
app:mapbox_resourcesAccessToken=
"@string/map_box_public_key"
app:mapbox_scaleBarSecondaryColor=
"@android:color/transparent"
app:mapbox_scaleBarBorderWidth=
"0dp"
app:mapbox_scaleBarShowTextBorder=
"false"
app:mapbox_scaleBarHeight=
"5dp"
app:mapbox_scaleBarTextBarMargin=
"10dp"
app:mapbox_scaleBarGravity=
"bottom|right"
app:mapbox_scaleBarTextColor=
"@android:color/black"
app:mapbox_scaleBarIsMetricUnits=
"true"
app:mapbox_scaleBarTextSize=
"10dp"
/>
app:mapbox_scaleBarMarginBottom=
"38dp"
app:mapbox_scaleBarMarginRight=
"0dp"
app:mapbox_scaleBarPrimaryColor=
"@color/black"
app:mapbox_scaleBarSecondaryColor=
"@android:color/transparent"
app:mapbox_scaleBarShowTextBorder=
"false"
app:mapbox_scaleBarTextBarMargin=
"10dp"
app:mapbox_scaleBarTextColor=
"@android:color/black"
app:mapbox_scaleBarTextSize=
"10dp"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/sos"
style=
"@style/MapBoxButtonStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"30dp"
android:layout_marginTop=
"30dp"
android:contentDescription=
"@string/sos"
android:src=
"@drawable/background_sos_btn"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/emergency"
style=
"@style/MapBoxButtonStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"25dp"
android:layout_marginBottom=
"25dp"
android:contentDescription=
"@string/emergency"
android:src=
"@mipmap/icon_driving_state_emergency"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/zoomLayout"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"24dp"
android:layout_marginEnd=
"28dp"
android:orientation=
"vertical"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/zoomOut"
android:id=
"@+id/sos"
style=
"@style/MapBoxButtonStyle"
style=
"@style/MapBoxButtonStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_marginStart=
"30dp"
android:contentDescription=
"@string/zoom_out"
android:layout_marginTop=
"30dp"
android:src=
"@drawable/background_zoom_out"
/>
android:contentDescription=
"@string/sos"
android:src=
"@drawable/background_sos_btn"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<View
<androidx.appcompat.widget.AppCompatImageView
android:layout_width=
"match_parent"
android:id=
"@+id/emergency"
android:layout_height=
"1dp"
style=
"@style/MapBoxButtonStyle"
android:layout_marginStart=
"12dp"
android:layout_width=
"wrap_content"
android:layout_marginEnd=
"12dp"
android:layout_height=
"wrap_content"
android:background=
"@color/color_ffcacaca"
/>
android:layout_marginStart=
"25dp"
android:layout_marginBottom=
"25dp"
android:contentDescription=
"@string/emergency"
android:src=
"@mipmap/icon_driving_state_emergency"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/zoomIn
"
android:id=
"@+id/zoomLayout
"
style=
"@style/MapBoxButtonStyle
"
android:layout_width=
"wrap_content
"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:layout_height=
"0
dp"
android:layout_marginTop=
"24
dp"
android:layout_weight=
"1
"
android:layout_marginEnd=
"28dp
"
android:contentDescription=
"@string/zoom_in
"
android:orientation=
"vertical
"
android:src=
"@drawable/background_zoom_in"
/>
app:layout_constraintEnd_toEndOf=
"parent"
</androidx.appcompat.widget.LinearLayoutCompat
>
app:layout_constraintTop_toTopOf=
"parent"
>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/
locationTruck
"
android:id=
"@+id/
zoomOut
"
style=
"@style/MapBoxButtonStyle"
style=
"@style/MapBoxButtonStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"0dp"
android:contentDescription=
"@string/location_truck"
android:layout_weight=
"1"
android:src=
"@drawable/background_location_truck"
android:contentDescription=
"@string/zoom_out"
app:layout_constraintBottom_toBottomOf=
"parent"
android:src=
"@drawable/background_zoom_out"
/>
app:layout_constraintEnd_toEndOf=
"@id/zoomLayout"
app:layout_constraintStart_toStartOf=
"@id/zoomLayout"
<View
app:layout_constraintTop_toTopOf=
"parent"
/>
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginStart=
"12dp"
android:layout_marginEnd=
"12dp"
android:background=
"@color/color_ffcacaca"
/>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/
toggleSafetyRange
"
android:id=
"@+id/
zoomIn
"
style=
"@style/MapBoxButtonStyle"
style=
"@style/MapBoxButtonStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"0dp"
android:layout_marginTop=
"34dp"
android:layout_weight=
"1"
android:contentDescription=
"@string/toggle_safety_range"
android:contentDescription=
"@string/zoom_in"
android:src=
"@mipmap/icon_map_enable_safety_range_light"
android:src=
"@drawable/background_zoom_in"
/>
app:layout_constraintEnd_toEndOf=
"@id/zoomLayout"
</androidx.appcompat.widget.LinearLayoutCompat>
app:layout_constraintStart_toStartOf=
"@id/zoomLayout"
app:layout_constraintTop_toBottomOf=
"@id/locationTruck"
/>
<androidx.appcompat.widget.AppCompatImageView
</androidx.constraintlayout.widget.ConstraintLayout>
android:id=
"@+id/locationTruck"
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/MapBoxButtonStyle"
android:id=
"@+id/collectDataText"
android:layout_width=
"wrap_content"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"@dimen/dp_56"
android:contentDescription=
"@string/location_truck"
android:layout_marginStart=
"@dimen/dp_3"
android:src=
"@drawable/background_location_truck"
android:layout_marginEnd=
"@dimen/dp_3"
android:gravity=
"center"
android:text=
"@string/collect_data_text"
android:visibility=
"gone"
android:textSize=
"@dimen/sp_20"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@id/zoomLayout"
app:layout_constraintStart_toStartOf=
"parent"
/>
app:layout_constraintStart_toStartOf=
"@id/zoomLayout"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/toggleSafetyRange"
style=
"@style/MapBoxButtonStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"34dp"
android:contentDescription=
"@string/toggle_safety_range"
android:src=
"@mipmap/icon_map_enable_safety_range_light"
app:layout_constraintEnd_toEndOf=
"@id/zoomLayout"
app:layout_constraintStart_toStartOf=
"@id/zoomLayout"
app:layout_constraintTop_toBottomOf=
"@id/locationTruck"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.appcompat.widget.AppCompatTextView
</FrameLayout>
android:id=
"@+id/collectDataText"
\ No newline at end of file
android:layout_width=
"0dp"
android:layout_height=
"@dimen/dp_56"
android:layout_marginStart=
"@dimen/dp_3"
android:layout_marginEnd=
"@dimen/dp_3"
android:gravity=
"center"
android:text=
"@string/collect_data_text"
android:visibility=
"gone"
android:textSize=
"@dimen/sp_20"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
app/src/main/res/layout/other_
vehicle_view_
annotation_layout.xml
→
app/src/main/res/layout/other_annotation_layout.xml
View file @
1d65e955
File moved
app/src/main/res/layout/popup_more_features.xml
View file @
1d65e955
...
@@ -16,10 +16,10 @@
...
@@ -16,10 +16,10 @@
android:textSize=
"@dimen/sp_24"
android:textSize=
"@dimen/sp_24"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"@id/
moreF
eatureCollect"
/>
app:layout_constraintBottom_toTopOf=
"@id/
f
eatureCollect"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/
moreF
eatureCollect"
android:id=
"@+id/
f
eatureCollect"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_12"
android:layout_marginTop=
"@dimen/dp_12"
...
@@ -34,11 +34,11 @@
...
@@ -34,11 +34,11 @@
android:textSize=
"@dimen/sp_20"
android:textSize=
"@dimen/sp_20"
app:layout_constraintStart_toStartOf=
"@id/more_template_title"
app:layout_constraintStart_toStartOf=
"@id/more_template_title"
app:layout_constraintTop_toBottomOf=
"@id/more_template_title"
app:layout_constraintTop_toBottomOf=
"@id/more_template_title"
app:layout_constraintEnd_toStartOf=
"@id/
moreF
eatureHealth"
app:layout_constraintEnd_toStartOf=
"@id/
f
eatureHealth"
app:layout_constraintBottom_toTopOf=
"@id/
moreF
eatureSettings"
/>
app:layout_constraintBottom_toTopOf=
"@id/
f
eatureSettings"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/
moreF
eatureHealth"
android:id=
"@+id/
f
eatureHealth"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_45"
android:layout_marginStart=
"@dimen/dp_45"
...
@@ -51,13 +51,13 @@
...
@@ -51,13 +51,13 @@
android:text=
"@string/more_feature_health"
android:text=
"@string/more_feature_health"
android:textColor=
"@color/home_text_color"
android:textColor=
"@color/home_text_color"
android:textSize=
"@dimen/sp_20"
android:textSize=
"@dimen/sp_20"
app:layout_constraintBottom_toBottomOf=
"@id/
moreF
eatureCollect"
app:layout_constraintBottom_toBottomOf=
"@id/
f
eatureCollect"
app:layout_constraintStart_toEndOf=
"@id/
moreF
eatureCollect"
app:layout_constraintStart_toEndOf=
"@id/
f
eatureCollect"
app:layout_constraintTop_toTopOf=
"@id/
moreF
eatureCollect"
app:layout_constraintTop_toTopOf=
"@id/
f
eatureCollect"
app:layout_constraintEnd_toStartOf=
"@id/
moreF
eatureData"
/>
app:layout_constraintEnd_toStartOf=
"@id/
f
eatureData"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/
moreF
eatureData"
android:id=
"@+id/
f
eatureData"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_45"
android:layout_marginStart=
"@dimen/dp_45"
...
@@ -71,13 +71,13 @@
...
@@ -71,13 +71,13 @@
android:text=
"@string/more_feature_data"
android:text=
"@string/more_feature_data"
android:textColor=
"@color/home_text_color"
android:textColor=
"@color/home_text_color"
android:textSize=
"@dimen/sp_20"
android:textSize=
"@dimen/sp_20"
app:layout_constraintBottom_toBottomOf=
"@id/
moreF
eatureHealth"
app:layout_constraintBottom_toBottomOf=
"@id/
f
eatureHealth"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/
moreF
eatureHealth"
app:layout_constraintStart_toEndOf=
"@id/
f
eatureHealth"
app:layout_constraintTop_toTopOf=
"@id/
moreF
eatureHealth"
/>
app:layout_constraintTop_toTopOf=
"@id/
f
eatureHealth"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/
moreF
eatureSettings"
android:id=
"@+id/
f
eatureSettings"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_28"
android:layout_marginTop=
"@dimen/dp_28"
...
@@ -92,12 +92,12 @@
...
@@ -92,12 +92,12 @@
android:textColor=
"@color/home_text_color"
android:textColor=
"@color/home_text_color"
android:textSize=
"@dimen/sp_20"
android:textSize=
"@dimen/sp_20"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/
moreF
eatureCollect"
app:layout_constraintStart_toStartOf=
"@id/
f
eatureCollect"
app:layout_constraintTop_toBottomOf=
"@id/
moreF
eatureCollect"
app:layout_constraintTop_toBottomOf=
"@id/
f
eatureCollect"
app:layout_constraintEnd_toStartOf=
"@id/
moreF
eatureReboot"
/>
app:layout_constraintEnd_toStartOf=
"@id/
f
eatureReboot"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/
moreF
eatureReboot"
android:id=
"@+id/
f
eatureReboot"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_45"
android:layout_marginStart=
"@dimen/dp_45"
...
@@ -110,13 +110,13 @@
...
@@ -110,13 +110,13 @@
android:text=
"@string/more_feature_reboot"
android:text=
"@string/more_feature_reboot"
android:textColor=
"@color/home_text_color"
android:textColor=
"@color/home_text_color"
android:textSize=
"@dimen/sp_20"
android:textSize=
"@dimen/sp_20"
app:layout_constraintBottom_toBottomOf=
"@id/
moreF
eatureSettings"
app:layout_constraintBottom_toBottomOf=
"@id/
f
eatureSettings"
app:layout_constraintStart_toEndOf=
"@id/
moreF
eatureSettings"
app:layout_constraintStart_toEndOf=
"@id/
f
eatureSettings"
app:layout_constraintTop_toTopOf=
"@id/
moreF
eatureSettings"
app:layout_constraintTop_toTopOf=
"@id/
f
eatureSettings"
app:layout_constraintEnd_toStartOf=
"@id/
moreF
eaturePowerOff"
/>
app:layout_constraintEnd_toStartOf=
"@id/
f
eaturePowerOff"
/>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/
moreF
eaturePowerOff"
android:id=
"@+id/
f
eaturePowerOff"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_45"
android:layout_marginStart=
"@dimen/dp_45"
...
@@ -130,8 +130,8 @@
...
@@ -130,8 +130,8 @@
android:text=
"@string/more_feature_power_off"
android:text=
"@string/more_feature_power_off"
android:textColor=
"@color/home_text_color"
android:textColor=
"@color/home_text_color"
android:textSize=
"@dimen/sp_20"
android:textSize=
"@dimen/sp_20"
app:layout_constraintBottom_toBottomOf=
"@id/
moreF
eatureReboot"
app:layout_constraintBottom_toBottomOf=
"@id/
f
eatureReboot"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/
moreF
eatureReboot"
app:layout_constraintStart_toEndOf=
"@id/
f
eatureReboot"
app:layout_constraintTop_toTopOf=
"@id/
moreF
eatureReboot"
/>
app:layout_constraintTop_toTopOf=
"@id/
f
eatureReboot"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/
layout_status_bar
.xml
→
app/src/main/res/layout/
status_bar_layout
.xml
View file @
1d65e955
File moved
app/src/main/res/navigation/activity_navigation.xml
deleted
100644 → 0
View file @
fdbd57de
<?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/activity_navigation"
app:startDestination=
"@id/splashActivity"
>
<activity
android:id=
"@+id/splashActivity"
android:name=
"com.waytous.anticollision.SplashActivity"
android:label=
"activity_splash"
tools:layout=
"@layout/activity_splash"
/>
<activity
android:id=
"@+id/mainActivity"
android:name=
"com.waytous.anticollision.ui.MainActivity"
android:label=
"MainActivity"
/>
</navigation>
\ No newline at end of file
app/src/main/res/navigation/mobile_navigation.xml
deleted
100644 → 0
View file @
fdbd57de
<?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/mobile_navigation"
app:startDestination=
"@id/navigation_home"
>
<fragment
android:id=
"@+id/navigation_home"
android:name=
"com.waytous.anticollision.ui.home.HomeNoVideoFragment"
android:label=
"@string/title_home"
tools:layout=
"@layout/fragment_no_video_home"
>
<action
android:id=
"@+id/action_navigation_home_to_collectFragment"
app:destination=
"@id/collectFragment"
/>
<action
android:id=
"@+id/action_navigation_home_to_navigation_video_Home"
app:destination=
"@id/navigation_video_Home"
/>
</fragment>
<fragment
android:id=
"@+id/navigation_video_Home"
android:name=
"com.waytous.anticollision.ui.video.HomeVideoFragment"
android:label=
"fragment_video_home"
tools:layout=
"@layout/fragment_video_home"
>
<action
android:id=
"@+id/action_navigation_video_Home_to_collectFragment"
app:destination=
"@id/collectFragment"
/>
<action
android:id=
"@+id/action_navigation_video_Home_to_navigation_home"
app:destination=
"@id/navigation_home"
/>
</fragment>
<fragment
android:id=
"@+id/collectFragment"
android:name=
"com.waytous.anticollision.ui.collect.CollectFragment"
android:label=
"fragment_collect"
tools:layout=
"@layout/fragment_collect"
/>
</navigation>
\ 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