diff --git a/OCH/mogo-och-bus/build.gradle b/OCH/mogo-och-bus/build.gradle index 91a03380a4..eea68114f8 100644 --- a/OCH/mogo-och-bus/build.gradle +++ b/OCH/mogo-och-bus/build.gradle @@ -61,12 +61,14 @@ dependencies { implementation rootProject.ext.dependencies.modulecommon implementation rootProject.ext.dependencies.mogo_core_data implementation rootProject.ext.dependencies.mogo_core_function_call + implementation rootProject.ext.dependencies.mogo_core_function_hmi }else { implementation project(":core:mogo-core-utils") implementation project(":foudations:mogo-commons") implementation project(':modules:mogo-module-common') implementation project(':core:mogo-core-data') implementation project(':core:mogo-core-function-call') + implementation project(':core:function-impl:mogo-core-function-hmi') } } diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java index c75245dd8a..b7fb30a40b 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java @@ -31,6 +31,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager; import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager; import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; +import com.mogo.eagle.core.function.hmi.ui.widget.TrafficDataView; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; import com.mogo.eagle.core.utilcode.util.ToastUtils; @@ -72,7 +73,7 @@ public abstract class BaseBusTabFragment private FrameLayout flStationPanelContainer; private Group groupTestPanel; private FrameLayout flSpeed; - private BusArcView mouduleArc; + private TrafficDataView dataView; private ImageView mUpgradeTipIv; // private BusTrafficLightView mTrafficLightView; @@ -118,7 +119,7 @@ public abstract class BaseBusTabFragment tvOperationStatus = findViewById(R.id.module_mogo_och_operation_status); flSpeed = (FrameLayout) findViewById(R.id.fl_speed); - mouduleArc = (BusArcView) findViewById(R.id.bus_arc); + dataView = (TrafficDataView) findViewById(R.id.bus_arc); panelView = LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flStationPanelContainer); slidePanelView.setOnSlidePanelMoveToEndListener(onSlideToEndListener); @@ -146,8 +147,8 @@ public abstract class BaseBusTabFragment }); if (DebugConfig.isDebug()) { - mouduleArc.setLongClickable(true); - mouduleArc.setOnLongClickListener(v -> { + dataView.setLongClickable(true); + dataView.setOnLongClickListener(v -> { CallerLogger.INSTANCE.d(M_BUS + TAG, "长按显示状态工具栏"); Intent intent = new Intent(); intent.putExtra("oper", 52); @@ -478,9 +479,10 @@ public abstract class BaseBusTabFragment */ public void updateSpeedView(float newSpeed) { int speed = (int) (Math.abs(newSpeed) * 3.6F); // 倒车时工控机反馈定位信息中speed为负值 - mouduleArc.setArcColor(Color.parseColor(speed > 60 ? "#DB3137" : "#3E77F6")); - mouduleArc.setValues(speed); - flSpeed.setBackgroundResource(speed > 60 ? R.drawable.bus_yi_biao_pan_bg_speeding : R.drawable.bus_yi_biao_pan_bg_nor); + dataView.showWithSpeedValue(speed); +// mouduleArc.setArcColor(Color.parseColor(speed > 60 ? "#DB3137" : "#3E77F6")); +// mouduleArc.setValues(speed); +// flSpeed.setBackgroundResource(speed > 60 ? R.drawable.bus_yi_biao_pan_bg_speeding : R.drawable.bus_yi_biao_pan_bg_nor); } @Override diff --git a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml index 6e5d9df0c7..87e3d95737 100644 --- a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml +++ b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml @@ -5,37 +5,43 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="@dimen/dp_72"> - + + + + + + + + + + - - + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toBottomOf="@+id/fl_speed" + tools:visibility="visible"> + + android:textStyle="bold" /> @@ -71,28 +78,31 @@ tools:visibility="visible" /> - + + + + - - + app:layout_constraintLeft_toLeftOf="parent" /> + + android:visibility="gone" /> + @@ -140,11 +150,11 @@ android:layout_height="@dimen/module_mogo_och_operation_status_bg_height" android:layout_marginLeft="@dimen/module_mogo_och_margin_left" android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom" - android:src="@drawable/bus_badcase_btn_bg" android:elevation="@dimen/dp_10" + android:src="@drawable/bus_badcase_btn_bg" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintLeft_toRightOf="@id/module_mogo_och_setting_layout"/> + app:layout_constraintLeft_toRightOf="@id/module_mogo_och_setting_layout" /> +