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
17e45c80
Commit
17e45c80
authored
Jun 15, 2023
by
马乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.完成健康UI
parent
c94ad782
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
208 additions
and
6 deletions
+208
-6
build.gradle
app/build.gradle
+5
-4
HealthMangerFragment.kt
...m/waytous/anticollision/ui/health/HealthMangerFragment.kt
+26
-0
background_btn_commit.xml
app/src/main/res/drawable/background_btn_commit.xml
+17
-0
background_collect_tab_text.xml
app/src/main/res/drawable/background_collect_tab_text.xml
+1
-1
background_health_fault_report_item.xml
...main/res/drawable/background_health_fault_report_item.xml
+15
-0
background_textview_btn1.xml
app/src/main/res/drawable/background_textview_btn1.xml
+8
-0
background_textview_btn2.xml
app/src/main/res/drawable/background_textview_btn2.xml
+8
-0
drawable_checkbox_btn.xml
app/src/main/res/drawable/drawable_checkbox_btn.xml
+8
-0
icon_hardware_inspection.xml
app/src/main/res/drawable/icon_hardware_inspection.xml
+5
-0
icon_software_inspection.xml
app/src/main/res/drawable/icon_software_inspection.xml
+5
-0
icon_static_inspection.xml
app/src/main/res/drawable/icon_static_inspection.xml
+5
-0
icon_vehicle_inspection.xml
app/src/main/res/drawable/icon_vehicle_inspection.xml
+5
-0
fragment_health_manger.xml
app/src/main/res/layout/fragment_health_manger.xml
+0
-0
fragment_user_settings.xml
app/src/main/res/layout/fragment_user_settings.xml
+35
-1
health_inspection_item.xml
app/src/main/res/layout/health_inspection_item.xml
+47
-0
icon_data_statistics_tiny.png
app/src/main/res/mipmap-xhdpi/icon_data_statistics_tiny.png
+0
-0
icon_hardware_inspection_checked.png
...ain/res/mipmap-xhdpi/icon_hardware_inspection_checked.png
+0
-0
icon_hardware_inspection_unchecked.png
...n/res/mipmap-xhdpi/icon_hardware_inspection_unchecked.png
+0
-0
icon_health_manger_tiny.png
app/src/main/res/mipmap-xhdpi/icon_health_manger_tiny.png
+0
-0
icon_message_remind.png
app/src/main/res/mipmap-xhdpi/icon_message_remind.png
+0
-0
icon_software_inspection_checked.png
...ain/res/mipmap-xhdpi/icon_software_inspection_checked.png
+0
-0
icon_software_inspection_unchecked.png
...n/res/mipmap-xhdpi/icon_software_inspection_unchecked.png
+0
-0
icon_static_inspection_checked.png
.../main/res/mipmap-xhdpi/icon_static_inspection_checked.png
+0
-0
icon_static_inspection_unchecked.png
...ain/res/mipmap-xhdpi/icon_static_inspection_unchecked.png
+0
-0
icon_vehicle_inspection_checked.png
...main/res/mipmap-xhdpi/icon_vehicle_inspection_checked.png
+0
-0
icon_vehicle_inspection_unchecked.png
...in/res/mipmap-xhdpi/icon_vehicle_inspection_unchecked.png
+0
-0
colors.xml
app/src/main/res/values/colors.xml
+3
-0
dimens.xml
app/src/main/res/values/dimens.xml
+4
-0
strings.xml
app/src/main/res/values/strings.xml
+11
-0
No files found.
app/build.gradle
View file @
17e45c80
...
...
@@ -54,8 +54,9 @@ android {
dependencies
{
implementation
'androidx.core:core-ktx:1.10.
0
'
implementation
'androidx.core:core-ktx:1.10.
1
'
implementation
'androidx.appcompat:appcompat:1.6.1'
implementation
'androidx.activity:activity-ktx:1.6.1'
implementation
'com.google.android.material:material:1.9.0'
implementation
'androidx.constraintlayout:constraintlayout:2.1.4'
implementation
'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
...
...
@@ -84,10 +85,10 @@ dependencies {
// implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
implementation
'com.google.android.exoplayer:exoplayer:2.17.1'
implementation
'com.afollestad.material-dialogs:core:3.2.1'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.
0-RC
'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.
0-RC
'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.
1
'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.
1
'
implementation
'com.squareup.retrofit2:converter-moshi:2.9.0'
implementation
"com.google.dagger:hilt-android:2.4
4
"
implementation
"com.google.dagger:hilt-android:2.4
6.1
"
kapt
"com.google.dagger:hilt-compiler:2.44"
kapt
"androidx.room:room-compiler:2.5.0"
...
...
app/src/main/java/com/waytous/anticollision/ui/health/HealthMangerFragment.kt
0 → 100644
View file @
17e45c80
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/res/drawable/background_btn_commit.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"false"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_803785f8"
/>
<corners
android:radius=
"@dimen/dp_70"
/>
<size
android:width=
"@dimen/dp_180"
android:height=
"@dimen/dp_84"
/>
</shape>
</item>
<item
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_ff3785f8"
/>
<corners
android:radius=
"@dimen/dp_70"
/>
<size
android:width=
"@dimen/dp_180"
android:height=
"@dimen/dp_84"
/>
</shape>
</item>
</selector>
app/src/main/res/drawable/background_collect_tab_text.xml
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<size
android:width=
"@dimen/dp_300"
android:height=
"@dimen/dp_50"
/>
<solid
android:color=
"
#ffffffff
"
/>
<solid
android:color=
"
@color/white
"
/>
<corners
android:radius=
"@dimen/dp_10"
/>
</shape>
app/src/main/res/drawable/background_health_fault_report_item.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_ccfc5454"
/>
<corners
android:radius=
"@dimen/dp_10"
/>
</shape>
</item>
<item
android:left=
"@dimen/dp_12"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@color/white"
/>
<corners
android:topRightRadius=
"@dimen/dp_10"
android:bottomRightRadius=
"@dimen/dp_10"
/>
</shape>
</item>
</layer-list>
app/src/main/res/drawable/background_textview_btn1.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<size
android:width=
"@dimen/dp_172"
android:height=
"@dimen/dp_56"
/>
<solid
android:color=
"@color/color_1a3684f9"
/>
<corners
android:radius=
"@dimen/dp_10"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/background_textview_btn2.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<size
android:width=
"@dimen/dp_172"
android:height=
"@dimen/dp_56"
/>
<solid
android:color=
"@color/color_fffc5454"
/>
<corners
android:radius=
"@dimen/dp_10"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/drawable_checkbox_btn.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<size
android:width=
"@dimen/dp_12"
android:height=
"@dimen/dp_12"
/>
<stroke
android:width=
"@dimen/dp_1"
/>
<corners
android:radius=
"@dimen/dp_4"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/icon_hardware_inspection.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/icon_hardware_inspection_checked"
android:state_checked=
"true"
/>
<item
android:drawable=
"@mipmap/icon_hardware_inspection_unchecked"
android:state_checked=
"false"
/>
</selector>
app/src/main/res/drawable/icon_software_inspection.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/icon_software_inspection_checked"
android:state_checked=
"true"
/>
<item
android:drawable=
"@mipmap/icon_software_inspection_unchecked"
android:state_checked=
"false"
/>
</selector>
app/src/main/res/drawable/icon_static_inspection.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/icon_static_inspection_checked"
android:state_checked=
"true"
/>
<item
android:drawable=
"@mipmap/icon_static_inspection_unchecked"
android:state_checked=
"false"
/>
</selector>
app/src/main/res/drawable/icon_vehicle_inspection.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/icon_vehicle_inspection_checked"
android:state_checked=
"true"
/>
<item
android:drawable=
"@mipmap/icon_vehicle_inspection_unchecked"
android:state_checked=
"false"
/>
</selector>
app/src/main/res/layout/fragment_health_manger.xml
0 → 100644
View file @
17e45c80
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/fragment_user_settings.xml
View file @
17e45c80
...
...
@@ -12,7 +12,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:drawable
Lef
t=
"@mipmap/icon_settings_tiny"
android:drawable
Star
t=
"@mipmap/icon_settings_tiny"
android:drawablePadding=
"@dimen/dp_3"
android:text=
"@string/user_settings_title"
android:textColor=
"@color/color_ff333333"
...
...
@@ -80,4 +80,37 @@
app:layout_constraintTop_toTopOf=
"@id/useSettingsRadioGroup"
app:layout_constraintBottom_toBottomOf=
"@id/useSettingsRadioGroup"
app:layout_constraintStart_toStartOf=
"@id/useSettingsRadioGroup"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/useSettingsToggleMore"
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/useSettingsRadioGroup"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/useSettingsToHome"
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/useSettingsToggleMore"
app:layout_constraintStart_toEndOf=
"@id/useSettingsToggleMore"
app:layout_constraintTop_toTopOf=
"@id/useSettingsToggleMore"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/health_inspection_item.xml
0 → 100644
View file @
17e45c80
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"@dimen/dp_1122"
android:layout_height=
"wrap_content"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:background=
"@drawable/background_health_fault_report_item"
>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/inspectionItem"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_32"
android:layout_marginTop=
"@dimen/dp_26"
android:text=
"1.检查发动机皮带使用情况是否完好"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_22"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/inspectionReport"
android:layout_width=
"@dimen/dp_172"
android:layout_height=
"@dimen/dp_56"
android:gravity=
"center"
android:layout_marginEnd=
"@dimen/dp_48"
android:background=
"@drawable/background_textview_btn2"
android:text=
"@string/health_fault_report"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_22"
app:layout_constraintTop_toTopOf=
"@id/inspectionItem"
app:layout_constraintBottom_toBottomOf=
"@id/inspectionItem"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatEditText
android:id=
"@+id/inspectionReportContent"
android:layout_width=
"@dimen/dp_1040"
android:layout_height=
"@dimen/dp_66"
android:layout_marginTop=
"@dimen/dp_26"
android:layout_marginBottom=
"@dimen/dp_26"
android:paddingLeft=
"@dimen/dp_26"
android:paddingRight=
"@dimen/dp_26"
android:gravity=
"center_vertical"
android:hint=
"@string/health_fault_description"
android:background=
"@drawable/background_fault_cause_edittext"
app:layout_constraintTop_toBottomOf=
"@id/inspectionReport"
app:layout_constraintStart_toStartOf=
"@id/inspectionItem"
app:layout_constraintEnd_toEndOf=
"@id/inspectionReport"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/icon_data_statistics_tiny.png
0 → 100644
View file @
17e45c80
3.8 KB
app/src/main/res/mipmap-xhdpi/icon_hardware_inspection_checked.png
0 → 100644
View file @
17e45c80
1.05 KB
app/src/main/res/mipmap-xhdpi/icon_hardware_inspection_unchecked.png
0 → 100644
View file @
17e45c80
1.37 KB
app/src/main/res/mipmap-xhdpi/icon_health_manger_tiny.png
0 → 100644
View file @
17e45c80
4.25 KB
app/src/main/res/mipmap-xhdpi/icon_message_remind.png
0 → 100644
View file @
17e45c80
856 Bytes
app/src/main/res/mipmap-xhdpi/icon_software_inspection_checked.png
0 → 100644
View file @
17e45c80
1.24 KB
app/src/main/res/mipmap-xhdpi/icon_software_inspection_unchecked.png
0 → 100644
View file @
17e45c80
1.81 KB
app/src/main/res/mipmap-xhdpi/icon_static_inspection_checked.png
0 → 100644
View file @
17e45c80
2.97 KB
app/src/main/res/mipmap-xhdpi/icon_static_inspection_unchecked.png
0 → 100644
View file @
17e45c80
4.55 KB
app/src/main/res/mipmap-xhdpi/icon_vehicle_inspection_checked.png
0 → 100644
View file @
17e45c80
1.66 KB
app/src/main/res/mipmap-xhdpi/icon_vehicle_inspection_unchecked.png
0 → 100644
View file @
17e45c80
2.17 KB
app/src/main/res/values/colors.xml
View file @
17e45c80
...
...
@@ -50,5 +50,7 @@
<color
name=
"color_ffffdbc7"
>
#ffffdbc7
</color>
<color
name=
"color_ffe5e5e5"
>
#ffe5e5e5
</color>
<color
name=
"color_ff3785f8"
>
#ff3785f8
</color>
<color
name=
"color_803785f8"
>
#803785f8
</color>
<color
name=
"color_1a3684f9"
>
#1a3684f9
</color>
</resources>
\ No newline at end of file
app/src/main/res/values/dimens.xml
View file @
17e45c80
...
...
@@ -402,7 +402,11 @@
<dimen
name=
"dp_720"
>
720dp
</dimen>
<dimen
name=
"dp_896"
>
896dp
</dimen>
<dimen
name=
"dp_984"
>
984dp
</dimen>
<dimen
name=
"dp_1040"
>
1040dp
</dimen>
<dimen
name=
"dp_1072"
>
1072dp
</dimen>
<dimen
name=
"dp_1110"
>
1110dp
</dimen>
<dimen
name=
"dp_1122"
>
1122dp
</dimen>
<dimen
name=
"dp_1134"
>
1134dp
</dimen>
<!-- font size,you can add if there is no one -->
<dimen
name=
"sp_6"
>
6sp
</dimen>
...
...
app/src/main/res/values/strings.xml
View file @
17e45c80
...
...
@@ -92,6 +92,17 @@
<string
name=
"cancel"
>
取消
</string>
<string
name=
"annotation_vehicle_no"
>
编号:%1s
</string>
<string
name=
"annotation_vehicle_speed"
>
时速:%1d km/h
</string>
<string
name=
"health_manger_title"
>
健康管理
</string>
<string
name=
"health_manger_last_detection_time"
>
系统检测到上次提交时间
</string>
<string
name=
"health_manger_vehicle_inspection"
>
车况检查
</string>
<string
name=
"health_manger_hardware_inspection"
>
硬件检查
</string>
<string
name=
"health_manger_software_inspection"
>
软件检查
</string>
<string
name=
"health_manger_static_inspection"
>
静态检查
</string>
<string
name=
"health_manger_inspection_items"
>
检查项目(%1s)
</string>
<string
name=
"health_manger_all_passed"
>
全部通过
</string>
<string
name=
"health_fault_report"
>
异常上报
</string>
<string
name=
"health_fault_description"
>
请输入文字说明...
</string>
<string
name=
"commit"
>
提交
</string>
<string
name=
"user_settings_title"
>
用户设置
</string>
<string
name=
"vehicle_info"
>
车辆信息
</string>
<string
name=
"vehicle_type"
>
车辆类型
</string>
...
...
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