Commit 2f15eff0 authored by 马乐's avatar 马乐

1.开发无视频主页

parent 5eeab42d
package com.waytous.anticollision.ui.home
import android.os.Bundle
import android.text.SpannableString
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
......@@ -21,7 +23,11 @@ import com.mapbox.maps.plugin.annotation.generated.CircleAnnotationOptions
import com.mapbox.maps.plugin.annotation.generated.createCircleAnnotationManager
import com.mapbox.maps.plugin.delegates.listeners.OnMapLoadErrorListener
import com.mapbox.maps.plugin.logo.LogoPlugin
import com.waytous.anticollision.R
import com.waytous.anticollision.databinding.FragmentHomeBinding
import com.waytous.anticollision.ui.view.MoreFeaturesPopup
import com.waytous.anticollision.ui.view.WorkStatusEditPopup
import com.waytous.anticollision.utils.setTextSize
class HomeFragment : Fragment() {
......@@ -31,6 +37,10 @@ class HomeFragment : Fragment() {
private lateinit var mapBox:MapboxMap
private lateinit var moreFeaturesPopup: MoreFeaturesPopup
private lateinit var workStatusEditPopup: WorkStatusEditPopup
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
......@@ -40,8 +50,19 @@ class HomeFragment : Fragment() {
ViewModelProvider(this)[HomeViewModel::class.java]
_binding = FragmentHomeBinding.inflate(inflater, container, false)
val root: View = binding.root
val mapView: MapView = binding.mapView
context?:return binding.root
workStatusEditPopup = WorkStatusEditPopup(context).also {
it.setOutSideDismiss(true)
it.popupGravity = Gravity.TOP or Gravity.CENTER
it.setBackgroundColor(R.color.color_99000000)
}
moreFeaturesPopup = MoreFeaturesPopup(context).also {
it.setOutSideDismiss(true)
it.popupGravity = Gravity.TOP or Gravity.CENTER
it.maskOffsetY = 20
it.setBackgroundColor(R.color.color_99000000)
}
val mapView: MapView = binding.defaultMapLayout.mapView
val logoPlugin = mapView.getPlugin<LogoPlugin>(Plugin.MAPBOX_LOGO_PLUGIN_ID)
logoPlugin?.enabled = false
mapBox = mapView.getMapboxMap().also {
......@@ -65,8 +86,27 @@ class HomeFragment : Fragment() {
mapView.addRendererSetupErrorListener {
error -> LogUtils.e("RendererSetupErrorListener:${error}")
}
setTodayCarriedNum(18)
setTodayIllegallyNum(1)
binding.workStatusEdit.setOnClickListener {
workStatusEditPopup.showPopupWindow(binding.defaultCurrentWorkStatusLayout)
}
binding.defaultToggleMore.setOnClickListener {
moreFeaturesPopup.showPopupWindow(binding.defaultToggleMore)
}
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,"今日运载(车)")
}
return root
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() {
......
package com.waytous.anticollision.ui.view
import android.content.Context
import com.waytous.anticollision.R
import razerdp.basepopup.BasePopupWindow
class MoreFeaturesPopup(context: Context?) : BasePopupWindow(context) {
init {
contentView = createPopupById(R.layout.popup_more_features)
}
}
\ No newline at end of file
......@@ -46,9 +46,9 @@ enum class Error(val reason:String = "success") {
JT808DecodeError("jt808 codec decode error")
}
fun TextView.setTextSize(spannableString: SpannableString,content:String){
fun TextView.setTextSize(spannableString: SpannableString,content:String,delimiter:String = "km"){
val absoluteSizeSpan = AbsoluteSizeSpan(40,true)
spannableString.setSpan(absoluteSizeSpan,0,content.indexOf("km"),Spannable.SPAN_INCLUSIVE_EXCLUSIVE)
spannableString.setSpan(absoluteSizeSpan,0,content.indexOf(delimiter),Spannable.SPAN_INCLUSIVE_EXCLUSIVE)
text = spannableString
}
......
......@@ -4,7 +4,7 @@
<layer-list>
<item>
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
<solid android:color="@color/color_993c3c3c" />
<corners android:radius="16dp" />
</shape>
</item>
......@@ -15,7 +15,7 @@
<layer-list>
<item>
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
<solid android:color="@color/color_ff3684f9" />
<corners android:radius="16dp" />
</shape>
</item>
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<layer-list>
<item android:width="216dp" android:height="84dp">
<shape android:shape="rectangle">
<solid android:color="@color/color_993c3c3c" />
<corners android:radius="16dp" />
</shape>
</item>
</layer-list>
</item>
<item android:state_pressed="true">
<layer-list>
<item android:width="216dp" android:height="84dp">
<shape android:shape="rectangle">
<solid android:color="@color/color_ff3684f9" />
<corners android:radius="16dp" />
</shape>
</item>
</layer-list>
</item>
</selector>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="426dp"
android:height="342dp"
android:viewportWidth="426"
android:viewportHeight="342">
<path
android:pathData="M0,14A14,14 0,0 1,14 0H412a14,14 0,0 1,14 14V318a14,14 0,0 1,-14 14H14A14,14 0,0 1,0 318Z"
android:fillColor="#1c1c1c"/>
<path
android:pathData="M40.93,342 L33,332H48.86Z"
android:fillColor="#1c1c1c"/>
</vector>
......@@ -15,7 +15,7 @@
<layer-list>
<item>
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
<solid android:color="@color/color_ff3684f9" />
<corners android:radius="16dp" />
</shape>
</item>
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff3684f9" />
<corners android:topLeftRadius="350dp" android:topRightRadius="350dp" android:bottomLeftRadius="350dp" android:bottomRightRadius="350dp" />
</shape>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="84dp"
android:height="32dp">
<shape android:shape="rectangle">
<solid android:color="#ff3684f9" />
<corners android:radius="700dp" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/matter_text_color" />
<corners android:radius="700dp" />
</shape>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="84dp" android:height="32dp">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/matter_text_color" />
<corners android:radius="700dp" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff1f971d" />
<corners android:radius="700dp" />
</shape>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="84dp"
android:height="32dp">
<shape android:shape="rectangle">
<solid android:color="#ff1f971d" />
<corners android:radius="700dp" />
</shape>
</item>
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="#ff3c3c3c" />
<corners android:radius="10dp" />
</shape>
\ No newline at end of file
<item
android:width="212dp"
android:height="88dp">
<shape android:shape="rectangle">
<stroke
android:width="1dp"
android:color="#ff3c3c3c" />
<corners android:radius="10dp" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#fffc5454" />
<corners android:radius="700dp" />
</shape>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="84dp"
android:height="32dp">
<shape android:shape="rectangle">
<solid android:color="#fffc5454" />
<corners android:radius="700dp" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 没有焦点时的背景图片 -->
<item android:state_window_focused="false" android:color="@color/white" />
<item android:state_focused="false" android:state_pressed="true" android:color="@color/white" />
<!-- 默认时的背景图片-->
<item android:color="@color/white" />
</selector>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<layer-list>
<item>
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
<solid android:color="@color/white" />
<corners android:radius="16dp" />
</shape>
</item>
......@@ -15,7 +15,7 @@
<layer-list>
<item>
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
<solid android:color="@color/color_ff3684f9" />
<corners android:radius="16dp" />
</shape>
</item>
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<layer-list>
<item android:width="216dp" android:height="84dp">
<shape android:shape="rectangle">
<solid android:color="@color/white" />
<corners android:radius="16dp" />
</shape>
</item>
<item android:drawable="@mipmap/icon_more_light" android:bottom="27dp" android:left="50dp" android:right="146dp" android:top="27dp" />
</layer-list>
</item>
<item android:state_pressed="true">
<layer-list>
<item android:width="216dp" android:height="84dp">
<shape android:shape="rectangle">
<solid android:color="@color/color_ff3684f9" />
<corners android:radius="16dp" />
</shape>
</item>
<item android:drawable="@mipmap/icon_more_pressed" android:bottom="27dp" android:left="50dp" android:right="146dp" android:top="27dp" />
</layer-list>
</item>
</selector>
\ No newline at end of file
<?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="@android:color/transparent"/>
</shape>
</item>
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#cc000000"/>
</shape>
</item>
</selector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="426dp"
android:height="342dp"
android:viewportWidth="426"
android:viewportHeight="342">
<path
android:pathData="M0,14A14,14 0,0 1,14 0H412a14,14 0,0 1,14 14V318a14,14 0,0 1,-14 14H14A14,14 0,0 1,0 318Z"
android:fillColor="#fff"/>
<path
android:pathData="M110.93,342 L103,332h15.86Z"
android:fillColor="#fff"/>
</vector>
......@@ -15,7 +15,7 @@
<layer-list>
<item>
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
<solid android:color="@color/color_ff3684f9" />
<corners android:radius="16dp" />
</shape>
</item>
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<layer-list>
<item android:width="216dp" android:height="84dp">
<shape android:shape="rectangle">
<solid android:color="@color/white" />
<corners android:radius="16dp" />
</shape>
</item>
<item android:drawable="@mipmap/icon_submit_light" android:bottom="27dp" android:left="28dp" android:right="168dp" android:top="27dp" />
</layer-list>
</item>
<item android:state_pressed="true">
<layer-list>
<item android:width="216dp" android:height="84dp">
<shape android:shape="rectangle">
<solid android:color="@color/color_ff3684f9" />
<corners android:radius="16dp" />
</shape>
</item>
<item android:drawable="@mipmap/icon_submit_pressed" android:bottom="27dp" android:left="28dp" android:right="168dp" android:top="27dp" />
</layer-list>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff3684f9" />
<corners android:topLeftRadius="350dp" android:topRightRadius="350dp" android:bottomLeftRadius="350dp" android:bottomRightRadius="350dp" />
</shape>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="84dp"
android:height="32dp">
<shape android:shape="rectangle">
<solid android:color="#ff3684f9" />
<corners android:radius="700dp" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="3dp" android:color="#ffffffff" />
<solid android:color="#ffffffff" />
<corners android:radius="16dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/matter_text_color" />
<corners android:radius="700dp" />
</shape>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="84dp" android:height="32dp">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/matter_text_color" />
<corners android:radius="700dp" />
</shape>
</item>
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff1f971d" />
<corners android:radius="700dp" />
</shape>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="84dp"
android:height="32dp">
<shape android:shape="rectangle">
<solid android:color="#ff1f971d" />
<corners android:radius="700dp" />
</shape>
</item>
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dp" android:color="#ffc1c1c1" />
<corners android:radius="10dp" />
</shape>
\ No newline at end of file
<item android:width="294dp" android:height="114dp">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="#ffc1c1c1" />
<corners android:radius="10dp" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<item android:width="212dp" android:height="88dp">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="#ffc1c1c1" />
<corners android:radius="10dp" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#fffc5454" />
<corners android:radius="700dp" />
</shape>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="84dp"
android:height="32dp">
<shape android:shape="rectangle">
<solid android:color="#fffc5454" />
<corners android:radius="700dp" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 没有焦点时的背景图片 -->
<item android:state_window_focused="false" android:color="@color/home_text_color" />
<item android:state_focused="false" android:state_pressed="true" android:color="@color/white" />
<!-- 默认时的背景图片-->
<item android:color="@color/home_text_color" />
</selector>
\ No newline at end of file
......@@ -5,159 +5,26 @@
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/background_main_light">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/myStatusBar"
android:background="@mipmap/background_main_light"
android:padding="4dp">
<include
android:layout_width="match_parent"
android:layout_height="36dp"
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_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/mine_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="8dp"
android:src="@mipmap/default_logo_light"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/statusBarDivider"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
android:src="@drawable/drawable_divide_line"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/mine_logo"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/myStatusName"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:maxEms="8"
android:maxLength="8"
android:text="矿卡车载管理系统"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/statusBarDivider"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/vehicleNumber"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxEms="6"
android:maxLength="6"
android:text="KK-001"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/driverName"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:maxEms="4"
android:maxLength="4"
android:text="上官云"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/vehicleNumber"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/matterType"
style="@style/StatusBarTextStyle"
android:layout_width="76dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:background="@drawable/drawable_bg_matter_status"
android:maxEms="2"
android:maxLength="2"
android:text="六上"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/driverName"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/readyType"
style="@style/StatusBarTextStyle"
android:layout_width="76dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/drawable_bg_ready_status"
android:maxEms="2"
android:maxLength="2"
android:text="就绪"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/matterType"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/carriedTruckNum"
style="@style/StatusBarTextStyle"
android:layout_width="76dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/drawable_bg_carried_truck_num"
android:maxEms="2"
android:maxLength="2"
android:text="16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/readyType"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/violationsNum"
style="@style/StatusBarTextStyle"
android:layout_width="76dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/drawable_bg_violations_num"
android:maxEms="2"
android:maxLength="2"
android:text="3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/carriedTruckNum"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextClock
android:id="@+id/systemTimeStamp"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:format12Hour="yyyy.MM.dd hh:mm:ss"
android:format24Hour="yyyy.MM.dd HH:mm:ss"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
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/myStatusBar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusBarMain"
app:navGraph="@navigation/mobile_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
This diff is collapsed.
......@@ -10,8 +10,8 @@
android:id="@+id/workingAvatar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="13dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:adjustViewBounds="true"
android:src="@mipmap/icon_avatar_normal"
app:layout_constraintStart_toStartOf="parent"
......@@ -19,20 +19,21 @@
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/speedText"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:background="@drawable/drawable_bg_speed_txt"
android:gravity="center"
android:text="@string/current_speed"
android:textColor="@color/home_text_color"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/workingAvatar"
app:layout_constraintStart_toEndOf="@id/workingAvatar"
app:layout_constraintTop_toTopOf="@id/workingAvatar"
tools:ignore="SmallSp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/receivedCommTime"
android:id="@+id/dispatchedCommTime"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginStart="18dp"
......@@ -53,8 +54,8 @@
android:text="装载区01"
android:textColor="@color/home_text_color"
android:textSize="30sp"
app:layout_constraintStart_toStartOf="@id/receivedCommTime"
app:layout_constraintTop_toBottomOf="@id/receivedCommTime" />
app:layout_constraintStart_toStartOf="@id/dispatchedCommTime"
app:layout_constraintTop_toBottomOf="@id/dispatchedCommTime" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/toFlag"
......@@ -84,13 +85,13 @@
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/reminderInfoText"
style="@style/ReminderInfoTextStyle"
android:layout_width="212dp"
android:layout_height="88dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:background="@drawable/drawable_bg_reminder_info"
android:text="当前无提示信息"
android:background="@drawable/drawable_bg_reminder_info1"
android:text="@string/reminder_info_text"
app:layout_constraintStart_toEndOf="@id/unloadingArea"
app:layout_constraintTop_toTopOf="@id/receivedCommTime"
app:layout_constraintTop_toTopOf="@id/dispatchedCommTime"
tools:ignore="SmallSp" />
<include
......@@ -98,12 +99,11 @@
layout="@layout/layout_map_box"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:layout_marginTop="18dp"
android:layout_marginBottom="14dp"
app:layout_constraintBottom_toTopOf="@id/toggleMore"
app:layout_constraintEnd_toEndOf="@id/reminderInfoText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="@id/workingAvatar"
app:layout_constraintTop_toBottomOf="@id/workingAvatar" />
<androidx.appcompat.widget.AppCompatImageView
......
<?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"
android:layout_width="match_parent"
android:layout_height="36dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/mine_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:src="@mipmap/default_logo_light"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/statusBarDivider"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
android:src="@drawable/drawable_divide_line"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/mine_logo"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/myStatusName"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:maxEms="8"
android:maxLength="8"
android:text="矿卡车载管理系统"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/statusBarDivider"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/driverInfo"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/vehicleNumber"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxEms="6"
android:maxLength="6"
android:text="@string/default_vehicle_number"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/driverName"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:maxEms="4"
android:maxLength="4"
android:text="@string/default_driver_name"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/vehicleNumber"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/matterType"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:background="@drawable/drawable_bg_matter_status"
android:maxEms="2"
android:maxLength="2"
android:text="@string/default_matter_type"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/driverName"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/readyType"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/drawable_bg_ready_status"
android:maxEms="2"
android:maxLength="2"
android:text="@string/default_ready_type"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/matterType"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/carriedTruckNum"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/drawable_bg_carried_truck_num"
android:maxEms="2"
android:maxLength="2"
android:text="16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/readyType"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/violationsNum"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/drawable_bg_violations_num"
android:maxEms="2"
android:maxLength="2"
android:text="3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/carriedTruckNum"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextClock
android:id="@+id/systemTimeStamp"
style="@style/StatusBarTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:format12Hour="yyyy.MM.dd hh:mm:ss"
android:format24Hour="yyyy.MM.dd HH:mm:ss"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/background_more_features_popup">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/more_template_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginTop="20dp"
android:text="@string/toggle_more_text"
android:textColor="@color/home_text_color"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/moreFeatureCollect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/background_more_features_item"
android:clickable="true"
android:drawableTop="@mipmap/icon_more_item_collect"
android:drawablePadding="2dp"
android:focusable="true"
android:gravity="center_horizontal"
android:text="@string/more_feature_collect"
android:textColor="@color/home_text_color"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="@id/more_template_title"
app:layout_constraintTop_toBottomOf="@id/more_template_title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/moreFeatureHealth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:background="@drawable/background_more_features_item"
android:clickable="true"
android:drawableTop="@mipmap/icon_more_item_health"
android:drawablePadding="2dp"
android:focusable="true"
android:gravity="center_horizontal"
android:text="@string/more_feature_health"
android:textColor="@color/home_text_color"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="@id/moreFeatureCollect"
app:layout_constraintStart_toEndOf="@id/moreFeatureCollect"
app:layout_constraintTop_toTopOf="@id/moreFeatureCollect" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/moreFeatureData"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:layout_marginEnd="40dp"
android:background="@drawable/background_more_features_item"
android:clickable="true"
android:drawableTop="@mipmap/icon_more_item_data"
android:drawablePadding="2dp"
android:focusable="true"
android:gravity="center_horizontal"
android:text="@string/more_feature_data"
android:textColor="@color/home_text_color"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="@id/moreFeatureHealth"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/moreFeatureHealth"
app:layout_constraintTop_toTopOf="@id/moreFeatureHealth" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/moreFeatureSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="24dp"
android:background="@drawable/background_more_features_item"
android:clickable="true"
android:drawableTop="@mipmap/icon_more_item_settings"
android:drawablePadding="2dp"
android:focusable="true"
android:gravity="center_horizontal"
android:text="@string/more_feature_settings"
android:textColor="@color/home_text_color"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@id/moreFeatureCollect"
app:layout_constraintTop_toBottomOf="@id/moreFeatureCollect" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/moreFeatureReboot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:background="@drawable/background_more_features_item"
android:clickable="true"
android:drawableTop="@mipmap/icon_more_item_reboot"
android:drawablePadding="2dp"
android:focusable="true"
android:gravity="center_horizontal"
android:text="@string/more_feature_reboot"
android:textColor="@color/home_text_color"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="@id/moreFeatureSettings"
app:layout_constraintStart_toEndOf="@id/moreFeatureSettings"
app:layout_constraintTop_toTopOf="@id/moreFeatureSettings" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/moreFeaturePowerOff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="45dp"
android:background="@drawable/background_more_features_item"
android:clickable="true"
android:drawableTop="@mipmap/icon_more_item_power_off"
android:drawablePadding="2dp"
android:focusable="true"
android:gravity="center_horizontal"
android:text="@string/more_feature_power_off"
android:textColor="@color/home_text_color"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="@id/moreFeatureReboot"
app:layout_constraintEnd_toEndOf="@id/moreFeatureData"
app:layout_constraintStart_toEndOf="@id/moreFeatureReboot"
app:layout_constraintTop_toTopOf="@id/moreFeatureReboot" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -3,7 +3,7 @@
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_video_Home">
app:startDestination="@id/navigation_home">
<fragment
android:id="@+id/navigation_home"
......
......@@ -38,7 +38,7 @@
<item name="android:layout_marginStart">8dp</item>
</style>
<style name="ReminderInfoTextStyle" parent="Theme.HTAnticollision">
<item name="background">@drawable/drawable_bg_reminder_info</item>
<item name="background">@drawable/drawable_bg_reminder_info1</item>
<item name="android:gravity">center</item>
<item name="android:textColor">@color/home_text_color</item>
<item name="android:ellipsize">end</item>
......
......@@ -13,4 +13,7 @@
<color name="home_text_color">#ff333333</color>
<color name="matter_text_color">#ffc1c1c1</color>
<color name="color_99000000">#99000000</color>
<color name="color_fc5454">#FC5454</color>
<color name="color_ff3684f9">#ff3684f9</color>
<color name="color_993c3c3c">#993c3c3c</color>
</resources>
\ No newline at end of file
......@@ -15,6 +15,10 @@
<string name="toggle_safety_range">toggle safety range</string>
<string name="zoom_divider_line">zoom divider line</string>
<string name="current_speed">%1d\nkm/h</string>
<string name="today_carried_text">%1d\n今日运载(车)</string>
<string name="today_illegally_text">%1d\n违章/警告(次)</string>
<string name="current_speed2">32</string>
<string name="current_speed_unit">km/h</string>
<string name="toggle_more">toggle more</string>
<string name="work_status_edit">修改</string>
<string name="work_status_mark">当前</string>
......@@ -26,4 +30,21 @@
<string name="work_status_unload">卸载</string>
<string name="work_status_unloading">待卸</string>
<string name="report_status">report status</string>
<string name="default_vehicle_number">KK-001</string>
<string name="default_driver_name">上官云</string>
<string name="default_matter_type">六上</string>
<string name="default_ready_type">就绪</string>
<string name="current_speed_text">当前速度</string>
<string name="dispatch_command_text">调度指令</string>
<string name="default_load_area">装载区01</string>
<string name="default_unload_area">卸载区01</string>
<string name="reminder_info_text">当前无提示信息</string>
<string name="toggle_more_text">全部</string>
<string name="toggle_status_report">状态上报</string>
<string name="more_feature_collect">采集</string>
<string name="more_feature_health">健康</string>
<string name="more_feature_data">数据</string>
<string name="more_feature_settings">设置</string>
<string name="more_feature_reboot">重启</string>
<string name="more_feature_power_off">退出</string>
</resources>
\ No newline at end of file
......@@ -37,7 +37,7 @@
<item name="android:textSize">20sp</item>
</style>
<style name="ReminderInfoTextStyle" parent="Theme.HTAnticollision">
<item name="background">@drawable/drawable_bg_reminder_info</item>
<item name="background">@drawable/drawable_bg_reminder_info1</item>
<item name="android:gravity">center</item>
<item name="android:textColor">@color/home_text_color</item>
<item name="android:ellipsize">end</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment