[6.6.0]去除第一层级考试按钮(后续会放在第三级)

This commit is contained in:
xuxinchao
2024-08-07 16:37:53 +08:00
parent ed5694218c
commit afd1f0ae03
10 changed files with 5 additions and 546 deletions

View File

@@ -13,13 +13,9 @@ import com.mogo.commons.mvp.IView
import com.mogo.commons.mvp.MvpFragment
import com.mogo.commons.mvp.Presenter
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.setting.ISeatPressureEventListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.isCanStartAutopilot
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendPlanningCmd
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendPlanningLineChangeCmd
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getState
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager.attachAutopilotBeforeLaunchView
import com.mogo.eagle.core.function.call.setting.CallerSeatPressureManager
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -36,13 +32,8 @@ import kotlinx.android.synthetic.main.bus_base_fragment.fl_speed
import kotlinx.android.synthetic.main.bus_base_fragment.mapBizView
import kotlinx.android.synthetic.main.bus_base_fragment.module_mogo_och_arrived_tv
import kotlinx.android.synthetic.main.bus_base_fragment.module_mogo_och_autopilot_status
import kotlinx.android.synthetic.main.bus_base_fragment.module_mogo_och_over_take
import kotlinx.android.synthetic.main.bus_base_fragment.module_mogo_och_slide_panel
import kotlinx.android.synthetic.main.bus_base_fragment.module_mogo_och_start
import kotlinx.android.synthetic.main.bus_base_fragment.module_mogo_och_station_panel_container
import kotlinx.android.synthetic.main.bus_base_fragment.module_mogo_och_stop
import kotlinx.android.synthetic.main.bus_base_fragment.module_och_bus_seat_pressure
import kotlinx.android.synthetic.main.bus_base_fragment.seatPressureSettingView
import kotlinx.android.synthetic.main.bus_base_fragment.smallMapView
import kotlinx.android.synthetic.main.bus_base_fragment.viewDriverMsgBoxBubble
import kotlinx.android.synthetic.main.bus_base_fragment.viewDriverMsgBoxButton
@@ -57,8 +48,7 @@ import org.greenrobot.eventbus.EventBus
*
* @author tongchenfei
*/
abstract class BaseBusTabFragment<V : IView?, P : Presenter<V>?> : MvpFragment<V, P>(),
ISeatPressureEventListener {
abstract class BaseBusTabFragment<V : IView?, P : Presenter<V>?> : MvpFragment<V, P>(){
//启动自驾动画
private var autopilotLoadingAnimator: ObjectAnimator? = null
@@ -110,25 +100,6 @@ abstract class BaseBusTabFragment<V : IView?, P : Presenter<V>?> : MvpFragment<V
}
})
module_mogo_och_stop.setOnClickListener {
sendPlanningCmd(1)
}
module_mogo_och_start.setOnClickListener {
sendPlanningCmd(2)
}
module_mogo_och_over_take.setOnClickListener {
sendPlanningLineChangeCmd(3)
}
//座椅压力
module_och_bus_seat_pressure.setOnClickListener {
if (seatPressureSettingView.visibility == View.VISIBLE) {
seatPressureSettingView.visibility = View.GONE
} else {
seatPressureSettingView.visibility = View.VISIBLE
}
}
CallerSeatPressureManager.addListener(TAG, this)
}
override fun initViews(savedInstanceState: Bundle?) {
@@ -174,7 +145,6 @@ abstract class BaseBusTabFragment<V : IView?, P : Presenter<V>?> : MvpFragment<V
smallMapView!!.onDestroy()
}
EventBus.getDefault().unregister(this)
CallerSeatPressureManager.removeListener(TAG)
super.onDestroyView()
}
@@ -467,17 +437,4 @@ abstract class BaseBusTabFragment<V : IView?, P : Presenter<V>?> : MvpFragment<V
"SMd5DPQP:" + if (routesResult == null) "" else routesResult.txtFileMd5DPQP
}
}
/**
* 设置座椅是否有人状态
* @param isPress 是否有人
*/
override fun onUpdateBgEvent(isPress: Boolean) {
if (isPress) {
module_och_bus_seat_pressure.setBackgroundResource(R.drawable.bus_operation_status_select_bg)
} else {
module_och_bus_seat_pressure.setBackgroundResource(R.drawable.bus_operation_status_bg)
}
}
}

