Merge branch 'ss' into dev_robotaxi-d-app-module_270_220510_2.7.0

This commit is contained in:
liujing
2022-05-10 17:52:20 +08:00
8 changed files with 123 additions and 25 deletions

View File

@@ -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);

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/background">
<shape
android:innerRadius="@dimen/dp_85"
android:shape="ring"
android:thickness="4px"
android:useLevel="false">
<solid android:color="#BBCFF6" />
</shape>
</item>
</layer-list>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-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" />
</shape>
</item>
</selector>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<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

@@ -0,0 +1,93 @@
<?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_bus">
<ProgressBar
android:id="@+id/blue_circle"
android:layout_width="@dimen/dp_180"
android:layout_height="@dimen/dp_180"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/dp_60"
android:layout_marginTop="@dimen/dp_38"
android:layout_marginRight="@dimen/dp_60"
android:indeterminateDrawable="@drawable/bg_steering_outer_bus"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/steering_tv_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_50"
android:layout_marginRight="-10px"
android:gravity="right"
android:text="-18°"
android:textColor="#415479"
android:textSize="@dimen/dp_26"
android:visibility="invisible"
app:layout_constraintRight_toLeftOf="@+id/blue_circle"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/steering_tv_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="-10px"
android:layout_marginTop="@dimen/dp_50"
android:gravity="left"
android:text="18°"
android:textColor="#415479"
android:textSize="@dimen/dp_26"
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_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_36"
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"
android:layout_height="@dimen/dp_40"
android:src="@drawable/icon_in_steering"
app:layout_constraintBottom_toBottomOf="@+id/autopilot_iv"
app:layout_constraintLeft_toLeftOf="@+id/autopilot_iv"
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_height="wrap_content"
android:layout_marginBottom="@dimen/dp_20"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/blue_circle" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -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" />