From 88093fadd55f53a412b15590a91ad2c5769ee0a7 Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 10 May 2022 17:51:49 +0800 Subject: [PATCH] =?UTF-8?q?[add]=20taxi=20=20bus=E4=B9=98=E5=AE=A2?= =?UTF-8?q?=E5=B1=8F=E6=96=B9=E5=90=91=E7=9B=98UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hmi/ui/widget/SteeringWheelView.java | 8 +- .../drawable-xxhdpi/bg_steering_outer_bus.xml | 13 +++ ...g_outer.xml => bg_steering_outer_taxi.xml} | 0 .../drawable-xxhdpi/bg_steering_wheel_bus.xml | 9 ++ ...g_wheel.xml => bg_steering_wheel_taxi.xml} | 0 .../drawable-xxhdpi/streeing_wheel_rotate.xml | 23 ----- .../res/layout/hmi_steering_wheel_bus.xml | 93 +++++++++++++++++++ .../res/layout/hmi_steering_wheel_taxi.xml | 2 +- 8 files changed, 123 insertions(+), 25 deletions(-) create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_bus.xml rename core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/{bg_steering_outer.xml => bg_steering_outer_taxi.xml} (100%) create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_bus.xml rename core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/{bg_steering_wheel.xml => bg_steering_wheel_taxi.xml} (100%) delete mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/streeing_wheel_rotate.xml create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_bus.xml diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java index c66620d1ff..b9e4a4b6cb 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java @@ -14,11 +14,13 @@ import androidx.annotation.Nullable; import androidx.constraintlayout.widget.ConstraintLayout; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; +import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener; 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.utilcode.mogo.AppIdentityModeUtils; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.util.ThreadUtils; @@ -55,7 +57,11 @@ 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_taxi, this); + if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { + LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this); + } else { + LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_taxi, this); + } initView(); CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, mGoAutopilotStatusListener); CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener); diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_bus.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_bus.xml new file mode 100644 index 0000000000..f5e1da1a55 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_bus.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_taxi.xml similarity index 100% rename from core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer.xml rename to core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_outer_taxi.xml diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_bus.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_bus.xml new file mode 100644 index 0000000000..156cc4f0e0 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_bus.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_taxi.xml similarity index 100% rename from core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel.xml rename to core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/bg_steering_wheel_taxi.xml diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/streeing_wheel_rotate.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/streeing_wheel_rotate.xml deleted file mode 100644 index d78c62cc72..0000000000 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xxhdpi/streeing_wheel_rotate.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_bus.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_bus.xml new file mode 100644 index 0000000000..258956925c --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_bus.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_taxi.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_taxi.xml index a6725a415a..bf88f0d590 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_taxi.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel_taxi.xml @@ -26,7 +26,7 @@ android:layout_marginLeft="@dimen/dp_85" android:layout_marginTop="@dimen/dp_130" android:layout_marginRight="@dimen/dp_85" - android:indeterminateDrawable="@drawable/bg_steering_outer" + android:indeterminateDrawable="@drawable/bg_steering_outer_taxi" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" />