[6.5.1_exam]Bus考试
This commit is contained in:
@@ -13,9 +13,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.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
|
||||
@@ -32,8 +36,13 @@ 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
|
||||
@@ -48,7 +57,8 @@ import org.greenrobot.eventbus.EventBus
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
abstract class BaseBusTabFragment<V : IView?, P : Presenter<V>?> : MvpFragment<V, P>() {
|
||||
abstract class BaseBusTabFragment<V : IView?, P : Presenter<V>?> : MvpFragment<V, P>(),
|
||||
ISeatPressureEventListener {
|
||||
|
||||
//启动自驾动画
|
||||
private var autopilotLoadingAnimator: ObjectAnimator? = null
|
||||
@@ -100,6 +110,25 @@ 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?) {
|
||||
@@ -145,6 +174,7 @@ abstract class BaseBusTabFragment<V : IView?, P : Presenter<V>?> : MvpFragment<V
|
||||
smallMapView!!.onDestroy()
|
||||
}
|
||||
EventBus.getDefault().unregister(this)
|
||||
CallerSeatPressureManager.removeListener(TAG)
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
@@ -437,4 +467,17 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -287,6 +287,7 @@
|
||||
app:roma_open_bg="@drawable/common_driver_roma_press" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.map.drawline.LineView
|
||||
android:id="@+id/lineView"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/rtv_switch"
|
||||
android:layout_marginStart="-11dp"
|
||||
@@ -294,6 +295,99 @@
|
||||
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"
|
||||
|
||||
@@ -15,8 +15,12 @@ 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
|
||||
@@ -27,6 +31,11 @@ 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
|
||||
|
||||
/**
|
||||
@@ -38,7 +47,7 @@ import org.greenrobot.eventbus.EventBus
|
||||
* @author tongchenfei
|
||||
*/
|
||||
abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
|
||||
MvpFragment<V, P>() {
|
||||
MvpFragment<V, P>() , ISeatPressureEventListener {
|
||||
|
||||
private val TAG = "BaseBusTabFragment"
|
||||
|
||||
@@ -114,6 +123,25 @@ 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)
|
||||
@@ -227,6 +255,7 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
|
||||
smallMapView?.onDestroy()
|
||||
super.onDestroyView()
|
||||
CallerAutopilotRecordListenerManager.removeListener(TAG)
|
||||
CallerSeatPressureManager.removeListener(TAG)
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
|
||||
@@ -267,6 +296,18 @@ 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调试面板打开关闭
|
||||
*/
|
||||
|
||||
@@ -251,6 +251,7 @@
|
||||
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"
|
||||
@@ -370,4 +371,96 @@
|
||||
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>
|
||||
@@ -10,6 +10,7 @@ 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;
|
||||
|
||||
@@ -25,14 +26,17 @@ 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;
|
||||
@@ -55,7 +59,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public abstract class BaseShuttleTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> {
|
||||
public abstract class BaseShuttleTabFragment<V extends IView, P extends Presenter<V>> extends MvpFragment<V, P> implements ISeatPressureEventListener {
|
||||
|
||||
private static final String TAG = "BaseBusTabFragment";
|
||||
|
||||
@@ -79,6 +83,12 @@ 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;
|
||||
|
||||
/**
|
||||
* 滑动按钮触发的事件
|
||||
*/
|
||||
@@ -103,9 +113,33 @@ 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);
|
||||
@@ -240,6 +274,7 @@ public abstract class BaseShuttleTabFragment<V extends IView, P extends Presente
|
||||
}
|
||||
super.onDestroyView();
|
||||
CallerAutopilotRecordListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerSeatPressureManager.INSTANCE.removeListener(TAG);
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@@ -503,6 +538,15 @@ 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>
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
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"
|
||||
@@ -276,6 +277,98 @@
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user