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
ac412a6a
Commit
ac412a6a
authored
Jun 16, 2023
by
马乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.数据统计UI开发
parent
17e45c80
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
374 additions
and
8 deletions
+374
-8
DataStatisticsFragment.kt
...ous/anticollision/ui/statistics/DataStatisticsFragment.kt
+23
-0
background_collect_btn_map_ratio.xml
...rc/main/res/drawable/background_collect_btn_map_ratio.xml
+5
-8
icon_log.xml
app/src/main/res/drawable/icon_log.xml
+5
-0
icon_production.xml
app/src/main/res/drawable/icon_production.xml
+5
-0
icon_task.xml
app/src/main/res/drawable/icon_task.xml
+5
-0
data_statistics_header.xml
app/src/main/res/layout/data_statistics_header.xml
+89
-0
data_statistics_item.xml
app/src/main/res/layout/data_statistics_item.xml
+80
-0
fragment_data_statistics.xml
app/src/main/res/layout/fragment_data_statistics.xml
+141
-0
icon_log_checked.png
app/src/main/res/mipmap-xhdpi/icon_log_checked.png
+0
-0
icon_log_unchecked.png
app/src/main/res/mipmap-xhdpi/icon_log_unchecked.png
+0
-0
icon_production_checked.png
app/src/main/res/mipmap-xhdpi/icon_production_checked.png
+0
-0
icon_production_unchecked.png
app/src/main/res/mipmap-xhdpi/icon_production_unchecked.png
+0
-0
icon_task_checked.png
app/src/main/res/mipmap-xhdpi/icon_task_checked.png
+0
-0
icon_task_unchecked.png
app/src/main/res/mipmap-xhdpi/icon_task_unchecked.png
+0
-0
strings.xml
app/src/main/res/values/strings.xml
+21
-0
No files found.
app/src/main/java/com/waytous/anticollision/ui/statistics/DataStatisticsFragment.kt
0 → 100644
View file @
ac412a6a
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/res/drawable/background_collect_btn_map_ratio.xml
View file @
ac412a6a
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
<item
android:width=
"170dp"
android:height=
"56dp"
>
android:shape=
"rectangle"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@color/white"
/>
<solid
android:color=
"#ffffffff"
/>
<corners
android:radius=
"@dimen/dp_10"
/>
<corners
android:topLeftRadius=
"10dp"
android:topRightRadius=
"10dp"
android:bottomLeftRadius=
"10dp"
android:bottomRightRadius=
"10dp"
/>
</shape>
</shape>
</item>
</layer-list>
app/src/main/res/drawable/icon_log.xml
0 → 100644
View file @
ac412a6a
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/icon_log_checked"
android:state_checked=
"true"
/>
<item
android:drawable=
"@mipmap/icon_log_unchecked"
android:state_checked=
"false"
/>
</selector>
app/src/main/res/drawable/icon_production.xml
0 → 100644
View file @
ac412a6a
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/icon_production_checked"
android:state_checked=
"true"
/>
<item
android:drawable=
"@mipmap/icon_production_unchecked"
android:state_checked=
"false"
/>
</selector>
app/src/main/res/drawable/icon_task.xml
0 → 100644
View file @
ac412a6a
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/icon_task_checked"
android:state_checked=
"true"
/>
<item
android:drawable=
"@mipmap/icon_task_unchecked"
android:state_checked=
"false"
/>
</selector>
app/src/main/res/layout/data_statistics_header.xml
0 → 100644
View file @
ac412a6a
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"@dimen/dp_1122"
android:layout_height=
"@dimen/dp_60"
android:gravity=
"center_vertical"
android:background=
"@drawable/background_collect_btn_map_ratio"
>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataHeaderStartTime"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_start_time"
tools:visibility=
"visible"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataHeaderEndTime"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_end_time"
tools:visibility=
"visible"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataHeaderService"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_service"
tools:visibility=
"visible"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataHeaderDriverName"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_driver"
tools:visibility=
"visible"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataHeaderLoadArea"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_load_area"
tools:visibility=
"visible"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataHeaderDumpArea"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_dump_area"
tools:visibility=
"visible"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataHeaderMaterialType"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_material_type"
tools:visibility=
"visible"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataHeaderProductionCategory"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_production_type"
tools:visibility=
"visible"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
app/src/main/res/layout/data_statistics_item.xml
0 → 100644
View file @
ac412a6a
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"@dimen/dp_1122"
android:layout_height=
"@dimen/dp_80"
android:gravity=
"center_vertical"
android:background=
"@drawable/background_collect_btn_map_ratio"
>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataItemStartTime"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_start_time_test"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataItemEndTime"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_end_time_test"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataItemService"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_service_test"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataItemDriverName"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_driver_test"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataItemLoadArea"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_load_area_test"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataItemDumpArea"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_dump_area"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataItemMaterialType"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_material_type_test"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataItemProductionCategory"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:layout_weight=
"1"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_20"
android:text=
"@string/data_statistics_production_type_test"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
app/src/main/res/layout/fragment_data_statistics.xml
0 → 100644
View file @
ac412a6a
<?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:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_ffe5e5e5"
tools:context=
".ui.statistics.DataStatisticsFragment"
>
<androidx.appcompat.widget.AppCompatTextView
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_marginEnd=
"@dimen/dp_20"
android:gravity=
"center"
android:text=
"@string/data_statistics_detail_today"
android:textColor=
"@color/color_ff333333"
android:textSize=
"@dimen/sp_30"
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"
/>
<RadioGroup
android:id=
"@+id/dataStatisticsRadioGroup"
android:layout_width=
"@dimen/dp_132"
android:layout_height=
"@dimen/dp_578"
android:layout_marginTop=
"@dimen/dp_13"
android:background=
"@drawable/background_user_settings_radio_group"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/dataStatisticsTitle"
>
<RadioButton
android:id=
"@+id/dataStatisticsProduction"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_marginTop=
"@dimen/dp_27"
android:background=
"@drawable/background_user_settings_radio_button"
android:button=
"@null"
android:checked=
"true"
android:drawableTop=
"@drawable/icon_production"
android:gravity=
"center_horizontal"
android:paddingTop=
"@dimen/dp_8"
android:text=
"@string/data_statistics_production"
android:textColor=
"@drawable/color_text_btn_4"
android:textSize=
"@dimen/sp_20"
/>
<RadioButton
android:id=
"@+id/dataStatisticsTask"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_marginTop=
"@dimen/dp_16"
android:background=
"@drawable/background_user_settings_radio_button"
android:button=
"@null"
android:drawableTop=
"@drawable/icon_task"
android:gravity=
"center_horizontal"
android:paddingTop=
"@dimen/dp_8"
android:text=
"@string/data_statistics_task"
android:textColor=
"@drawable/color_text_btn_4"
android:textSize=
"@dimen/sp_20"
/>
<RadioButton
android:id=
"@+id/dataStatisticsLog"
android:layout_width=
"@dimen/dp_98"
android:layout_height=
"@dimen/dp_98"
android:layout_marginTop=
"@dimen/dp_16"
android:background=
"@drawable/background_user_settings_radio_button"
android:button=
"@null"
android:drawableTop=
"@drawable/icon_log"
android:gravity=
"center_horizontal"
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.recyclerview.widget.RecyclerView
android:id=
"@+id/dataStatisticsList"
android:layout_width=
"@dimen/dp_0"
android:layout_height=
"@dimen/dp_0"
android:layout_marginStart=
"@dimen/dp_8"
android:layout_marginEnd=
"@dimen/dp_18"
app:layout_constraintTop_toTopOf=
"@id/dataStatisticsRadioGroup"
app:layout_constraintStart_toEndOf=
"@id/dataStatisticsRadioGroup"
app:layout_constraintBottom_toBottomOf=
"@id/dataStatisticsRadioGroup"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/dataStatisticsToggleMore"
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/dataStatisticsRadioGroup"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/dataStatisticsToHome"
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/dataStatisticsToggleMore"
app:layout_constraintStart_toEndOf=
"@id/dataStatisticsToggleMore"
app:layout_constraintTop_toTopOf=
"@id/dataStatisticsToggleMore"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/mipmap-xhdpi/icon_log_checked.png
0 → 100644
View file @
ac412a6a
919 Bytes
app/src/main/res/mipmap-xhdpi/icon_log_unchecked.png
0 → 100644
View file @
ac412a6a
1.14 KB
app/src/main/res/mipmap-xhdpi/icon_production_checked.png
0 → 100644
View file @
ac412a6a
1.42 KB
app/src/main/res/mipmap-xhdpi/icon_production_unchecked.png
0 → 100644
View file @
ac412a6a
1.97 KB
app/src/main/res/mipmap-xhdpi/icon_task_checked.png
0 → 100644
View file @
ac412a6a
579 Bytes
app/src/main/res/mipmap-xhdpi/icon_task_unchecked.png
0 → 100644
View file @
ac412a6a
622 Bytes
app/src/main/res/values/strings.xml
View file @
ac412a6a
...
@@ -102,6 +102,27 @@
...
@@ -102,6 +102,27 @@
<string
name=
"health_manger_all_passed"
>
全部通过
</string>
<string
name=
"health_manger_all_passed"
>
全部通过
</string>
<string
name=
"health_fault_report"
>
异常上报
</string>
<string
name=
"health_fault_report"
>
异常上报
</string>
<string
name=
"health_fault_description"
>
请输入文字说明...
</string>
<string
name=
"health_fault_description"
>
请输入文字说明...
</string>
<string
name=
"data_statistics_title"
>
数据统计
</string>
<string
name=
"data_statistics_production"
>
产量
</string>
<string
name=
"data_statistics_task"
>
任务
</string>
<string
name=
"data_statistics_log"
>
日志
</string>
<string
name=
"data_statistics_start_time"
>
开始时间
</string>
<string
name=
"data_statistics_start_time_test"
>
2021/11/10\n08:00-12:00
</string>
<string
name=
"data_statistics_end_time"
>
结束时间
</string>
<string
name=
"data_statistics_end_time_test"
>
2021/11/10\n08:00-12:00
</string>
<string
name=
"data_statistics_service"
>
班次
</string>
<string
name=
"data_statistics_service_test"
>
第一班
</string>
<string
name=
"data_statistics_driver"
>
司机
</string>
<string
name=
"data_statistics_driver_test"
>
张三
</string>
<string
name=
"data_statistics_load_area"
>
装载区
</string>
<string
name=
"data_statistics_load_area_test"
>
装载区01
</string>
<string
name=
"data_statistics_dump_area"
>
卸载区
</string>
<string
name=
"data_statistics_dump_area_test"
>
卸载区01
</string>
<string
name=
"data_statistics_material_type"
>
物料类型
</string>
<string
name=
"data_statistics_material_type_test"
>
煤
</string>
<string
name=
"data_statistics_production_type"
>
产量类别
</string>
<string
name=
"data_statistics_production_type_test"
>
自动
</string>
<string
name=
"data_statistics_detail_today"
>
今日产量明细
</string>
<string
name=
"commit"
>
提交
</string>
<string
name=
"commit"
>
提交
</string>
<string
name=
"user_settings_title"
>
用户设置
</string>
<string
name=
"user_settings_title"
>
用户设置
</string>
<string
name=
"vehicle_info"
>
车辆信息
</string>
<string
name=
"vehicle_info"
>
车辆信息
</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