[add] 背景换切图->方案给taxi,bus使用原来的UI

This commit is contained in:
liujing
2022-05-10 17:10:43 +08:00
parent 894fc2cbc0
commit 3a0e4579c4
8 changed files with 39 additions and 47 deletions

View File

@@ -6,10 +6,10 @@
<com.mogo.eagle.core.function.hmi.ui.widget.SteeringWheelView
android:id="@+id/steering_wheel"
android:layout_width="@dimen/dp_432"
android:layout_height="@dimen/dp_432"
android:layout_marginLeft="@dimen/dp_90"
android:layout_marginTop="@dimen/dp_112"
android:layout_width="@dimen/dp_630"
android:layout_height="@dimen/dp_630"
android:layout_marginLeft="-59px"
android:layout_marginTop="@dimen/dp_20"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView

View File

@@ -5,14 +5,12 @@ import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.UiThread;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
@@ -21,7 +19,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateList
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager;
import com.mogo.eagle.core.function.hmi.R;
import com.mogo.eagle.core.network.utils.Util;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
@@ -58,7 +55,7 @@ public class SteeringWheelView extends ConstraintLayout {
public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
Log.d(TAG, "2");
LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel, this);
LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_taxi, this);
initView();
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, mGoAutopilotStatusListener);
CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener);

View File

@@ -1,14 +0,0 @@
<?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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View File

@@ -1,18 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:innerRadiusRatio="3"
android:shape="ring"
android:thicknessRatio="8"
android:useLevel="false">
<gradient
android:centerColor="#FF7121"
android:centerY="0.50"
android:endColor="#FFFF00"
android:startColor="#6BD3FF"
android:type="sweep"
android:useLevel="false" />
<item
android:left="4dp"
android:top="4dp"
>
<shape>
<solid android:color="#FF31486E" />
<corners android:radius="10dp" />
</shape>
</item>
<item
android:bottom="4dp"
android:left="4dp"
android:right="4dp"
android:top="4dp">
<shape>
<solid android:color="#FFFFFF" />
<corners android:radius="10dp" />
</shape>
</item>
</layer-list>

View File

@@ -1,9 +1,9 @@
<?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/bg_steering_wheel">
android:layout_width="@dimen/dp_630"
android:layout_height="@dimen/dp_630"
android:background="@drawable/steering_bg">
<ImageView
android:id="@+id/autopilot_iv"
@@ -11,19 +11,20 @@
android:layout_height="@dimen/dp_240"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_60"
android:layout_marginTop="@dimen/dp_140"
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_260"
android:layout_height="@dimen/dp_260"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/dp_85"
android:layout_marginTop="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_130"
android:layout_marginRight="@dimen/dp_85"
android:indeterminateDrawable="@drawable/bg_steering_outer"
app:layout_constraintLeft_toLeftOf="parent"
@@ -34,7 +35,7 @@
android:id="@+id/steering_tv_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_130"
android:layout_marginRight="-10px"
android:gravity="right"
android:text="-18°"
@@ -49,7 +50,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="-10px"
android:layout_marginTop="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_130"
android:gravity="left"
android:text="18°"
android:textColor="#FFFFFFFF"
@@ -57,13 +58,14 @@
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_260"
android:layout_height="@dimen/dp_260"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_130"
android:outlineAmbientShadowColor="#1EBBCFF6"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
@@ -81,14 +83,12 @@
app:layout_constraintRight_toRightOf="@+id/autopilot_iv"
app:layout_constraintTop_toTopOf="@+id/autopilot_iv" />
<!--档位信息-->
<com.mogo.eagle.core.function.hmi.ui.widget.TapPositionView
android:id="@+id/tap_position"
android:layout_width="@dimen/dp_240"
android:layout_width="@dimen/dp_272"
android:layout_height="wrap_content"
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"
app:layout_constraintTop_toBottomOf="@+id/blue_circle" />

View File

@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<dimen name="dp_20">20px</dimen>
<dimen name="module_v2n_tip_text_margin_right">26px</dimen>
<dimen name="warning_distance_right">30px</dimen>
<dimen name="dp_630">630px</dimen>
</resources>

View File

@@ -11,6 +11,7 @@
<dimen name="module_v2x_brake_image_width">120px</dimen>
<dimen name="module_v2x_brake_image_margin_left">37px</dimen>
<dimen name="module_v2x_brake_image_margin_right">27px</dimen>
<dimen name="dp_20">20px</dimen>
<dimen name="dp_90">90px</dimen>
<dimen name="dp_144">144px</dimen>
<dimen name="dp_186">186px</dimen>
@@ -18,4 +19,5 @@
<dimen name="dp_328">328px</dimen>
<dimen name="dp_730">730px</dimen>
<dimen name="dp_1600">1600px</dimen>
<dimen name="dp_630">630px</dimen>
</resources>