[add] 方向盘部分UI
This commit is contained in:
@@ -43,34 +43,34 @@ public class TapPositionView extends ConstraintLayout {
|
||||
if (tabP != null && tabR != null && tabN != null && tabD != null) {
|
||||
switch (gear) {
|
||||
case GEAR_NONE:
|
||||
tabP.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabR.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabN.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabD.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabP.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabR.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabN.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabD.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
break;
|
||||
case GEAR_P:
|
||||
tabP.setTextColor(Color.parseColor("#0043FF"));
|
||||
tabR.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabN.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabD.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabP.setTextColor(Color.parseColor("#FFFFFFFF"));
|
||||
tabR.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabN.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabD.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
break;
|
||||
case GEAR_R:
|
||||
tabR.setTextColor(Color.parseColor("#0043FF"));
|
||||
tabP.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabN.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabD.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabR.setTextColor(Color.parseColor("#FFFFFFFF"));
|
||||
tabP.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabN.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabD.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
break;
|
||||
case GEAR_N:
|
||||
tabN.setTextColor(Color.parseColor("#0043FF"));
|
||||
tabR.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabP.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabD.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabN.setTextColor(Color.parseColor("#FFFFFFFF"));
|
||||
tabR.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabP.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabD.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
break;
|
||||
case GEAR_D:
|
||||
tabD.setTextColor(Color.parseColor("#0043FF"));
|
||||
tabN.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabR.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabP.setTextColor(Color.parseColor("#6E8EC9"));
|
||||
tabD.setTextColor(Color.parseColor("#FFFFFFFF"));
|
||||
tabN.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabR.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
tabP.setTextColor(Color.parseColor("#FF6E8EC9"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="270"
|
||||
android:endColor="#00044CFF"
|
||||
android:startColor="#FF45D3FF"
|
||||
android:type="radial"
|
||||
android:centerX="0.5"
|
||||
android:centerY="0"
|
||||
android:gradientRadius="@dimen/dp_46"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -2,11 +2,11 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/background">
|
||||
<shape
|
||||
android:innerRadius="@dimen/dp_85"
|
||||
android:innerRadius="@dimen/dp_120"
|
||||
android:shape="ring"
|
||||
android:thickness="4px"
|
||||
android:thickness="7.2px"
|
||||
android:useLevel="false">
|
||||
<solid android:color="#BBCFF6" />
|
||||
<solid android:color="#1EBBCFF6" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_36"/>
|
||||
<gradient android:angle="315" android:endColor="#E6E9EFFC" android:startColor="#E6E9EFFC" />
|
||||
<corners android:radius="@dimen/dp_46"/>
|
||||
<gradient android:angle="315" android:endColor="#FF31486E" android:startColor="#FF31486E" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -5,14 +5,26 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_steering_wheel">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/autopilot_iv"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="@dimen/dp_240"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:src="@drawable/bg_auto"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/blue_circle"
|
||||
android:layout_width="@dimen/dp_180"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
android:layout_width="@dimen/dp_260"
|
||||
android:layout_height="@dimen/dp_260"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginLeft="@dimen/dp_60"
|
||||
android:layout_marginTop="@dimen/dp_38"
|
||||
android:layout_marginRight="@dimen/dp_60"
|
||||
android:layout_marginLeft="@dimen/dp_85"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_marginRight="@dimen/dp_85"
|
||||
android:indeterminateDrawable="@drawable/bg_steering_outer"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -26,8 +38,8 @@
|
||||
android:layout_marginRight="-10px"
|
||||
android:gravity="right"
|
||||
android:text="-18°"
|
||||
android:textColor="#415479"
|
||||
android:textSize="@dimen/dp_26"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="@dimen/dp_37"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintRight_toLeftOf="@+id/blue_circle"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -40,35 +52,25 @@
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:gravity="left"
|
||||
android:text="18°"
|
||||
android:textColor="#415479"
|
||||
android:textSize="@dimen/dp_26"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="@dimen/dp_37"
|
||||
app:layout_constraintLeft_toRightOf="@+id/autopilot_iv"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.CircularProgressView
|
||||
android:id="@+id/steering_circular"
|
||||
android:layout_width="@dimen/dp_180"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
android:layout_width="@dimen/dp_260"
|
||||
android:layout_height="@dimen/dp_260"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:outlineAmbientShadowColor="#1EBBCFF6"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:progWidth="8px"
|
||||
app:progress="0" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/autopilot_iv"
|
||||
android:layout_width="@dimen/dp_186"
|
||||
android:layout_height="@dimen/dp_186"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_34"
|
||||
android:src="@drawable/bg_auto"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
@@ -84,7 +86,8 @@
|
||||
android:id="@+id/tap_position"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user