View File

@@ -295,99 +295,6 @@
android:layout_width="@dimen/dp_142"
android:layout_height="@dimen/dp_142"/>
<RelativeLayout
android:id="@+id/module_mogo_och_stop"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/lineView">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="停车"
android:gravity="center"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_start"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_stop">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="出发"
android:gravity="center"
android:textStyle="bold"
android:maxLines="1"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_over_take"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_start">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="超车"
android:gravity="center"
android:textStyle="bold"
android:maxLines="1"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/module_och_bus_seat_pressure"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:background="@drawable/bus_operation_status_bg"
app:layout_constraintBottom_toBottomOf="@id/module_mogo_och_over_take"
app:layout_constraintTop_toTopOf="@id/module_mogo_och_over_take"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_over_take">
<ImageView
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_gravity="center"
android:src="@drawable/icon_seat_pressure"
/>
</LinearLayout>
<!--座椅压力设置-->
<com.mogo.eagle.core.function.hmi.ui.setting.SeatPressureSettingView
android:id="@+id/seatPressureSettingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/module_och_bus_seat_pressure"
app:layout_constraintBottom_toBottomOf="@id/module_och_bus_seat_pressure"
app:layout_constraintStart_toEndOf="@id/module_och_bus_seat_pressure"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
/>
<com.mogo.eagle.core.function.hmi.ui.widget.RomaDistanceView
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -15,12 +15,8 @@ import com.mogo.commons.mvp.IView
import com.mogo.commons.mvp.MvpFragment
import com.mogo.commons.mvp.Presenter
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.setting.ISeatPressureEventListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendPlanningCmd
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendPlanningLineChangeCmd
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager.attachAutopilotBeforeLaunchView
import com.mogo.eagle.core.function.call.setting.CallerSeatPressureManager
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView.ClickListener
@@ -31,11 +27,6 @@ import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.och.common.module.utils.ResourcesUtils
import com.mogo.och.common.module.utils.SoundPoolHelper
import kotlinx.android.synthetic.main.charter_base_fragment.module_mogo_och_arrived_tv
import kotlinx.android.synthetic.main.charter_base_fragment.module_mogo_och_over_take
import kotlinx.android.synthetic.main.charter_base_fragment.module_mogo_och_start
import kotlinx.android.synthetic.main.charter_base_fragment.module_mogo_och_stop
import kotlinx.android.synthetic.main.charter_base_fragment.module_och_bus_seat_pressure
import kotlinx.android.synthetic.main.charter_base_fragment.seatPressureSettingView
import org.greenrobot.eventbus.EventBus
/**
@@ -46,8 +37,7 @@ import org.greenrobot.eventbus.EventBus
*
* @author tongchenfei
*/
abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
MvpFragment<V, P>() , ISeatPressureEventListener {
abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() : MvpFragment<V, P>(){
private val TAG = "BaseBusTabFragment"
@@ -123,25 +113,6 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
onArriveStation()
}
module_mogo_och_stop.setOnClickListener {
sendPlanningCmd(1)
}
module_mogo_och_start.setOnClickListener {
sendPlanningCmd(2)
}
module_mogo_och_over_take.setOnClickListener {
sendPlanningLineChangeCmd(3)
}
//座椅压力
module_och_bus_seat_pressure.setOnClickListener {
if (seatPressureSettingView.visibility == View.VISIBLE) {
seatPressureSettingView.visibility = View.GONE
} else {
seatPressureSettingView.visibility = View.VISIBLE
}
}
CallerSeatPressureManager.addListener(TAG, this)
//消息盒子
viewDriverMsgBoxButton = findViewById(R.id.viewDriverMsgBoxButton)
viewDriverMsgBoxList = findViewById(R.id.viewDriverMsgBoxList)
@@ -255,7 +226,6 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
smallMapView?.onDestroy()
super.onDestroyView()
CallerAutopilotRecordListenerManager.removeListener(TAG)
CallerSeatPressureManager.removeListener(TAG)
EventBus.getDefault().unregister(this)
}
@@ -296,18 +266,6 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
super.onDestroy()
}
/**
* 设置座椅是否有人状态
* @param isPress 是否有人
*/
override fun onUpdateBgEvent(isPress: Boolean) {
if (isPress) {
module_och_bus_seat_pressure.setBackgroundResource(R.drawable.bus_operation_status_select_bg)
} else {
module_och_bus_seat_pressure.setBackgroundResource(R.drawable.bus_operation_status_bg)
}
}
/**
* bus调试面板打开关闭
*/

