[3.2.0] bus乘客屏视频地图切换

This commit is contained in:
wangmingjun
2023-05-10 18:34:04 +08:00
parent 43e4d50768
commit 62d2e6a6e7
17 changed files with 368 additions and 148 deletions

View File

@@ -35,7 +35,7 @@ class BusPStatusBarView @JvmOverloads constructor(
init {
LayoutInflater.from(context).inflate(R.layout.p_bus_view_status_bar, this, true)
setBackgroundColor(Color.parseColor("#80FFFFFF"))
setBackgroundResource(R.drawable.bg_status_bar)
isClickable = true
isFocusable = true
}

View File

@@ -2,14 +2,19 @@ package com.mogo.och.bus.passenger.ui;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatImageView;
import com.mogo.commons.mvp.IView;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.commons.mvp.Presenter;
import com.mogo.eagle.core.data.multidisplay.TelematicConstant;
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener;
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager;
import com.mogo.eagle.core.function.view.MapBizView;
import com.mogo.och.bus.passenger.R;
@@ -40,9 +45,50 @@ public abstract class BusPassengerBaseFragment<V extends IView, P extends Presen
protected void initViews() {
mapBizView = findViewById(R.id.mapBizView);
videoSwitch = findViewById(R.id.video_switch_iv);
videoSwitch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openOrCloseLiveVideo();
}
});
CallerTelematicListenerManager.INSTANCE.addListener(TAG, new IReceivedMsgListener() {
@Override
public void onReceivedServerSn(@Nullable String sn) {
}
@Override
public void onReceivedMsg(int type, @NonNull byte[] byteArray) {
if (type == TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR) {
switch (new String(byteArray)) {
// 乘客端开启漫游
case "0": {
// mLiveShadow.setVisibility(View.GONE);
goneLiveShadow();
break;
}
// 乘客端关闭漫游
case "1": {
// mLiveShadow.setVisibility(View.VISIBLE);
visibleLiveShadow();
break;
}
}
}
}
});
showRouteFragment();
}
protected abstract void openOrCloseLiveVideo();
protected abstract void goneLiveShadow();
protected abstract void visibleLiveShadow();
@Override
protected void initViews(Bundle savedInstanceState) {
super.initViews(savedInstanceState);

View File

@@ -1,5 +1,6 @@
package com.mogo.och.bus.passenger.ui;
import android.annotation.SuppressLint;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.text.Html;
@@ -18,6 +19,7 @@ import com.elegant.utils.UiThreadHandler;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.hmi.ui.widget.DriverMonitorView;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.och.bus.passenger.R;
import com.mogo.och.bus.passenger.adapter.BusPassengerLineStationsAdapter;
@@ -38,7 +40,7 @@ import java.util.List;
* @date: 2022/4/12
*/
public class BusPassengerRouteFragment extends
BusPassengerBaseFragment<BusPassengerRouteFragment, BaseBusPassengerPresenter> {
BusPassengerBaseFragment<BusPassengerRouteFragment, BaseBusPassengerPresenter> implements MapAndLiveVideoView.ChangeItemListener {
public static final String TAG = "BusPassengerRouteFragment";
@@ -50,9 +52,6 @@ public class BusPassengerRouteFragment extends
private Group mRouteInfoView;
private RecyclerView mStationsListRv;
private BusPassengerMapDirectionView mMapDirectionView;
// private ImageView mMapArrowIcon;
// private RotateAnimation rotateAnimation;
// private float lastBearing = 0;
private BusPassengerLineStationsAdapter mAdapter;
private TextView emptyTv;
private AppCompatImageView mAutopilotIv;
@@ -60,6 +59,13 @@ public class BusPassengerRouteFragment extends
private AppCompatTextView mCurrentArriveStationTitle;
private AppCompatTextView mCurrentArriveTip;
private AppCompatImageView mSpeakArrivedIv;
private DriverMonitorView driverMonitorView;
private ConstraintLayout indicatorView;
private View mapIndicator;
private View liveIndicator;
private MapAndLiveVideoView mapAndLiveVideoView;
List<View> views = new ArrayList<>();
/**
* 改变自动驾驶状态
@@ -91,7 +97,6 @@ public class BusPassengerRouteFragment extends
mNoLineInfoView =findViewById(R.id.bus_p_no_order_data_view);
emptyTv = findViewById(R.id.no_order_data_tv);
// mCarPlateNum = findViewById(R.id.bus_p_driver_num_plate_tv);
mLineName = findViewById(R.id.bus_p_line_name_tv);
mAutopilotIv = findViewById(R.id.auto_status_iv);
mCurrentArriveStation = findViewById(R.id.bus_p_cur_station_name);
@@ -99,8 +104,6 @@ public class BusPassengerRouteFragment extends
mCurrentArriveTip = findViewById(R.id.bus_p_cur_station_tip);
mSpeakArrivedIv = findViewById(R.id.speak_arrived_iv);
// mOperationTime = findViewById(R.id.line_operation_time_tv);
mRouteInfoView = findViewById(R.id.bus_p_line_cl);
mStationsListRv = findViewById(R.id.bus_p_line_stations_rl);
@@ -109,12 +112,24 @@ public class BusPassengerRouteFragment extends
mAdapter = new BusPassengerLineStationsAdapter(getContext(), mStationsList);
mStationsListRv.setAdapter(mAdapter);
// mMapArrowIcon = findViewById(R.id.bus_p_arrow_nor);
indicatorView = findViewById(R.id.busIndicatorView);
mapIndicator = findViewById(R.id.firstIndicator);
liveIndicator = findViewById(R.id.secondIndicator);
videoSwitch.setOnClickListener(new View.OnClickListener() {
driverMonitorView = new DriverMonitorView(getContext());
driverMonitorView.setLiveListener(new DriverMonitorView.LiveListener() {
@Override
public void onClick(View v) {
// TODO: 2023/5/4 漫游视频打开/关闭
public void onPlayError() {
goneLiveShadow();
}
@Override
public void showOrHideLiveBtn(boolean isShow) {
if (isShow){
visibleLiveShadow();
}else {
goneLiveShadow();
}
}
});
@@ -128,13 +143,69 @@ public class BusPassengerRouteFragment extends
}
});
}
mapAndLiveVideoView = findViewById(R.id.mapAndLiveVideoView);
initLiveView();
}
private void initLiveView() {
views.add(new View(getContext()));// 其实是空的真正小地图还在fragment里
views.add(driverMonitorView);
mapAndLiveVideoView.setData(views);
mapAndLiveVideoView.setVisibility(View.GONE);
indicatorView.setVisibility(View.GONE);
}
@SuppressLint("UseCompatLoadingForDrawables")
@Override
public void changeToItem(int position) {
// (position == 0): 空view 地图占位 (position == 1) :live video
if (position == 0){
mapIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_selected_bg));
liveIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_unselected_bg));
}else {
mapIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_unselected_bg));
liveIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_selected_bg));
}
mMapDirectionView.setVisibility(position == 0? View.VISIBLE:View.GONE);
}
@Override
protected void openOrCloseLiveVideo() {
if (videoSwitch.isSelected()){
videoSwitch.setSelected(false);
}else {
videoSwitch.setSelected(true);
mapAndLiveVideoView.changeToSecondView();
}
mapAndLiveVideoView.setItemChangeListener(videoSwitch.isSelected()? this:null);
mapAndLiveVideoView.setVisibility(videoSwitch.isSelected()? View.VISIBLE : View.GONE);
indicatorView.setVisibility(videoSwitch.isSelected() ? View.VISIBLE : View.GONE);
mMapDirectionView.setVisibility(videoSwitch.isSelected() ? View.GONE : View.VISIBLE);
mapIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_unselected_bg));
liveIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_selected_bg));
}
@Override
protected void goneLiveShadow() {
videoSwitch.setVisibility(View.GONE);
// driverMonitorView.setVisibility(View.GONE);
indicatorView.setVisibility(View.GONE);
}
@Override
protected void visibleLiveShadow() {
videoSwitch.setVisibility(View.VISIBLE);
}
@Override
protected void initViews(Bundle savedInstanceState) {
super.initViews(savedInstanceState);
mMapDirectionView = findViewById(R.id.bus_p_line_map_view);
mMapDirectionView = findViewById(R.id.busPLineMapView);
mMapDirectionView.onCreateView(savedInstanceState);
}
@Override
@@ -244,14 +315,6 @@ public class BusPassengerRouteFragment extends
}
}
// public void updatePlateNum(String plateNum){
// if ("".equals(plateNum) || null == plateNum) {
// mCarPlateNum.setText("-- --");
// }else {
// mCarPlateNum.setText((plateNum));
// }
// }
public void updateLineInfo(String lineName, String lineDurTime) {
mLineName.setText(lineName);
// mOperationTime.setText(lineDurTime);
@@ -301,27 +364,6 @@ public class BusPassengerRouteFragment extends
}
}
// @Override
// public void onCameraChange(float bearing) {
//// startIvCompass(bearing);
// }
// /**
// * 设置指南针旋转
// *
// * @param bearing
// */
// private void startIvCompass(float bearing) {
// bearing = 360 - bearing;
// CallerLogger.INSTANCE.d(M_BUS_P + TAG, "startIvCompass: " + bearing);
// rotateAnimation = new RotateAnimation(lastBearing, bearing, Animation.RELATIVE_TO_SELF
// , 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
// rotateAnimation.setFillAfter(true);
//
// mMapArrowIcon.startAnimation(rotateAnimation);
// lastBearing = bearing;
// }
public void onCarLocationChanged(MogoLocation location) {
updateSpeedView((float) location.getGnssSpeed());
}

View File

@@ -0,0 +1,139 @@
package com.mogo.och.bus.passenger.ui
import android.app.Activity
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.RelativeLayout
import androidx.viewpager.widget.PagerAdapter
import androidx.viewpager.widget.ViewPager
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.och.bus.passenger.R
import com.mogo.och.bus.passenger.ui.MapAndLiveVideoView.Companion.TAG
import java.lang.Exception
/**
* @author: wangmingjun
* @date: 2023/5/9
*/
class MapAndLiveVideoView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : RelativeLayout(context, attrs), ViewPager.OnPageChangeListener {
private var viewPager: ViewPager? = null
private var pagerAdapter: AdvancePagerAdapter? = null
private var changeItemListener: ChangeItemListener? = null
companion object {
const val TAG = "MapAndLiveVideoView"
}
init {
initView()
}
private fun initView() {
viewPager = ViewPager(context)
pagerAdapter = AdvancePagerAdapter()
viewPager?.adapter = pagerAdapter
addView(viewPager, LayoutParams(-1, -1))
viewPager?.addOnPageChangeListener(this)
}
fun setData(list: MutableList<View>){
pagerAdapter?.setData(list)
pagerAdapter?.notifyDataSetChanged()
}
fun setItemChangeListener(listener : ChangeItemListener?){
changeItemListener = listener
}
fun changeToSecondView(){
viewPager?.currentItem = 1
}
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
Logger.d(TAG, "onPageScrolled--position = $position")
}
override fun onPageSelected(position: Int) {
Logger.d(TAG, "onPageSelected--position = $position")
}
var startPosition = 1
override fun onPageScrollStateChanged(state: Int) {
Logger.d(TAG, "onPageScrollStateChanged--state = $state")
viewPager?.let {
val position = it.currentItem
if (state == 0) { //静止
if (startPosition == position){
if (position==0){
it.currentItem = 1
}else{
it.currentItem = 0
}
}else{
changeItemListener?.changeToItem(it.currentItem)
}
}else if (state == 1){ // 开始滑动
startPosition = it.currentItem
}else{
}
}
}
interface ChangeItemListener{
fun changeToItem(position: Int)
}
}
class AdvancePagerAdapter : PagerAdapter(),
ViewPager.OnPageChangeListener {
private var views: List<View>? = null
fun setData(views: List<View>?){
this.views = views
}
override fun instantiateItem(container: View, position: Int): Any {
Logger.d(TAG, "instantiateItem--position = $position")
return try {
val currentItem = position % views!!.size
(container as ViewPager).addView(views!![currentItem])
views!![currentItem]
}catch (e: Exception){
container
}
}
override fun getCount(): Int {
return if (views == null){
0
}else{
views!!.size
}
}
override fun isViewFromObject(arg0: View, arg1: Any): Boolean {
return arg0 === arg1
}
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
// Logger.d(TAG, "onPageScrolled--position = $position")
}
override fun onPageSelected(position: Int) {
// Logger.d(TAG, "onPageSelected--position = $position")
}
override fun onPageScrollStateChanged(state: Int) {
// Logger.d(TAG, "onPageScrollStateChanged--state = $state")
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

View File

@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="@android:color/white"
<gradient android:startColor="#FFFFFF"
android:centerColor="#00FFFFFF"
android:endColor="#00FFFFFF"
android:angle="315"
android:angle="0"
/>
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#1466FB"/>
<corners android:radius="2dp"/>
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#A9B6CA"/>
<corners android:radius="2dp"/>
</shape>

View File

@@ -33,13 +33,12 @@
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
android:id="@+id/ivMoGoLogo"
android:layout_width="@dimen/dp_121"
android:layout_height="@dimen/dp_121"
android:layout_marginRight="@dimen/dp_751"
android:layout_marginBottom="@dimen/dp_59"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:background="@drawable/roma_bus_p_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginBottom="@dimen/dp_20"
app:layout_constraintLeft_toRightOf="@+id/video_switch_iv"
app:roma_close="@drawable/roma_bus_p_bg_selector"
app:roma_open="@drawable/iv_roma_bus_passenger_press_bg" />

View File

@@ -0,0 +1,16 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/bus_p_route_info_panel_width"
android:layout_height="@dimen/bus_p_route_line_map_view_height"
android:background="@drawable/live_view_loading_bg">
<com.mogo.eagle.core.function.hmi.ui.widget.DriverMonitorView
android:id="@+id/buDriverMonitorView"
android:layout_width="@dimen/bus_p_route_info_panel_width"
android:layout_height="@dimen/bus_p_route_line_map_view_height"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -6,22 +6,6 @@
android:padding="@dimen/dp_40"
android:background="@android:color/transparent">
<!-- <com.mogo.och.common.module.wigets.OCHBorderShadowLayout-->
<!-- android:id="@+id/edge_view"-->
<!-- android:layout_width="725dp"-->
<!-- android:layout_height="match_parent"-->
<!-- app:shadowColor="@color/bus_p_route_view_left_edge_shadow"-->
<!-- app:xOffset="0dp"-->
<!-- app:yOffset="0dp"-->
<!-- app:bgColor="@android:color/transparent"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent">-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:layout_width="@dimen/bus_p_route_info_panel_width"-->
<!-- android:layout_height="match_parent"-->
<!-- android:background="@android:color/transparent" />-->
<!-- </com.mogo.och.common.module.wigets.OCHBorderShadowLayout>-->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/bus_p_route_info_panel_width"
android:layout_height="1120dp"
@@ -221,7 +205,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/bus_p_line_map_view"
app:layout_constraintBottom_toTopOf="@+id/busPLineMapView"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/split_line_iv" />
@@ -249,22 +233,52 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<com.mogo.och.bus.passenger.ui.BusPassengerMapDirectionView
android:id="@+id/bus_p_line_map_view"
android:id="@+id/busPLineMapView"
android:layout_width="@dimen/bus_p_route_info_panel_width"
android:layout_height="@dimen/bus_p_route_line_map_view_height"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<!-- <ImageView-->
<!-- android:id="@+id/bus_p_arrow_nor"-->
<!-- android:layout_width="@dimen/dp_108"-->
<!-- android:layout_height="@dimen/dp_107"-->
<!-- android:layout_marginRight="@dimen/dp_20"-->
<!-- android:layout_marginBottom="@dimen/dp_370"-->
<!-- android:src="@drawable/bus_p_arrow_nor"-->
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.DriverMonitorView-->
<!-- android:id="@+id/driverMonitorView"-->
<!-- android:layout_width="@dimen/bus_p_route_info_panel_width"-->
<!-- android:layout_height="@dimen/bus_p_route_line_map_view_height"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintRight_toRightOf="parent" />-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/busIndicatorView"
android:layout_width="@dimen/dp_40"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_20"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent">
<View
android:id="@+id/firstIndicator"
android:layout_width="@dimen/dp_16"
android:layout_height="6dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:background="@drawable/indicator_select"/>
<View
android:id="@+id/secondIndicator"
android:layout_width="@dimen/dp_16"
android:layout_height="6dp"
app:layout_constraintTop_toTopOf="@+id/firstIndicator"
app:layout_constraintBottom_toBottomOf="@+id/firstIndicator"
app:layout_constraintRight_toRightOf="parent"
android:background="@drawable/indicator_unselect"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.mogo.och.bus.passenger.ui.MapAndLiveVideoView
android:id="@+id/mapAndLiveVideoView"
android:layout_width="@dimen/bus_p_route_info_panel_width"
android:layout_height="@dimen/bus_p_route_line_map_view_height"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -10,8 +10,8 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/count_down_rotate_iv"
android:layout_width="@dimen/dp_55"
android:layout_height="@dimen/dp_55"
android:layout_width="@dimen/dp_65"
android:layout_height="@dimen/dp_65"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="@dimen/dp_10"
@@ -20,8 +20,8 @@
<TextView
android:id="@+id/sec_count_down"
android:layout_width="@dimen/dp_55"
android:layout_height="@dimen/dp_55"
android:layout_width="@dimen/dp_65"
android:layout_height="@dimen/dp_65"
android:background="@drawable/count_down_bg"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="parent"

View File

@@ -39,22 +39,6 @@ public abstract class BusPassengerBaseFragment<V extends IView, P extends Presen
private MapBizView mapBizView;
private FrameLayout flContainer;
private ContentLoadingProgressBar mProgressBar;
private View mLiveBtn;
private View mLiveShadow;
private DriverMonitorView driverMonitorView;
// 记录司机端是否打开了显示开关,
// 开关开启时,有视频流的车辆持续常驻展示视频流,无视频流的车辆不展示(无占位);
// 开关关闭时,无论是否有视频流,均不展示(无占位);开关默认关闭
private boolean driverToggle = false;
/**
* 改变自动驾驶状态
*
* @param status 2 - running 1 - enable 2 - disable
*/
private int mPrevAPStatus = -1;
@Override
protected int getLayoutId() {
@@ -69,48 +53,6 @@ public abstract class BusPassengerBaseFragment<V extends IView, P extends Presen
@Override
protected void initViews() {
mapBizView = findViewById(R.id.mapBizView);
mProgressBar = findViewById(R.id.bus_progress_bar);
mLiveShadow = findViewById(R.id.liveShadow);
driverMonitorView = findViewById(R.id.driverMonitorView);
mLiveBtn = findViewById(R.id.liveBtn);
driverMonitorView.setLiveListener(
() -> {
mLiveShadow.setVisibility(View.GONE);
}
);
mLiveBtn.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
mLiveShadow.setVisibility(mLiveShadow.getVisibility() == View.GONE ? View.VISIBLE : View.GONE);
return true;
}
});
CallerTelematicListenerManager.INSTANCE.addListener(TAG, new IReceivedMsgListener() {
@Override
public void onReceivedServerSn(@Nullable String sn) {
}
@Override
public void onReceivedMsg(int type, @NonNull byte[] byteArray) {
if (type == TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR) {
switch (new String(byteArray)) {
// 乘客端开启漫游
case "0": {
mLiveShadow.setVisibility(View.GONE);
break;
}
// 乘客端关闭漫游
case "1": {
mLiveShadow.setVisibility(View.VISIBLE);
break;
}
}
}
}
});
showRouteFragment();

View File

@@ -54,17 +54,17 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
android:id="@+id/ivMoGoLogo"
android:layout_width="@dimen/dp_121"
android:layout_height="@dimen/dp_121"
android:layout_marginRight="@dimen/dp_751"
android:layout_marginBottom="@dimen/dp_59"
android:background="@drawable/roma_bus_p_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:roma_close="@drawable/roma_bus_p_bg_selector"
app:roma_open="@drawable/iv_roma_bus_passenger_press_bg" />
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView-->
<!-- android:id="@+id/ivMoGoLogo"-->
<!-- android:layout_width="@dimen/dp_121"-->
<!-- android:layout_height="@dimen/dp_121"-->
<!-- android:layout_marginRight="@dimen/dp_751"-->
<!-- android:layout_marginBottom="@dimen/dp_59"-->
<!-- android:background="@drawable/roma_bus_p_bg_selector"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- app:roma_close="@drawable/roma_bus_p_bg_selector"-->
<!-- app:roma_open="@drawable/iv_roma_bus_passenger_press_bg" />-->
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView

View File

@@ -78,7 +78,7 @@
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
"eagle_mis_url": "http://eagle-mis-a.zhidaozhixing.com/",
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=asafety&type=charter&sn=%1$s",
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=asafety&sn=%1$s",
"chart_socket_url":""
},
"online": {

View File

@@ -95,6 +95,12 @@ class DriverMonitorView :
sopShowDriverMap["20211112X2RI32A"] = "F803EB2046PZD00274"//京A40776D
sopShowDriverMap["202204085X310A1"] = "F803EB2046PZD00263"//湘D09005D
Logger.d(TAG, "getServerToken = ${CallerTelematicManager.getServerToken()}")
liveListener?.showOrHideLiveBtn(
sopShowDriverMap.containsKey(CallerTelematicManager.getServerToken())
)
// TODO SOP演示需求只有乘客屏幕才会触发这个逻辑 END
// 点击重新连接直播
ivNormal.setOnClickListener {
@@ -207,6 +213,7 @@ class DriverMonitorView :
interface LiveListener {
fun onPlayError()
fun showOrHideLiveBtn(isShow: Boolean)
}
}