Merge remote-tracking branch 'origin/dev_minibus-d_230425_3.2.0' into dev_minibus-d_230425_3.2.0
@@ -1,5 +1,9 @@
|
||||
package com.mogo.och.bus.passenger.adapter;
|
||||
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_ARRIVING;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_LEAVING;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -19,10 +23,6 @@ import com.mogo.och.common.module.wigets.MarqueeTextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_ARRIVING;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_LEAVING;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/4/6
|
||||
@@ -58,7 +58,7 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<Recycl
|
||||
viewHolder.curArrowBg.setVisibility(View.GONE);
|
||||
if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//到达未离开
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_current_station_txt_color));
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_green);
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_arrive_line_green);
|
||||
BlinkAnimationUtil.setAnimation(viewHolder.stationCircle);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
}else {
|
||||
@@ -79,26 +79,26 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<Recycl
|
||||
if (station.getDrivingStatus() == STATION_STATUS_LEAVING ||
|
||||
(station.getDrivingStatus() == STATION_STATUS_STOPPED && station.isLeaving())){ //过站
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_station_txt_color));
|
||||
viewHolder.curArrowBg.setImageResource(R.drawable.bus_p_line_grey);
|
||||
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA));
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_gray);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END);
|
||||
} else if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//刚到站未离开的
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_current_station_txt_color));
|
||||
viewHolder.curArrowBg.setImageResource(R.drawable.bus_p_line_grey);
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_green);
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_clock_17417B));
|
||||
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA));
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_arrive_line_green);
|
||||
BlinkAnimationUtil.setAnimation(viewHolder.stationCircle);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
}else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING && preStation.isLeaving()){//即将到站
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_current_station_txt_color));
|
||||
viewHolder.curArrowBg.setImageResource(R.drawable.bus_p_line_green);
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_green);
|
||||
BlinkAnimationUtil.setAnimation(viewHolder.stationCircle);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_station_txt_color));
|
||||
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA));
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_arrive_line_blue);
|
||||
// BlinkAnimationUtil.setAnimation(viewHolder.stationCircle);
|
||||
// viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
}else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING &&
|
||||
(preStation.getDrivingStatus() == STATION_STATUS_ARRIVING
|
||||
|| preStation.getDrivingStatus() == STATION_STATUS_STOPPED)){ //未到站的并且前面也是未到站或者刚到站的
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_station_txt_color));
|
||||
viewHolder.curArrowBg.setImageResource(R.drawable.bus_p_line_blue);
|
||||
viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB));
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_blue);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END);
|
||||
}
|
||||
@@ -110,6 +110,7 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<Recycl
|
||||
return mStations.size();
|
||||
}
|
||||
}
|
||||
|
||||
class StationViewHolder extends RecyclerView.ViewHolder{
|
||||
public MarqueeTextView stationName;
|
||||
public ImageView stationCircle;
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.mogo.och.bus.passenger.callback.IBusPassengerControllerStatusCallback
|
||||
import com.mogo.och.bus.passenger.callback.IBusPassengerRouteLineInfoCallback;
|
||||
import com.mogo.och.bus.passenger.model.BusPassengerModel;
|
||||
import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment;
|
||||
import com.mogo.och.data.bean.BusStationBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -122,7 +123,7 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
|
||||
|
||||
@Override
|
||||
public void updatePlateNumber(String plateNumber) {
|
||||
runOnUIThread(() -> mView.updatePlateNum(plateNumber));
|
||||
// runOnUIThread(() -> mView.updatePlateNum(plateNumber));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,7 +132,7 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStationsInfo(List<BusPassengerStation> stations,int currentStationIndex,boolean isArrived) {
|
||||
public void updateStationsInfo(List<BusPassengerStation> stations, int currentStationIndex, boolean isArrived) {
|
||||
runOnUIThread(() -> mView.updateStationsInfo(stations,currentStationIndex, isArrived));
|
||||
}
|
||||
|
||||
@@ -159,6 +160,6 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
|
||||
|
||||
@Override
|
||||
public void updateTotalDistance() {
|
||||
runOnUIThread(() -> mView.setProgressBarMax());
|
||||
// runOnUIThread(() -> mView.setProgressBarMax());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import kotlinx.android.synthetic.jinlvvan.p_bus_view_blue_tooth.view.*
|
||||
|
||||
/**
|
||||
* 魔戒蓝牙控件
|
||||
* 放置于StatusBar右侧位置
|
||||
* todo arrow
|
||||
*/
|
||||
class BusPBlueToothView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : BlueToothView(context, attrs, defStyleAttr),IMoGoDevaToolsListener {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.p_bus_view_blue_tooth, this, true)
|
||||
}
|
||||
|
||||
override fun mofangStatus(status: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (status) {
|
||||
blueView.setImageResource(R.drawable.bus_p_blue_tooth_close)
|
||||
} else {
|
||||
blueView.setImageResource(R.drawable.bus_p_blue_tooth_open)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
|
||||
import android.annotation.*
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerBatteryManagementSystemListenerManager
|
||||
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.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import kotlinx.coroutines.*
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/14
|
||||
*/
|
||||
class BusPStatusBarView @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener{
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPStatusBarView"
|
||||
}
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.p_bus_view_status_bar, this, true)
|
||||
setBackgroundColor(Color.parseColor("#80FFFFFF"))
|
||||
isClickable = true
|
||||
isFocusable = true
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
post {
|
||||
val params: ViewGroup.LayoutParams = getLayoutParams()
|
||||
params.height = AutoSizeUtils.dp2px(context,40f)
|
||||
layoutParams = params
|
||||
}
|
||||
//添加view控制
|
||||
CallerHmiViewControlListenerManager.addListener(TAG,this)
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
when (skinMode) {
|
||||
0 -> setStatusBarDarkOrLight(false)
|
||||
1 -> setStatusBarDarkOrLight(true)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
CallerSkinModeListenerManager.removeListener(TAG)
|
||||
CallerDevaToolsManager.hideStatusBar()
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,17 @@
|
||||
package com.mogo.och.bus.passenger.ui;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.widget.ContentLoadingProgressBar;
|
||||
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.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.view.MapBizView;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.bus.passenger.R;
|
||||
import com.mogo.och.bus.passenger.constant.BusPassengerConst;
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil;
|
||||
|
||||
/**
|
||||
* Created on 2022/3/31
|
||||
@@ -32,19 +22,9 @@ public abstract class BusPassengerBaseFragment<V extends IView, P extends Presen
|
||||
private static final String TAG = BusPassengerBaseFragment.class.getSimpleName();
|
||||
|
||||
private MapBizView mapBizView;
|
||||
private TextView mCurrentArriveStation;
|
||||
private TextView mCurrentArriveStationTitle;
|
||||
private TextView mCurrentArriveTip;
|
||||
private ImageView mAutopilotIv;
|
||||
private FrameLayout flContainer;
|
||||
private ContentLoadingProgressBar mProgressBar;
|
||||
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
* @param status 2 - running 1 - enable 2 - disable
|
||||
*/
|
||||
private int mPrevAPStatus = -1;
|
||||
protected AppCompatImageView videoSwitch;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -59,22 +39,8 @@ public abstract class BusPassengerBaseFragment<V extends IView, P extends Presen
|
||||
@Override
|
||||
protected void initViews() {
|
||||
mapBizView = findViewById(R.id.mapBizView);
|
||||
mCurrentArriveStation = findViewById(R.id.bus_p_cur_station_name);
|
||||
mCurrentArriveStationTitle = findViewById(R.id.bus_p_cur_station_title);
|
||||
mCurrentArriveTip = findViewById(R.id.bus_p_cur_station_tip);
|
||||
mAutopilotIv = findViewById(R.id.bus_p_autopilot_iv);
|
||||
|
||||
mProgressBar = findViewById(R.id.bus_progress_bar);
|
||||
|
||||
videoSwitch = findViewById(R.id.video_switch_iv);
|
||||
showRouteFragment();
|
||||
|
||||
// mCurrentArriveStation.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
// @Override
|
||||
// public boolean onLongClick(View v) {
|
||||
// showOverviewFragment();
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,97 +93,4 @@ public abstract class BusPassengerBaseFragment<V extends IView, P extends Presen
|
||||
flContainer = findViewById(R.id.bus_p_route_panel);
|
||||
LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flContainer);
|
||||
}
|
||||
|
||||
public void updateArrivedStation(String station,int currentIndex,boolean isArrived){
|
||||
if (null == station){
|
||||
mCurrentArriveStation.setText("----");
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title_init));
|
||||
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip));
|
||||
removeProgressBar();
|
||||
}else {
|
||||
mCurrentArriveStation.setText(station);
|
||||
if (currentIndex == 0){
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title_init));
|
||||
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip_init));
|
||||
removeProgressBar();
|
||||
return;
|
||||
}
|
||||
if (isArrived){
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title));
|
||||
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip));
|
||||
removeProgressBar();
|
||||
}else {
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_next_station_title));
|
||||
mProgressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void removeProgressBar() {
|
||||
mProgressBar.setProgress(0);
|
||||
mProgressBar.setMax(0);
|
||||
mProgressBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void updateRoutePlanningToNextStation(long meters, long timeInSecond){
|
||||
//更新进度条
|
||||
updateProgressBar(meters);
|
||||
String dis = "0";
|
||||
String disUnit = "公里";
|
||||
if (meters > 0){
|
||||
if (meters / 1000 < 1){
|
||||
disUnit = "米";
|
||||
dis = String.valueOf(Math.round(meters));
|
||||
}else {
|
||||
disUnit = "公里";
|
||||
dis = NumberFormatUtil.formatLong((double)meters / 1000);
|
||||
}
|
||||
}
|
||||
String strHtml2 = "<font color=\"#2D3E5F\">距离 </font>" + "<b><font color=\"#0043FF\">" + dis + "</font></b>" + "<font color=\"#2D3E5F\"> "+disUnit+"</font>"
|
||||
+ "<font color=\"#2D3E5F\">   剩余 </font>" + "<b><font color=\"#0043FF\">" + (int)Math.ceil((double)timeInSecond/ 60f) + "</font></b>" + "<font color=\"#2D3E5F\"> 分钟</font>";
|
||||
mCurrentArriveTip.setText(Html.fromHtml(strHtml2));
|
||||
}
|
||||
|
||||
private void updateProgressBar(long meters) {
|
||||
int haveDriven = new Long(meters).intValue();
|
||||
int progressInt = SharedPrefsMgr.getInstance(getContext())
|
||||
.getInt(BusPassengerConst.BUS_SP_KEY_ORDER_SUM_DIS,0) - haveDriven;
|
||||
mProgressBar.setProgress(progressInt);
|
||||
}
|
||||
|
||||
public void setProgressBarMax(){
|
||||
int max = SharedPrefsMgr.getInstance(getContext())
|
||||
.getInt(BusPassengerConst.BUS_SP_KEY_ORDER_SUM_DIS,0);
|
||||
mProgressBar.setMax(max);
|
||||
}
|
||||
|
||||
public void onAutopilotStatusChanged(int status) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
// 3. 其他过程直接更新
|
||||
if (mPrevAPStatus != status){
|
||||
AutopilotStatusChanged(status);
|
||||
}
|
||||
mPrevAPStatus = status;
|
||||
});
|
||||
}
|
||||
|
||||
public void AutopilotStatusChanged(int status) {
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
|
||||
mAutopilotIv.setImageResource(R.drawable.bus_p_auto_nor);
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status){
|
||||
mAutopilotIv.setImageResource(R.drawable.bus_p_un_auto_nor);
|
||||
} else {
|
||||
mAutopilotIv.setImageResource(R.drawable.bus_p_un_auto_nor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void showOverviewFragment() {
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
}
|
||||
},5000L);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class BusPassengerMapDirectionView
|
||||
|
||||
private List<Marker> mLineMarkers = new ArrayList<>();
|
||||
|
||||
private IBusPassengerMapViewCallback mIBusPassengerMapViewCallback;
|
||||
// private IBusPassengerMapViewCallback mIBusPassengerMapViewCallback;
|
||||
private BitmapDescriptor mArrivedRes;
|
||||
private BitmapDescriptor mUnArrivedRes;
|
||||
|
||||
@@ -87,9 +87,9 @@ public class BusPassengerMapDirectionView
|
||||
}
|
||||
}
|
||||
|
||||
public void setTaxiPassengerMapViewCallback(IBusPassengerMapViewCallback iBusPassengerMapViewCallback) {
|
||||
this.mIBusPassengerMapViewCallback = iBusPassengerMapViewCallback;
|
||||
}
|
||||
// public void setTaxiPassengerMapViewCallback(IBusPassengerMapViewCallback iBusPassengerMapViewCallback) {
|
||||
// this.mIBusPassengerMapViewCallback = iBusPassengerMapViewCallback;
|
||||
// }
|
||||
|
||||
private void initView(Context context) {
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "initView");
|
||||
@@ -336,7 +336,7 @@ public class BusPassengerMapDirectionView
|
||||
|
||||
@Override
|
||||
public void onCameraChange(CameraPosition cameraPosition) {
|
||||
mIBusPassengerMapViewCallback.onCameraChange(cameraPosition.bearing);
|
||||
// mIBusPassengerMapViewCallback.onCameraChange(cameraPosition.bearing);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,33 +1,34 @@
|
||||
package com.mogo.och.bus.passenger.ui;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.RotateAnimation;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.elegant.utils.UiThreadHandler;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.och.bus.passenger.R;
|
||||
import com.mogo.och.bus.passenger.adapter.BusPassengerLineStationsAdapter;
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerStation;
|
||||
import com.mogo.och.bus.passenger.callback.IBusPassengerMapViewCallback;
|
||||
import com.mogo.och.bus.passenger.constant.BusPassengerConst;
|
||||
import com.mogo.och.bus.passenger.presenter.BaseBusPassengerPresenter;
|
||||
import com.mogo.och.bus.passenger.ui.layoutmanager.CenterLayoutManager;
|
||||
import com.mogo.och.bus.passenger.utils.BPRouteDataTestUtils;
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil;
|
||||
import com.mogo.och.common.module.wigets.MarqueeTextView;
|
||||
import com.mogo.och.common.module.wigets.OCHGradientTextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -37,26 +38,35 @@ import java.util.List;
|
||||
* @date: 2022/4/12
|
||||
*/
|
||||
public class BusPassengerRouteFragment extends
|
||||
BusPassengerBaseFragment<BusPassengerRouteFragment, BaseBusPassengerPresenter>
|
||||
implements IBusPassengerMapViewCallback {
|
||||
BusPassengerBaseFragment<BusPassengerRouteFragment, BaseBusPassengerPresenter> {
|
||||
|
||||
public static final String TAG = "BusPassengerRouteFragment";
|
||||
|
||||
private final List<BusPassengerStation> mStationsList = new ArrayList<>();
|
||||
|
||||
private TextView mSpeedTv;
|
||||
private OCHGradientTextView mSpeedTv;
|
||||
private ConstraintLayout mNoLineInfoView;
|
||||
private TextView mCarPlateNum;
|
||||
private MarqueeTextView mLineName;
|
||||
private TextView mOperationTime;
|
||||
private ConstraintLayout mRouteInfoView;
|
||||
private Group mRouteInfoView;
|
||||
private RecyclerView mStationsListRv;
|
||||
private BusPassengerMapDirectionView mMapDirectionView;
|
||||
private ImageView mMapArrowIcon;
|
||||
private RotateAnimation rotateAnimation;
|
||||
private float lastBearing = 0;
|
||||
// private ImageView mMapArrowIcon;
|
||||
// private RotateAnimation rotateAnimation;
|
||||
// private float lastBearing = 0;
|
||||
private BusPassengerLineStationsAdapter mAdapter;
|
||||
private TextView emptyTv;
|
||||
private AppCompatImageView mAutopilotIv;
|
||||
private AppCompatTextView mCurrentArriveStation;
|
||||
private AppCompatTextView mCurrentArriveStationTitle;
|
||||
private AppCompatTextView mCurrentArriveTip;
|
||||
private AppCompatImageView mSpeakArrivedIv;
|
||||
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
* @param status 2 - running 1 - enable 2 - disable
|
||||
*/
|
||||
private int mPrevAPStatus = -1;
|
||||
|
||||
@Override
|
||||
public int getStationPanelViewId() {
|
||||
@@ -74,13 +84,22 @@ public class BusPassengerRouteFragment extends
|
||||
super.initViews();
|
||||
|
||||
mSpeedTv = findViewById(R.id.bus_p_speed_tv);
|
||||
mSpeedTv.setVertrial(true);
|
||||
mSpeedTv.setmColorList(new int[]{getResources().getColor(R.color.bus_p_speed_color_start),
|
||||
getResources().getColor(R.color.bus_p_speed_color_end)});
|
||||
|
||||
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);
|
||||
// mCarPlateNum = findViewById(R.id.bus_p_driver_num_plate_tv);
|
||||
mLineName = findViewById(R.id.bus_p_line_name_tv);
|
||||
mOperationTime = findViewById(R.id.line_operation_time_tv);
|
||||
mAutopilotIv = findViewById(R.id.auto_status_iv);
|
||||
mCurrentArriveStation = findViewById(R.id.bus_p_cur_station_name);
|
||||
mCurrentArriveStationTitle = findViewById(R.id.bus_p_cur_station_title);
|
||||
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);
|
||||
@@ -90,7 +109,14 @@ public class BusPassengerRouteFragment extends
|
||||
mAdapter = new BusPassengerLineStationsAdapter(getContext(), mStationsList);
|
||||
mStationsListRv.setAdapter(mAdapter);
|
||||
|
||||
mMapArrowIcon = findViewById(R.id.bus_p_arrow_nor);
|
||||
// mMapArrowIcon = findViewById(R.id.bus_p_arrow_nor);
|
||||
|
||||
videoSwitch.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO: 2023/5/4 漫游视频打开/关闭
|
||||
}
|
||||
});
|
||||
|
||||
//测试
|
||||
if (DebugConfig.isDebug()){
|
||||
@@ -109,7 +135,6 @@ public class BusPassengerRouteFragment extends
|
||||
super.initViews(savedInstanceState);
|
||||
mMapDirectionView = findViewById(R.id.bus_p_line_map_view);
|
||||
mMapDirectionView.onCreateView(savedInstanceState);
|
||||
mMapDirectionView.setTaxiPassengerMapViewCallback(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -193,6 +218,7 @@ public class BusPassengerRouteFragment extends
|
||||
emptyTv.setText(getString(R.string.bus_p_no_out));
|
||||
mNoLineInfoView.setVisibility(View.VISIBLE);
|
||||
mRouteInfoView.setVisibility(View.GONE);
|
||||
mLineName.setText(getContext().getString(R.string.bus_p_no_line));
|
||||
updateArrivedStation(null,0,true);
|
||||
clearMapView();
|
||||
clearMapMarkers();
|
||||
@@ -203,6 +229,7 @@ public class BusPassengerRouteFragment extends
|
||||
if (mNoLineInfoView.getVisibility() == View.GONE){
|
||||
mNoLineInfoView.setVisibility(View.VISIBLE);
|
||||
mRouteInfoView.setVisibility(View.GONE);
|
||||
mLineName.setText(getContext().getString(R.string.bus_p_no_line));
|
||||
updateArrivedStation(null,0,true);
|
||||
clearMapView();
|
||||
clearMapMarkers();
|
||||
@@ -217,17 +244,17 @@ public class BusPassengerRouteFragment extends
|
||||
}
|
||||
}
|
||||
|
||||
public void updatePlateNum(String plateNum){
|
||||
if ("".equals(plateNum) || null == plateNum) {
|
||||
mCarPlateNum.setText("-- --");
|
||||
}else {
|
||||
mCarPlateNum.setText((plateNum));
|
||||
}
|
||||
}
|
||||
// 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);
|
||||
// mOperationTime.setText(lineDurTime);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -236,7 +263,7 @@ public class BusPassengerRouteFragment extends
|
||||
* @param currentStationIndex
|
||||
* @param isArrived 是否到站并离开,true 到达当前站 currentStationIndex 未离开, false 正在前往此站 currentStationIndex
|
||||
*/
|
||||
public void updateStationsInfo(List<BusPassengerStation> stations, int currentStationIndex,boolean isArrived) {
|
||||
public void updateStationsInfo(List<BusPassengerStation> stations, int currentStationIndex, boolean isArrived) {
|
||||
updateArrivedStation(stations.get(currentStationIndex).getName(),currentStationIndex,isArrived);
|
||||
mStationsList.clear();
|
||||
mStationsList.addAll(stations);
|
||||
@@ -260,8 +287,6 @@ public class BusPassengerRouteFragment extends
|
||||
private void updateWayPointList(List<BusPassengerStation> stations,int currentStationIndex) {
|
||||
List<LatLng> mLineStationsList = new ArrayList<>();
|
||||
for (int i = 0; i< stations.size(); i++) {//站点集合
|
||||
// LatLng latLng = CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(getContext()
|
||||
// ,stations.get(i).getLon(),stations.get(i).getLat());// lat,lon
|
||||
LatLng latLng = new LatLng(stations.get(i).getGcjLat(),stations.get(i).getGcjLon());// lat,lon
|
||||
mLineStationsList.add(latLng);
|
||||
}
|
||||
@@ -276,26 +301,26 @@ public class BusPassengerRouteFragment extends
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCameraChange(float bearing) {
|
||||
startIvCompass(bearing);
|
||||
}
|
||||
// @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;
|
||||
}
|
||||
// /**
|
||||
// * 设置指南针旋转
|
||||
// *
|
||||
// * @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());
|
||||
@@ -311,4 +336,84 @@ public class BusPassengerRouteFragment extends
|
||||
mStationsListRv.smoothScrollToPosition(position);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateArrivedStation(String station,int currentIndex,boolean isArrived){
|
||||
if (null == station){
|
||||
mCurrentArriveStation.setText("----");
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title_init));
|
||||
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip));
|
||||
mCurrentArriveTip.setBackgroundResource(R.drawable.cur_station_arrived_bg);
|
||||
handleArrivingSpeakIconDrawable();
|
||||
}else {
|
||||
mCurrentArriveStation.setText(station);
|
||||
if (currentIndex == 0){
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title_init));
|
||||
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip_init));
|
||||
mCurrentArriveTip.setBackgroundResource(R.drawable.cur_station_arrived_bg);
|
||||
handleArrivingSpeakIconDrawable();
|
||||
return;
|
||||
}
|
||||
if (isArrived){
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_station_title));
|
||||
mCurrentArriveTip.setText(getResources().getString(R.string.bus_p_cur_station_arrived_tip));
|
||||
mCurrentArriveTip.setBackgroundResource(R.drawable.cur_station_arrived_bg);
|
||||
handleArrivedSpeakIconDrawable();
|
||||
}else {
|
||||
mCurrentArriveStationTitle.setText(getResources().getString(R.string.bus_p_cur_next_station_title));
|
||||
mCurrentArriveTip.setBackgroundResource(R.drawable.cur_station_un_arrived_bg);
|
||||
handleArrivingSpeakIconDrawable();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void handleArrivedSpeakIconDrawable(){
|
||||
AnimationDrawable animationDrawable = (AnimationDrawable) mSpeakArrivedIv.getDrawable();
|
||||
animationDrawable.start();
|
||||
mSpeakArrivedIv.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
private void handleArrivingSpeakIconDrawable(){
|
||||
AnimationDrawable animationDrawable = (AnimationDrawable) mSpeakArrivedIv.getDrawable();
|
||||
animationDrawable.stop();
|
||||
mSpeakArrivedIv.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void updateRoutePlanningToNextStation(long meters, long timeInSecond){
|
||||
//更新进度条
|
||||
String dis = "0";
|
||||
String disUnit = "公里";
|
||||
if (meters > 0){
|
||||
if (meters / 1000 < 1){
|
||||
disUnit = "米";
|
||||
dis = String.valueOf(Math.round(meters));
|
||||
}else {
|
||||
disUnit = "公里";
|
||||
dis = NumberFormatUtil.formatLong((double)meters / 1000);
|
||||
}
|
||||
}
|
||||
String strHtml2 = "<font color=\"#2D3E5F\">距离 </font>" + "<b><font color=\"#0043FF\">" + dis + "</font></b>" + "<font color=\"#2D3E5F\"> "+disUnit+"</font>"
|
||||
+ "<font color=\"#2D3E5F\">   剩余 </font>" + "<b><font color=\"#0043FF\">" + (int)Math.ceil((double)timeInSecond/ 60f) + "</font></b>" + "<font color=\"#2D3E5F\"> 分钟</font>";
|
||||
mCurrentArriveTip.setText(Html.fromHtml(strHtml2));
|
||||
}
|
||||
|
||||
public void onAutopilotStatusChanged(int status) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
// 3. 其他过程直接更新
|
||||
if (mPrevAPStatus != status){
|
||||
AutopilotStatusChanged(status);
|
||||
}
|
||||
mPrevAPStatus = status;
|
||||
});
|
||||
}
|
||||
|
||||
public void AutopilotStatusChanged(int status) {
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
|
||||
mAutopilotIv.setImageResource(R.drawable.bus_p_auto_nor);
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status){
|
||||
mAutopilotIv.setImageResource(R.drawable.bus_p_un_auto_nor);
|
||||
} else {
|
||||
mAutopilotIv.setImageResource(R.drawable.bus_p_un_auto_nor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 900 B |
|
After Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 879 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 555 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 838 B |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 200 B |
|
After Width: | Height: | Size: 821 B |
|
After Width: | Height: | Size: 1.6 KiB |
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="@dimen/bus_p_station_tag_width_height"
|
||||
android:height="@dimen/bus_p_station_tag_width_height">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@dimen/bus_p_station_tag_radius_size"/>
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="@color/bus_p_end_tag_bg_color1"
|
||||
android:startColor="@color/bus_p_end_tag_bg_color2"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="@dimen/bus_p_station_tag_width_height"
|
||||
android:height="@dimen/bus_p_station_tag_width_height">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@dimen/bus_p_station_tag_radius_size"/>
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="@color/bus_p_start_tag_bg_color1"
|
||||
android:startColor="@color/bus_p_start_tag_bg_color2"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:visible="true"
|
||||
android:oneshot="false">
|
||||
<item android:drawable="@drawable/speak_arrived_icon_0" android:duration="300"/>
|
||||
<item android:drawable="@drawable/speak_arrived_icon_1" android:duration="300"/>
|
||||
<item android:drawable="@drawable/speak_arrived_icon_2" android:duration="300"/>
|
||||
</animation-list>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?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"
|
||||
android:endColor="#00FFFFFF"
|
||||
android:angle="315"
|
||||
/>
|
||||
</shape>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="#F2F6FF"
|
||||
android:startColor="#E1E7F5"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/icon_video_open" android:state_focused="true" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/icon_video_open" android:state_focused="false" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/icon_video_open" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/icon_video_open" android:state_focused="true" />
|
||||
<item android:drawable="@drawable/icon_video_close" />
|
||||
</selector>
|
||||
@@ -6,12 +6,18 @@
|
||||
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
android:id="@+id/mapBizView"
|
||||
android:layout_width="@dimen/dp_1860"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.BusPStatusBarView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugViewTrigger
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
@@ -20,28 +26,6 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.SteeringWheelView
|
||||
android:id="@+id/steering_wheel"
|
||||
android:layout_width="@dimen/dp_490"
|
||||
android:layout_height="@dimen/dp_490"
|
||||
android:layout_marginLeft="@dimen/dp_50"
|
||||
android:layout_marginTop="@dimen/dp_88"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_p_autopilot_iv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/bus_p_curent_station_panel_margin"
|
||||
android:layout_marginTop="@dimen/dp_112"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/bus_p_un_auto_nor"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<!--浓雾预警动画-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
|
||||
android:layout_width="match_parent"
|
||||
@@ -56,94 +40,15 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
android:id="@+id/arrive_station_shadow"
|
||||
<com.mogo.och.bus.passenger.ui.BusPassengerTrafficLightView
|
||||
android:id="@+id/bus_p_traffic_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/bus_p_curent_station_panel_margin_left"
|
||||
android:layout_marginBottom="@dimen/bus_p_curent_station_panel_margin"
|
||||
app:bgColor="@android:color/transparent"
|
||||
app:blurRadius="@dimen/dp_30"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginLeft="@dimen/dp_722"
|
||||
android:layout_marginTop="@dimen/dp_112"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:shadowColor="@color/bus_p_panel_edge_shadow"
|
||||
app:shadowRadius="@dimen/dp_30"
|
||||
app:xOffset="0dp"
|
||||
app:yOffset="0dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/bus_p_curent_station_panel_width"
|
||||
android:layout_height="@dimen/bus_p_curent_station_panel_height"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:background="@drawable/bus_p_panel_cur_station_panel">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_p_cur_station_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_56"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:text="@string/bus_p_cur_station_title"
|
||||
android:textColor="@color/bus_p_panel_cur_txt_color"
|
||||
android:textSize="@dimen/bus_p_curent_station_txt_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_p_cur_station_name"
|
||||
android:layout_width="@dimen/bus_p_curent_station_txt_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="-- --"
|
||||
android:textColor="@color/bus_p_panel_cur_station_txt_color"
|
||||
android:textSize="@dimen/bus_p_curent_station_txt_size1"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_cur_station_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_p_cur_station_title" />
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_27"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_cur_station_name"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_cur_station_name"
|
||||
app:layout_constraintRight_toLeftOf="@+id/bus_p_cur_station_name"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:src="@drawable/station_arrow">
|
||||
|
||||
</androidx.appcompat.widget.AppCompatImageView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_p_cur_station_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:text="@string/bus_p_cur_station_arrived_tip"
|
||||
android:textColor="@color/bus_p_panel_cur_station_tips_color"
|
||||
android:textSize="@dimen/bus_p_curent_station_tip_size1"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_cur_station_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_p_cur_station_name" />
|
||||
|
||||
<androidx.core.widget.ContentLoadingProgressBar
|
||||
android:id="@+id/bus_progress_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:progress="0"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:progressDrawable="@drawable/bus_progress_bar_bg" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.mogo.och.common.module.wigets.OCHBorderShadowLayout>
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/bus_p_route_panel"
|
||||
@@ -152,15 +57,6 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_299"
|
||||
android:layout_height="@dimen/dp_75"
|
||||
android:layout_marginRight="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_48"
|
||||
android:src="@drawable/bus_p_mogo_nor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/bus_p_route_panel" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.BusPassengerMsgBoxBubbleView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -170,4 +66,16 @@
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/video_switch_iv"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:src="@drawable/video_btn_selector"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_20"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -18,7 +18,7 @@
|
||||
android:id="@+id/no_order_data_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/bus_p_no_data_color"
|
||||
android:textColor="@color/bus_p_speed_txt_color"
|
||||
android:textSize="@dimen/bus_p_no_data_size"
|
||||
android:layout_marginTop="50dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
||||
@@ -3,32 +3,62 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
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>
|
||||
<!-- <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="match_parent"
|
||||
android:layout_height="1120dp"
|
||||
android:background="@drawable/bus_p_route_bg"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/bus_p_line_name_tv"
|
||||
android:layout_width="@dimen/dp_698"
|
||||
android:layout_height="@dimen/dp_76"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:background="@drawable/route_line_name_bg"
|
||||
android:text="@string/bus_p_no_line"
|
||||
android:gravity="center"
|
||||
app:customGap="0.5"
|
||||
app:useCustomGap="true"
|
||||
android:textColor="@color/bus_p_line_name_color"
|
||||
android:textSize="@dimen/bus_p_driver_number_plate_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_goneMarginLeft="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/bus_line_logo"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_line_name_tv"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_line_name_tv"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginLeft="@dimen/dp_194"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.OCHGradientTextView
|
||||
android:id="@+id/bus_p_speed_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -37,7 +67,6 @@
|
||||
android:includeFontPadding="false"
|
||||
android:letterSpacing="-0.05"
|
||||
android:text="0"
|
||||
android:textColor="@color/bus_p_speed_txt_color"
|
||||
android:textSize="@dimen/bus_p_speed_txt_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -51,29 +80,141 @@
|
||||
android:layout_marginRight="@dimen/bus_p_route_info_margin_right"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:includeFontPadding="false"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/bus_p_speed_unit_txt"
|
||||
android:textColor="@color/bus_p_speed_txt_color"
|
||||
android:textSize="@dimen/bus_p_speed_unit_txt_size"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_speed_tv"
|
||||
app:layout_constraintLeft_toRightOf="@+id/bus_p_speed_tv" />
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.BusPassengerTrafficLightView
|
||||
android:id="@+id/bus_p_traffic_light_view"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/auto_status_iv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/bus_p_route_info_margin_right"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_unit_tv"/>
|
||||
android:src="@drawable/auto_close"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_speed_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_p_speed_tv"/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.TurnLightViewStatus
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:day_light_mode="true"
|
||||
app:visible="false"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
app:layout_constraintTop_toTopOf="@+id/auto_status_iv"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/auto_status_iv"
|
||||
app:layout_constraintLeft_toRightOf="@+id/auto_status_iv"/>
|
||||
<View
|
||||
android:id="@+id/dividing_line_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/bus_p_route_line_dividing_view_height"
|
||||
android:background="@drawable/bus_p_dividing_line_bg"
|
||||
android:layout_width="@dimen/bus_p_route_line_dividing_view_height"
|
||||
android:layout_height="@dimen/dp_156"
|
||||
android:background="@color/bus_p_clock_6617417B"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_p_speed_tv" />
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_speed_tv" />
|
||||
|
||||
<TextClock
|
||||
android:layout_marginStart="@dimen/dp_64"
|
||||
android:id="@+id/textClockHourMin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:format12Hour="HH:mm"
|
||||
android:format24Hour="HH:mm"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/bus_p_clock_17417B"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
app:layout_constraintLeft_toRightOf="@+id/dividing_line_1"
|
||||
app:layout_constraintTop_toTopOf="@+id/dividing_line_1"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/dp_66" />
|
||||
|
||||
<TextClock
|
||||
android:id="@+id/textClockDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:format12Hour="yyyy年MM月dd日"
|
||||
android:format24Hour="yyyy年MM月dd日"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/bus_p_clock_17417B"
|
||||
android:includeFontPadding="false"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/textClockHourMin"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textClockHourMin"
|
||||
android:textSize="@dimen/dp_26" />
|
||||
|
||||
|
||||
<TextClock
|
||||
android:id="@+id/textClockWeek"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:format12Hour="EEEE"
|
||||
android:format24Hour="EEEE"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/bus_p_clock_17417B"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/textClockDate"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textClockDate"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/dp_26" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/split_line_iv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:src="@drawable/card_split_line_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dividing_line_1"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/bus_p_cur_station_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/split_line_iv"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_speed_tv"
|
||||
android:text="@string/bus_p_cur_station_title"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/bus_p_line_name_color"
|
||||
android:textSize="@dimen/dp_38"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/speak_arrived_iv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
app:layout_constraintLeft_toRightOf="@+id/bus_p_cur_station_title"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_cur_station_title"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_cur_station_title"
|
||||
android:src="@drawable/bg_p_speak_icon_arrived"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/bus_p_cur_station_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_57"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textStyle="bold"
|
||||
android:paddingLeft="@dimen/dp_30"
|
||||
android:paddingRight="@dimen/dp_30"
|
||||
android:layout_marginRight="@dimen/dp_90"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:text="@string/bus_p_cur_station_arrived_tip"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/cur_station_arrived_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_cur_station_title"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_cur_station_title"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/bus_p_cur_station_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="-- --"
|
||||
android:textSize="@dimen/dp_56"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
android:textColor="@color/bus_p_clock_17417B"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_p_cur_station_title"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_cur_station_title"/>
|
||||
|
||||
<include
|
||||
layout="@layout/bus_p_no_data_common_view"
|
||||
@@ -82,101 +223,48 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bus_p_line_map_view"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dividing_line_1" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/split_line_iv" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bus_p_line_cl"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/bus_p_line_stations_rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bus_p_line_map_view"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dividing_line_1">
|
||||
android:layout_marginTop="@dimen/dp_76"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:paddingLeft="@dimen/dp_30"
|
||||
android:paddingRight="@dimen/bus_p_route_info_margin_right"
|
||||
android:requiresFadingEdge="vertical"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_driver_num_plate_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_p_cur_station_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_p_driver_num_plate_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/bus_p_route_info_margin_left"
|
||||
android:layout_marginTop="@dimen/bus_p_driver_number_plate_margin_top"
|
||||
android:text="----"
|
||||
android:textColor="@color/bus_p_driver_number_plate_color"
|
||||
android:textSize="@dimen/bus_p_driver_number_plate_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/bus_p_line_name_tv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:text="----"
|
||||
app:customGap="0.5"
|
||||
app:useCustomGap="true"
|
||||
android:textColor="@color/bus_p_line_name_color"
|
||||
android:textSize="@dimen/bus_p_driver_number_plate_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toRightOf="@+id/bus_p_driver_num_plate_tv"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/bus_p_driver_num_plate_tv"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_p_driver_num_plate_tv"
|
||||
app:layout_goneMarginLeft="0dp" />
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/bus_p_line_cl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="bus_p_line_stations_rl,bus_p_cur_station_name,bus_p_cur_station_tip,
|
||||
speak_arrived_iv,bus_p_cur_station_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/line_operation_time_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/bus_p_line_operation_time_margin_top"
|
||||
android:text="-- --"
|
||||
android:textColor="@color/bus_p_line_operation_time_color"
|
||||
android:textSize="@dimen/bus_p_line_operation_time_size"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_driver_num_plate_tv"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/dividing_line_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/bus_p_route_line_dividing_view_height"
|
||||
android:layout_marginTop="@dimen/bus_p_route_dividing_line2_margin_top"
|
||||
android:background="@drawable/bus_p_dividing_line_bg"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/bus_p_line_stations_rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_260"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:paddingLeft="@dimen/dp_30"
|
||||
android:paddingRight="@dimen/bus_p_route_info_margin_right"
|
||||
android:requiresFadingEdge="vertical"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_driver_num_plate_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dividing_line_2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.BusPassengerMapDirectionView
|
||||
android:id="@+id/bus_p_line_map_view"
|
||||
android:layout_width="match_parent"
|
||||
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_constraintLeft_toLeftOf="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"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- <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"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent" />-->
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -46,8 +46,7 @@
|
||||
android:layout_width="@dimen/dp_12"
|
||||
android:layout_height="@dimen/dp_61"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:src="@drawable/bus_p_line_blue"
|
||||
android:background="@color/acc_default_txt_color"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_circle"
|
||||
app:layout_constraintRight_toRightOf="@+id/bus_p_circle"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_26">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/blueView"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/m2_blue_tooth_open"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
tools:ignore="MissingDefaultResource"
|
||||
android:background="@drawable/bg_status_bar">
|
||||
|
||||
<!--Wifi状态-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.WifiStateView
|
||||
android:id="@+id/wifiStateView"
|
||||
android:layout_width="@dimen/dp_28"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/status_bar_logo"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_40" />
|
||||
|
||||
<!--魔方连接状态 蓝牙-->
|
||||
<com.mogo.och.bus.passenger.ui.BusPBlueToothView
|
||||
android:id="@+id/blueToothView"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/wifiStateView"
|
||||
android:layout_width="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:src="@drawable/bus_p_blue_tooth_open"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_40" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status_bar_logo"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginLeft="@dimen/dp_40"
|
||||
android:src="@drawable/bus_p_status_bar_logo"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_width="@dimen/dp_94"
|
||||
android:layout_height="@dimen/dp_25"/>
|
||||
|
||||
|
||||
|
||||
</merge>
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="bus_p_speed_txt_color">#2D3E5F</color>
|
||||
<color name="bus_p_speed_txt_color">#5D7199</color>
|
||||
<color name="bus_p_traffic_light_bg_color">#CCE9EFFC</color>
|
||||
<color name="bus_p_traffic_light_bg_stroke">#C7D2E1</color>
|
||||
<color name="bus_p_driver_number_plate_color">#2D3E5F</color>
|
||||
<color name="bus_p_line_name_color">#0043FF</color>
|
||||
<color name="bus_p_line_name_color">#203555</color>
|
||||
<color name="bus_p_line_operation_time_color">#2D3E5F</color>
|
||||
<color name="bus_p_no_data_color">#596A8A</color>
|
||||
<color name="bus_p_station_circle_color">#D8E5F8</color>
|
||||
@@ -27,4 +27,12 @@
|
||||
<color name="bus_p_route_view_left_edge_shadow">#33394C63</color>
|
||||
<color name="bus_p_traffic_txt_color">#2D3E5F</color>
|
||||
<color name="bus_p_panel_edge_shadow">#33394C63</color>
|
||||
|
||||
<color name="bus_p_speed_color_start">#43CEFE</color>
|
||||
<color name="bus_p_speed_color_end">#1466FB</color>
|
||||
|
||||
<color name="bus_p_clock_17417B">#17417B</color>
|
||||
<color name="bus_p_clock_6617417B">#6617417B</color>
|
||||
<color name="bus_p_clock_A9B6CA">#A9B6CA</color>
|
||||
<color name="bus_p_clock_1F82FB">#1F82FB</color>
|
||||
</resources>
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="bus_p_route_info_panel_width">700dp</dimen>
|
||||
<dimen name="bus_p_route_info_panel_width">750dp</dimen>
|
||||
<dimen name="bus_p_auto_icon_margin_top">40dp</dimen>
|
||||
<dimen name="bus_p_route_info_margin_right">40dp</dimen>
|
||||
<dimen name="bus_p_route_info_margin_left">40dp</dimen>
|
||||
<dimen name="bus_p_route_info_margin_left">48dp</dimen>
|
||||
<dimen name="bus_p_route_info_margin_bottom">40dp</dimen>
|
||||
<dimen name="bus_p_route_info_margin_top">110dp</dimen>
|
||||
<dimen name="bus_p_route_line_info_height">224dp</dimen>
|
||||
<dimen name="bus_p_route_line_map_view_height">510dp</dimen>
|
||||
<dimen name="bus_p_route_line_map_view_height">422dp</dimen>
|
||||
<dimen name="bus_p_route_line_dividing_view_height">3dp</dimen>
|
||||
|
||||
<dimen name="bus_p_route_traffic_light_view_width">158dp</dimen>
|
||||
@@ -23,14 +23,14 @@
|
||||
<dimen name="bus_p_route_dividing_line2_margin_top">224dp</dimen>
|
||||
<dimen name="bus_p_driver_number_plate_margin_top">50dp</dimen>
|
||||
<dimen name="bus_p_driver_number_plate_margin_bottom">50dp</dimen>
|
||||
<dimen name="bus_p_driver_number_plate_size">44dp</dimen>
|
||||
<dimen name="bus_p_driver_number_plate_size">34dp</dimen>
|
||||
<dimen name="bus_p_line_operation_time_margin_top">130dp</dimen>
|
||||
<dimen name="bus_p_line_operation_time_size">38dp</dimen>
|
||||
|
||||
<dimen name="bus_p_no_data_size">36dp</dimen>
|
||||
<dimen name="bus_p_no_data_size">38dp</dimen>
|
||||
|
||||
<dimen name="bus_p_speed_txt_size">110dp</dimen>
|
||||
<dimen name="bus_p_speed_unit_txt_size">42dp</dimen>
|
||||
<dimen name="bus_p_speed_txt_size">90dp</dimen>
|
||||
<dimen name="bus_p_speed_unit_txt_size">27dp</dimen>
|
||||
|
||||
<dimen name="bus_p_station_circle_borner_size">4dp</dimen>
|
||||
<dimen name="bus_p_station_circle_radius_size">10dp</dimen>
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="bus_p_speed_unit_txt">KM/H</string>
|
||||
<string name="bus_p_no_out">您已收车</string>
|
||||
<string name="bus_p_no_task">暂无班次</string>
|
||||
<string name="bus_p_no_line" tools:ignore="ExtraTranslation">暂无线路</string>
|
||||
<string name="bus_p_start_station_txt_tag">起</string>
|
||||
<string name="bus_p_end_station_txt_tag">终</string>
|
||||
<string name="bus_p_cur_station_title">到达站:</string>
|
||||
<string name="bus_p_cur_next_station_title">下一站:</string>
|
||||
<string name="bus_p_cur_station_title">已到站:</string>
|
||||
<string name="bus_p_cur_next_station_title">前方到站:</string>
|
||||
<string name="bus_p_cur_station_title_init">始发站:</string>
|
||||
<string name="bus_p_cur_station_arrived_tip">请携带好随身物品下车。</string>
|
||||
<string name="bus_p_cur_station_arrived_tip_init">欢迎乘坐\'蘑菇车联\'自动驾驶车。</string>
|
||||
<string name="bus_p_cur_station_arrived_tip">请按秩序下车</string>
|
||||
<string name="bus_p_cur_station_arrived_tip_init">欢迎乘坐蘑菇车联自动驾驶车。</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.magic.mogo.och.charter.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/9/23
|
||||
*/
|
||||
public class WriteOffPassenger implements Serializable {
|
||||
public String phone;
|
||||
public String orderNo;
|
||||
public int passengerSize;
|
||||
public long writeOffTime;
|
||||
}
|
||||
@@ -7,10 +7,7 @@ import com.alibaba.android.arouter.utils.TextUtils
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.elegant.network.utils.GsonUtil
|
||||
import com.magic.mogo.och.charter.R
|
||||
import com.magic.mogo.och.charter.bean.CheckOrderCountDownResponse
|
||||
import com.magic.mogo.och.charter.bean.QueryBusinessStatusResponse
|
||||
import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse
|
||||
import com.magic.mogo.och.charter.bean.QueryRoutesResponse
|
||||
import com.magic.mogo.och.charter.bean.*
|
||||
import com.magic.mogo.och.charter.callback.ChangeDestCallback
|
||||
import com.magic.mogo.och.charter.callback.DriverM1OrderCallback
|
||||
import com.magic.mogo.och.charter.callback.IDriverM1ControllerStatusCallback
|
||||
@@ -33,11 +30,13 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02Lis
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.sendMsgToAllClients
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.och.common.module.bean.dpmsg.*
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager.pushAppOperationalMsgBox
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager.registerSocketMessageListener
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager.releaseSocketMessageListener
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.data.*
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
@@ -114,18 +113,24 @@ class DriverM1Model {
|
||||
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener)
|
||||
|
||||
// 监听运营信息
|
||||
OCHSocketMessageManager.registerSocketMessageListener(
|
||||
registerSocketMessageListener(
|
||||
OCHSocketMessageManager.msgMonitorType,
|
||||
mOnSystemMessageListener)
|
||||
//监听开门
|
||||
OCHSocketMessageManager.registerSocketMessageListener(
|
||||
registerSocketMessageListener(
|
||||
OCHSocketMessageManager.msgOperateDoorType,
|
||||
mOnDoorMessageListener)
|
||||
//监听订单结束
|
||||
OCHSocketMessageManager.registerSocketMessageListener(
|
||||
registerSocketMessageListener(
|
||||
OCHSocketMessageManager.msgOrderClosedType,
|
||||
mOnOrderClosedMessageListener)
|
||||
|
||||
//监听核销乘客
|
||||
registerSocketMessageListener<WriteOffPassenger>( //监听核销乘客
|
||||
OCHSocketMessageManager.msgWriteOffPassengerType,
|
||||
mWriteOffPassengerOnMessageListener
|
||||
)
|
||||
|
||||
//监听乘客屏发来的消息
|
||||
CallerTelematicListenerManager.addListener(TAG,mReceivedMsgListener)
|
||||
|
||||
@@ -225,13 +230,12 @@ class DriverM1Model {
|
||||
ChangeDestMsg::class.java) as ChangeDestMsg
|
||||
currentChangeDestMsg = changeDestMsg
|
||||
showChangerDestCommitDialog(changeDestMsg)
|
||||
}else if (msg.type == DPMsgType.TYPE_TASK_DETAILS.type){
|
||||
// TODO: 本地拿到订单状态变更
|
||||
val changeDestMsg = GsonUtils.fromJson(String(byteArray),
|
||||
ChangeDestMsg::class.java) as ChangeDestMsg
|
||||
}else if (msg.type == DPMsgType.TYPE_ARRIVEDEST_STATUS.type){ //乘客屏到站同步
|
||||
val arriveDestMsg = GsonUtils.fromJson(String(byteArray),
|
||||
ArriveDestMsg::class.java) as ArriveDestMsg
|
||||
|
||||
// 乘客屏同步的状态信息同步给报站屏, 1、选定目的地成功后同步 2、到站同步 3、包车时间结束同步
|
||||
sendMsgToClient(changeDestMsg)
|
||||
// 2、到站同步
|
||||
sendMsgToClient(arriveDestMsg)
|
||||
}
|
||||
d(SceneConstant.M_CHARTER_D,"onReceivedMsg = "+ GsonUtils.toJson(msg))
|
||||
}catch (e: Exception){
|
||||
@@ -302,6 +306,21 @@ class DriverM1Model {
|
||||
}
|
||||
}
|
||||
|
||||
private val mWriteOffPassengerOnMessageListener: IMogoOnMessageListener<WriteOffPassenger> =
|
||||
object : IMogoOnMessageListener<WriteOffPassenger> {
|
||||
override fun target(): Class<WriteOffPassenger> {
|
||||
return WriteOffPassenger::class.java
|
||||
}
|
||||
|
||||
override fun onMsgReceived(passenger: WriteOffPassenger?) {
|
||||
//进行播报
|
||||
i(SceneConstant.M_BUS + TAG, "passenger = " + GsonUtil.jsonFromObject(passenger))
|
||||
if (passenger != null && passenger.passengerSize == 0) return
|
||||
val appMsg = AppConnectMsg(false,true,"核销成功,${passenger?.passengerSize}人乘车")
|
||||
sendMsgToClient(appMsg)
|
||||
}
|
||||
}
|
||||
|
||||
fun pushOperationalToMsgBox(time : Long,content : String,type: Int = -1){
|
||||
playDI()
|
||||
pushAppOperationalMsgBox(time, content,type)
|
||||
@@ -463,7 +482,7 @@ class DriverM1Model {
|
||||
* 将业务订单信息保存,鹰眼可取用
|
||||
*/
|
||||
fun updateAutopilotControlParameters() {
|
||||
// TODO: 业务信息保存
|
||||
// 业务信息保存
|
||||
val parameters = initAutopilotControlParameters()
|
||||
if (null == parameters) {
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "AutopilotControlParameters is empty.")
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package com.mogo.och.common.module.manager
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendOperatorSetAcceleratedSpeed
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendOperatorSetHorn
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import java.util.*
|
||||
|
||||
|
||||
@@ -33,6 +34,7 @@ class DriverMoFangFunctionManager private constructor() {
|
||||
timerAcc = Timer()
|
||||
timerAcc!!.schedule(object : TimerTask() {
|
||||
override fun run() {
|
||||
d(SceneConstant.M_CHARTER_D + TAG,"sendOperatorSetAcceleratedSpeed $isSend $acc")
|
||||
sendOperatorSetAcceleratedSpeed(acc)
|
||||
}
|
||||
}, 0, 500)
|
||||
@@ -42,11 +44,13 @@ class DriverMoFangFunctionManager private constructor() {
|
||||
timerAcc!!.cancel()
|
||||
timerAcc = null
|
||||
}
|
||||
d(SceneConstant.M_CHARTER_D + TAG,"sendOperatorSetAcceleratedSpeed $isSend $acc")
|
||||
sendOperatorSetAcceleratedSpeed(acc)
|
||||
}
|
||||
}
|
||||
|
||||
fun reset(){
|
||||
d(SceneConstant.M_CHARTER_D + TAG,"sendAcc false 0.0")
|
||||
sendAcc(false,0.0)
|
||||
}
|
||||
|
||||
@@ -54,12 +58,14 @@ class DriverMoFangFunctionManager private constructor() {
|
||||
* 鸣笛,鸣笛需要手动结束
|
||||
*/
|
||||
fun sendOperatorSetHornByDriver(){
|
||||
d(SceneConstant.M_CHARTER_D + TAG,"sendOperatorSetHorn(1.0)")
|
||||
sendOperatorSetHorn(1.0)
|
||||
if (timerHorn == null) {
|
||||
timerHorn = Timer()
|
||||
}
|
||||
timerHorn!!.schedule(object : TimerTask() {
|
||||
override fun run() {
|
||||
d(SceneConstant.M_CHARTER_D + TAG,"sendOperatorSetHorn(2.0)")
|
||||
sendOperatorSetHorn(2.0)
|
||||
timerHorn = null
|
||||
}
|
||||
|
||||
@@ -263,7 +263,11 @@ android {
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("dali").replace("\"", "\\\"")}\""
|
||||
buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("dali").replace("\"", "\\\"")}\""
|
||||
}
|
||||
|
||||
fuzhou {
|
||||
dimension "project"
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("fuzhou").replace("\"", "\\\"")}\""
|
||||
buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("fuzhou").replace("\"", "\\\"")}\""
|
||||
}
|
||||
// 配置网络环境,QA、线上、演示
|
||||
qa {
|
||||
dimension "env"
|
||||
@@ -489,7 +493,7 @@ def variantName() {
|
||||
|
||||
if (taskName.contains("Yantai")) {
|
||||
project.dependencies.add('implementation', project.project(':tts:tts-iflytek'))
|
||||
}else if (taskName.contains("Mogo")) {
|
||||
}else if (taskName.contains("Mogo") || taskName.contains("Fuzhou")) {
|
||||
project.dependencies.add('implementation', project.project(':tts:tts-pad'))
|
||||
}else if (taskName.contains("Dali")) {
|
||||
project.dependencies.add('implementation', project.project(':tts:tts-pad'))
|
||||
|
||||
@@ -196,5 +196,87 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"fuzhou": {
|
||||
"shuttlepassenger": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "2"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"title": "3"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "4"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||
"type": 0,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "5"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "6"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "7"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "8"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "9"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"title": "10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shuttlepassengerm2": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||
"type": 1,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
|
||||
"type": 1,
|
||||
"cacheImgPath": "",
|
||||
"title": "2"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,5 +103,40 @@
|
||||
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ytsafety&sn=%1$s",
|
||||
"chart_socket_url":""
|
||||
}
|
||||
},
|
||||
"fuzhou": {
|
||||
"qa": {
|
||||
"och_url": "https://och-a.zhidaozhixing.com",
|
||||
"shuttle_url": "https://och-a.zhidaozhixing.com",
|
||||
"passport_url": "https://och-a.zhidaozhixing.com/arch/passport/",
|
||||
"socket_base_url": "https://och-a.zhidaozhixing.com/arch/push/",
|
||||
"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&sn=%1$s",
|
||||
"chart_socket_url":""
|
||||
},
|
||||
"online": {
|
||||
"och_url": "https://tech.zhidaohulian.com",
|
||||
"shuttle_url": "https://mogogo-driver.zhidaozhixing.com",
|
||||
"passport_url": "https://mogogo-driver.zhidaozhixing.com/arch/passport/",
|
||||
"socket_base_url": "https://mogogo-driver.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://mogogo-driver.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "https://mogogo.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "https://mogogo.zhidaozhixing.com/",
|
||||
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=asafety&sn=%1$s",
|
||||
"chart_socket_url":""
|
||||
},
|
||||
"demo": {
|
||||
"och_url": "http://tech-dev.zhidaohulian.com",
|
||||
"shuttle_url": "https://mogogo-driver.zhidaozhixing.com",
|
||||
"passport_url": "https://mogogo-driver.zhidaozhixing.com/arch/passport/",
|
||||
"socket_base_url": "https://mogogo-driver.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://mogogo-driver.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "https://mogogo.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "https://mogogo.zhidaozhixing.com/",
|
||||
"bind_driver_qr_url": "",
|
||||
"chart_socket_url":""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
0
app/productFlavors/flavorsFilterConfig.gradle
Normal file
@@ -47,5 +47,11 @@
|
||||
"driver": ["ochM1"],
|
||||
"passenger": ["ochM1"]
|
||||
}
|
||||
},
|
||||
"fuzhou": {
|
||||
"shuttle" :{
|
||||
"driver": ["ochJL","ochM2"],
|
||||
"passenger": ["ochJL","ochM2"]
|
||||
}
|
||||
}
|
||||
}
|
||||