View File

@@ -371,96 +371,4 @@
app:layout_constraintStart_toStartOf="parent"
/>
<RelativeLayout
android:id="@+id/module_mogo_och_stop"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/lineView">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="停车"
android:gravity="center"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_start"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_stop">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="出发"
android:gravity="center"
android:textStyle="bold"
android:maxLines="1"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_over_take"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_start">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="超车"
android:gravity="center"
android:textStyle="bold"
android:maxLines="1"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/module_och_bus_seat_pressure"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:background="@drawable/bus_operation_status_bg"
app:layout_constraintBottom_toBottomOf="@id/module_mogo_och_over_take"
app:layout_constraintTop_toTopOf="@id/module_mogo_och_over_take"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_over_take">
<ImageView
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_gravity="center"
android:src="@drawable/icon_seat_pressure"
/>
</LinearLayout>
<!--座椅压力设置-->
<com.mogo.eagle.core.function.hmi.ui.setting.SeatPressureSettingView
android:id="@+id/seatPressureSettingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/module_och_bus_seat_pressure"
app:layout_constraintBottom_toBottomOf="@id/module_och_bus_seat_pressure"
app:layout_constraintStart_toEndOf="@id/module_och_bus_seat_pressure"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -10,7 +10,6 @@ import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
@@ -26,17 +25,14 @@ import com.mogo.commons.mvp.Presenter;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.config.HdMapBuildConfig;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.setting.ISeatPressureEventListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
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.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.call.setting.CallerSeatPressureManager;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView;
import com.mogo.eagle.core.function.hmi.ui.setting.SeatPressureSettingView;
import com.mogo.eagle.core.function.smp.view.SmallMapView;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
@@ -59,7 +55,7 @@ import org.greenrobot.eventbus.EventBus;
*
* @author tongchenfei
*/
public abstract class BaseShuttleTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> implements ISeatPressureEventListener {
public abstract class BaseShuttleTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P>{
private static final String TAG = "BaseBusTabFragment";
@@ -83,12 +79,6 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
public boolean isAnimateRunning = false;
private RelativeLayout moduleMogoOchStop;
private RelativeLayout moduleMogoOchStart;
private RelativeLayout moduleMogoOchOverTake;
private LinearLayout moduleOchBusSeatPressure;
private SeatPressureSettingView mSeatPressureSettingView;
/**
* 滑动按钮触发的事件
*/
@@ -113,33 +103,9 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
ctvAutopilotStatusIv = findViewById(R.id.bus_autopilot_btn_iv);
ctvAutopilotStatusTv = findViewById(R.id.bus_autopolot_btn_tv);
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
moduleMogoOchStop = findViewById(R.id.module_mogo_och_stop);
moduleMogoOchStart = findViewById(R.id.module_mogo_och_start);
moduleMogoOchOverTake = findViewById(R.id.module_mogo_och_over_take);
moduleOchBusSeatPressure = findViewById(R.id.module_och_bus_seat_pressure);
mSeatPressureSettingView = findViewById(R.id.seatPressureSettingView);
tvArrived = findViewById(R.id.module_mogo_och_arrived_tv);
moduleMogoOchStop.setOnClickListener(v -> {
CallerAutoPilotControlManager.INSTANCE.sendPlanningCmd(1);
});
moduleMogoOchStart.setOnClickListener(v -> {
CallerAutoPilotControlManager.INSTANCE.sendPlanningCmd(2);
});
moduleMogoOchOverTake.setOnClickListener(v -> {
CallerAutoPilotControlManager.INSTANCE.sendPlanningLineChangeCmd(3);
});
//座椅压力
moduleOchBusSeatPressure.setOnClickListener(v -> {
if(mSeatPressureSettingView.getVisibility() == View.VISIBLE){
mSeatPressureSettingView.setVisibility(View.GONE);
}else{
mSeatPressureSettingView.setVisibility(View.VISIBLE);
}
});
CallerSeatPressureManager.INSTANCE.addListener(TAG, this);
FrameLayout flSpeed = findViewById(R.id.fl_speed);
if (flSpeed != null) {
CallerDevaToolsManager.INSTANCE.attachAutopilotBeforeLaunchView(flSpeed.getContext(), flSpeed);
@@ -274,7 +240,6 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
}
super.onDestroyView();
CallerAutopilotRecordListenerManager.INSTANCE.removeListener(TAG);
CallerSeatPressureManager.INSTANCE.removeListener(TAG);
EventBus.getDefault().unregister(this);
}
@@ -538,15 +503,6 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
}
}
@Override
public void onUpdateBgEvent(boolean isPress) {
if (isPress) {
moduleOchBusSeatPressure.setBackgroundResource(R.drawable.bus_operation_status_select_bg);
} else {
moduleOchBusSeatPressure.setBackgroundResource(R.drawable.bus_operation_status_bg);
}
}
/**
* Bus调试信息线路、轨迹等信息
* <p>

View File

@@ -269,7 +269,6 @@
android:layout_height="@dimen/dp_142"/>
<com.mogo.och.common.module.wigets.map.drawline.LineView
android:id="@+id/lineView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/reportworkorderview"
android:layout_marginStart="-11dp"
@@ -277,98 +276,6 @@
android:layout_width="@dimen/dp_142"
android:layout_height="@dimen/dp_142"/>
<RelativeLayout
android:id="@+id/module_mogo_och_stop"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/lineView">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="停车"
android:gravity="center"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_start"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_stop">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="出发"
android:gravity="center"
android:textStyle="bold"
android:maxLines="1"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_over_take"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:background="@drawable/bus_operation_status_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_start">
<TextView
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_80"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:text="超车"
android:gravity="center"
android:textStyle="bold"
android:maxLines="1"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_32"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/module_och_bus_seat_pressure"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_172"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:background="@drawable/bus_operation_status_bg"
app:layout_constraintBottom_toBottomOf="@id/module_mogo_och_over_take"
app:layout_constraintTop_toTopOf="@id/module_mogo_och_over_take"
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_over_take">
<ImageView
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_gravity="center"
android:src="@drawable/icon_seat_pressure"
/>
</LinearLayout>
<!--座椅压力设置-->
<com.mogo.eagle.core.function.hmi.ui.setting.SeatPressureSettingView
android:id="@+id/seatPressureSettingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/module_och_bus_seat_pressure"
app:layout_constraintBottom_toBottomOf="@id/module_och_bus_seat_pressure"
app:layout_constraintStart_toEndOf="@id/module_och_bus_seat_pressure"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
/>
<com.mogo.och.shuttle.view.SlidePanelView
android:id="@+id/module_mogo_och_slide_panel"
android:layout_width="wrap_content"

View File

@@ -8,11 +8,9 @@ import android.os.Handler;
import android.os.Looper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
@@ -26,17 +24,13 @@ import com.mogo.commons.mvp.IView;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.commons.mvp.Presenter;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.setting.ISeatPressureEventListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
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.setting.CallerSeatPressureManager;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView;
import com.mogo.eagle.core.function.hmi.ui.setting.SeatPressureSettingView;
import com.mogo.eagle.core.function.hmi.ui.vehicle.TakeOverAutopilotView;
import com.mogo.eagle.core.function.view.MapBizView;
import com.mogo.eagle.core.function.smp.view.SmallMapView;
import com.mogo.eagle.core.function.view.MapRoamView;
@@ -61,7 +55,7 @@ import me.jessyan.autosize.utils.AutoSizeUtils;
*
* @author tongchenfei
*/
public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> implements IMogoMapListener , ISeatPressureEventListener {
public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> implements IMogoMapListener{
private static final String TAG = "BaseOchFragment";
private RelativeLayout ctvAutopilotStatusRL;
@@ -89,11 +83,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
protected AppCompatImageView acivShowGuid;
private OverMapDialog overMapDialog;
protected LinearLayout mSeatPressureBtn;//座椅压力
protected TakeOverAutopilotView takeOverAutopilotView;
protected SeatPressureSettingView seatPressureSettingView;
private final Handler mHandler = new Handler(Looper.getMainLooper());
@Override
@@ -214,21 +203,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
overMapDialog.showDialog();
}
});
//座椅压力
mSeatPressureBtn = findViewById(R.id.module_och_taxi_seat_pressure);
seatPressureSettingView = findViewById(R.id.seatPressureSettingView);
assert mSeatPressureBtn != null;
mSeatPressureBtn.setOnClickListener(view -> {
if(seatPressureSettingView.getVisibility() == View.VISIBLE){
seatPressureSettingView.setVisibility(View.GONE);
}else{
seatPressureSettingView.setVisibility(View.VISIBLE);
}
});
CallerSeatPressureManager.INSTANCE.addListener(TAG,this);
TakeOverAutopilotView takeOverAutopilotView = new TakeOverAutopilotView(getActivity());
takeOverAutopilotView.showFloatWindow();
}
@Override
@@ -251,7 +225,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
super.onPause();
mapBizView.onPause();
smallMapView.onPause();
takeOverAutopilotView.hideFloatWindow();
}
protected void onChangeOperationStatus() {
@@ -304,7 +277,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
taxiRottingNaviFragment = null;
smallMapView = null;
CallerAutopilotRecordListenerManager.INSTANCE.removeListener(TAG);
CallerSeatPressureManager.INSTANCE.removeListener(TAG);
}
@Override
@@ -596,17 +568,4 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
public void setGuidHide(){
acivShowGuid.setVisibility(View.GONE);
}
/**
* 设置座椅是否有人状态
* @param isPress 是否有人
*/
@Override
public void onUpdateBgEvent(boolean isPress) {
if(isPress){
mSeatPressureBtn.setBackgroundResource(R.drawable.taxi_operation_status_select_bg);
}else{
mSeatPressureBtn.setBackgroundResource(R.drawable.taxi_operation_status_bg);
}
}
}

