完成红绿灯,限速UI
This commit is contained in:
7
.idea/misc.xml
generated
7
.idea/misc.xml
generated
@@ -12,11 +12,18 @@
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="modules/mogo-module-adas/src/main/res/layout/dialog_adas_dispatch_remind.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="0.2953125" />
|
||||
<entry key="modules/mogo-module-left-panel/src/main/res/layout/module_left_panel_simple_speed.xml" value="0.202734375" />
|
||||
<entry key="modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml" value="0.25" />
|
||||
<entry key="modules/mogo-module-map/src/main/res/layout/module_map_fragment_map.xml" value="0.202734375" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/layout/item_v2x_fault_help_vr.xml" value="0.28854166666666664" />
|
||||
<entry key="modules/mogo-module-warning/src/main/res/drawable/bg_waring_limiting_velocity.xml" value="0.28515625" />
|
||||
<entry key="modules/mogo-module-warning/src/main/res/drawable/bg_waring_traffic_light_vr.xml" value="0.29791666666666666" />
|
||||
<entry key="modules/mogo-module-warning/src/main/res/drawable/icon_waring_traffic_light_green_vr.xml" value="0.28515625" />
|
||||
<entry key="modules/mogo-module-warning/src/main/res/drawable/icon_waring_traffic_light_yellow_vr.xml" value="0.28515625" />
|
||||
<entry key="modules/mogo-module-warning/src/main/res/layout/fragment_warning.xml" value="0.24947916666666667" />
|
||||
<entry key="modules/mogo-module-warning/src/main/res/layout/notification_v2x_msg_vr.xml" value="0.33094574464390436" />
|
||||
<entry key="modules/mogo-module-warning/src/main/res/layout/view_traffic_light_vr.xml" value="1.0" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@@ -2,8 +2,6 @@ package com.mogo.module.warning.ui
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.module.warning.R
|
||||
import com.mogo.module.warning.ui.WaringView
|
||||
import com.mogo.module.warning.ui.WaringPresenter
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#3F4C7D" />
|
||||
|
||||
<size
|
||||
android:width="130px"
|
||||
android:height="130px" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape
|
||||
android:innerRadius="60px"
|
||||
android:shape="ring"
|
||||
android:thickness="5px"
|
||||
android:useLevel="false">
|
||||
<solid android:color="#F03232" />
|
||||
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#0D132F" />
|
||||
<size
|
||||
android:width="@dimen/dp_52"
|
||||
android:height="@dimen/dp_52" />
|
||||
<corners android:radius="70px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<gradient
|
||||
android:endColor="#1C2656"
|
||||
android:startColor="#1C2656" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_checked="true">
|
||||
<shape android:shape="oval">
|
||||
<gradient android:endColor="#00FF6C" android:startColor="#00CF57" />
|
||||
<size android:width="@dimen/dp_52" android:height="@dimen/dp_52" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:drawable="@drawable/icon_waring_traffic_light_default_vr" android:state_checked="false"/>
|
||||
|
||||
</selector>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_checked="true">
|
||||
<shape android:shape="oval">
|
||||
<gradient android:endColor="#FF0030" android:startColor="#CF2E00" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:drawable="@drawable/icon_waring_traffic_light_default_vr" android:state_checked="false" />
|
||||
|
||||
</selector>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_checked="true">
|
||||
|
||||
<shape android:shape="oval">
|
||||
<gradient android:endColor="#FFDB00" android:startColor="#F2A902" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:drawable="@drawable/icon_waring_traffic_light_default_vr" android:state_checked="false" />
|
||||
|
||||
</selector>
|
||||
@@ -1,7 +1,32 @@
|
||||
<?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="match_parent">
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/view_traffic_light_vr"
|
||||
layout="@layout/view_traffic_light_vr"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40px"
|
||||
android:layout_marginRight="40px"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_limiting_velocity"
|
||||
android:layout_width="130px"
|
||||
android:layout_height="130px"
|
||||
android:layout_marginTop="30px"
|
||||
android:background="@drawable/bg_waring_limiting_velocity"
|
||||
android:gravity="center"
|
||||
android:text="60"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="74px"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_traffic_light_vr"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_traffic_light_vr" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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/cl_traffic_light"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_waring_traffic_light_vr"
|
||||
android:paddingStart="38px"
|
||||
android:paddingTop="30px"
|
||||
android:paddingEnd="38px"
|
||||
android:paddingBottom="30px">
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/tv_red"
|
||||
android:layout_width="70px"
|
||||
android:layout_height="70px"
|
||||
android:background="@drawable/icon_waring_traffic_light_red_vr"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="99"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="38px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_yellow"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/tv_yellow"
|
||||
android:layout_width="70px"
|
||||
android:layout_height="70px"
|
||||
android:layout_marginStart="18px"
|
||||
android:layout_marginEnd="18px"
|
||||
android:background="@drawable/icon_waring_traffic_light_yellow_vr"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="38px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_green"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_red"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:checked="true"
|
||||
tools:text="99" />
|
||||
|
||||
<CheckedTextView
|
||||
android:id="@+id/tv_green"
|
||||
android:layout_width="70px"
|
||||
android:layout_height="70px"
|
||||
android:background="@drawable/icon_waring_traffic_light_green_vr"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="38px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:checked="true"
|
||||
tools:text="99" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user