View File

@@ -353,37 +353,6 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<!--考试-座椅压力-->
<LinearLayout
android:id="@+id/module_och_taxi_seat_pressure"
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
android:layout_marginLeft="40dp"
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:background="@drawable/taxi_operation_status_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/lineView">
<ImageView
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_gravity="center"
android:src="@drawable/icon_seat_pressure"
/>
</LinearLayout>
<!--座椅压力设置-->
<com.mogo.eagle.core.function.hmi.ui.setting.SeatPressureSettingView
android:id="@+id/seatPressureSettingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/module_och_taxi_seat_pressure"
app:layout_constraintBottom_toBottomOf="@id/module_och_taxi_seat_pressure"
app:layout_constraintStart_toEndOf="@id/module_och_taxi_seat_pressure"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
/>
<Button
android:id="@+id/btnAutopilotDisable"

View File

@@ -16,13 +16,11 @@ import com.mogo.commons.mvp.MvpFragment
import com.mogo.commons.mvp.Presenter
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.setting.ISeatPressureEventListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getState
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.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.setting.CallerSeatPressureManager
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView
import com.mogo.eagle.core.function.hmi.ui.widget.ParallelDriveView
import com.mogo.eagle.core.utilcode.kotlin.onClick
@@ -49,23 +47,18 @@ import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.module_mogo_oc
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.module_mogo_och_station_panel_container
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.module_och_autopilot_iv
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.module_och_autopilot_tv
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.module_och_taxi_seat_pressure
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.parallelDriveView
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.seatPressureSettingView
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.smallMapView
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.startAutopilotAnimationView
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.taxi_close_navi_icon
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.viewDriverMsgBoxBubble
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.viewDriverMsgBoxButton
import kotlinx.android.synthetic.main.unmanned_taxi_base_fragment.viewDriverMsgBoxList
/**
* @author: wangmingjun
* @date: 2023/7/24
*/
abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V, P>(),
IMogoMapListener, IMoGoAutopilotRecordListener, ISeatPressureEventListener {
abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V, P>(), IMogoMapListener, IMoGoAutopilotRecordListener{
companion object {
const val TAG = "BaseTaxiTabFragment"
}
@@ -209,16 +202,6 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
overMapDialog?.showDialog()
}
}
//座椅压力
module_och_taxi_seat_pressure.setOnClickListener {
if (seatPressureSettingView!!.visibility == View.VISIBLE) {
seatPressureSettingView!!.visibility = View.GONE
} else {
seatPressureSettingView!!.visibility = View.VISIBLE
}
}
CallerSeatPressureManager.addListener(TAG,this);
}
abstract fun stopAutoStartAutopilot()
@@ -258,7 +241,6 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
smallMapView?.onDestroy()
startAutopilotAnimationView.cancelCountdown()
CallerAutopilotRecordListenerManager.removeListener(TAG)
CallerSeatPressureManager.removeListener(TAG)
super.onDestroyView()
}
@@ -557,16 +539,4 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
fun setGuidHide() {
aciv_show_guid.visibility = View.GONE
}
/**
* 设置座椅是否有人状态
* @param isPress 是否有人
*/
override fun onUpdateBgEvent(isPress: Boolean) {
if (isPress) {
module_och_taxi_seat_pressure.setBackgroundResource(R.drawable.taxi_operation_status_select_bg)
} else {
module_och_taxi_seat_pressure.setBackgroundResource(R.drawable.taxi_operation_status_bg)
}
}
}

View File

@@ -350,38 +350,6 @@
android:layout_width="@dimen/dp_142"
android:layout_height="@dimen/dp_142"/>
<!--考试-座椅压力-->
<LinearLayout
android:id="@+id/module_och_taxi_seat_pressure"
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
android:layout_marginLeft="40dp"
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
android:elevation="@dimen/dp_10"
android:gravity="center"
android:background="@drawable/taxi_operation_status_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/lineView">
<ImageView
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_gravity="center"
android:src="@drawable/icon_seat_pressure"
/>
</LinearLayout>
<!--座椅压力设置-->
<com.mogo.eagle.core.function.hmi.ui.setting.SeatPressureSettingView
android:id="@+id/seatPressureSettingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/module_och_taxi_seat_pressure"
app:layout_constraintBottom_toBottomOf="@id/module_och_taxi_seat_pressure"
app:layout_constraintStart_toEndOf="@id/module_och_taxi_seat_pressure"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
/>
<com.mogo.eagle.core.function.hmi.ui.widget.RomaDistanceView
android:layout_width="wrap_content"
android:layout_height="wrap_content"