[3.4.0]
[add taxi BottomBar]
This commit is contained in:
@@ -2,4 +2,10 @@ package com.mogo.och.common.module.manager.loopmanager
|
||||
|
||||
import io.reactivex.Scheduler
|
||||
|
||||
/**
|
||||
* interval 轮训间隔
|
||||
* function 轮询执行的方法
|
||||
* immediately 是否立刻执行
|
||||
* scheduler 轮训执行的线程
|
||||
*/
|
||||
data class LoopInfo(val interval:Long,val function: () -> Unit,val immediately:Boolean=false,var scheduler: Scheduler? = null)
|
||||
@@ -242,7 +242,7 @@ object TaxiPassengerModel {
|
||||
|
||||
//1. 处理进行中订单
|
||||
mInServiceList = data.data.servicing
|
||||
if (data.data.servicing != null && !data.data.servicing.isEmpty()) {
|
||||
if (data.data.servicing != null && data.data.servicing.isNotEmpty()) {
|
||||
// 1.1. 当存在进行中单时:对本地currentOrder进行更新
|
||||
if (currentOCHOrder == null) {
|
||||
//1.1.1. 当本地无currentOrder(已经完成or取消),则更新currentOrder,并通知ui更新
|
||||
|
||||
@@ -58,8 +58,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
public static final String TAG = "TaxiPassengerBaseFragment";
|
||||
|
||||
private MapBizView mapBizView;
|
||||
private ImageView mAutopilotImage;
|
||||
private ImageView mMapswitchBtn;
|
||||
private RomaPassengerView romaPView;
|
||||
|
||||
private WeakReference<TaxiPassengerArrivedView> mArrivedEndView;
|
||||
@@ -68,12 +66,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
protected TaxiPassengerServingOrderFragment ochServingOrderFragment = null;
|
||||
|
||||
protected OverviewFragment overviewFragment = null;
|
||||
//消息盒子
|
||||
private PassengerMsgBoxButtonView viewPassengerMsgBoxButton;
|
||||
private PassengerMsgBoxBubbleView viewPassengerMsgBoxBubble;
|
||||
private PassengerMsgBoxListView viewPassengerMsgBoxList;
|
||||
|
||||
private final Handler mHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -95,8 +87,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
@Override
|
||||
protected void initViews() {
|
||||
mapBizView = findViewById(R.id.mapBizView);
|
||||
mAutopilotImage = findViewById(R.id.module_och_autopilot_iv);
|
||||
mMapswitchBtn = findViewById(R.id.module_och_taxi_swich_map_iv);
|
||||
romaPView = findViewById(R.id.romaPView);
|
||||
if(DeviceUtils.isLenovoModel() || DeviceUtils.isEB5Model()){
|
||||
romaPView.setVisibility(View.VISIBLE);
|
||||
@@ -104,7 +94,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
romaPView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
updateSwitchMapIcon();
|
||||
initListener();
|
||||
|
||||
onAutopilotStatusChanged(CallerAutoPilotStatusListenerManager.INSTANCE.getState());
|
||||
@@ -112,22 +101,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
switchVRFlatMode(MogoStatusManager.getInstance().isVrMode());
|
||||
//预加载视频进程
|
||||
EmptyService.Companion.startService(getContext());
|
||||
|
||||
//消息盒子
|
||||
viewPassengerMsgBoxButton = findViewById(R.id.viewPassengerMsgBoxButton);
|
||||
viewPassengerMsgBoxBubble = findViewById(R.id.viewPassengerMsgBoxBubble);
|
||||
viewPassengerMsgBoxList = findViewById(R.id.viewPassengerMsgBoxList);
|
||||
viewPassengerMsgBoxButton.setClickListener(show -> {
|
||||
if (show) {
|
||||
viewPassengerMsgBoxList.setVisibility(View.VISIBLE);
|
||||
viewPassengerMsgBoxBubble.setVisibility(View.GONE);
|
||||
viewPassengerMsgBoxBubble.isShowData(false);
|
||||
} else {
|
||||
viewPassengerMsgBoxList.setVisibility(View.GONE);
|
||||
viewPassengerMsgBoxBubble.setVisibility(View.VISIBLE);
|
||||
viewPassengerMsgBoxBubble.isShowData(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -136,45 +109,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
mapBizView.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
private void updateSwitchMapIcon() {
|
||||
IMogoMapUIController controller = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (controller != null) {
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
mMapswitchBtn.setOnClickListener(v -> {
|
||||
IMogoMapUIController controller = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (controller != null) {
|
||||
//切换地图的远近视图
|
||||
if (controller.getCurrentMapVisualAngle().isLongSight()) {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else if (controller.getCurrentMapVisualAngle().isMediumSight()) {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
} else {
|
||||
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
}
|
||||
}
|
||||
//OverlayLeftViewUtils.INSTANCE.dismissOverlayView();
|
||||
});
|
||||
findViewById(R.id.iv_temp).setOnClickListener(view -> {
|
||||
OverlayLeftViewUtils.INSTANCE.showOverlayView(getActivity(), 0, true, -1, true);
|
||||
//showOrHideArrivedEndLayout(true, "北京北京北京", "1527481606997577728");
|
||||
//showOrHidePressengerCheckPager(true, "开始站点开", "开始站点开始站点开始", "2", "京A888888", "18811539480");
|
||||
//OCHFloatWindowManager.getInstance().ShowFloatWindow(getContext());
|
||||
});
|
||||
}
|
||||
|
||||
private void initArrivedView() {
|
||||
@@ -191,9 +126,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mapBizView.onResume();
|
||||
// mPresenter.startOrStopOrderLoop();
|
||||
// showOrHideServingOrderFragment(true,false);
|
||||
// showOrHideStartAutopilotView(true,true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -225,30 +157,10 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
// 2. 主动开启自动驾驶中,为2则停止loading,并isStarting = false
|
||||
onAutopilotStatusSuccessDone();
|
||||
}
|
||||
// 3. 其他过程直接更新
|
||||
if (mPrevAPStatus != status) {
|
||||
autopilotStatusAnimchanged(status);
|
||||
}
|
||||
mPrevAPStatus = status;
|
||||
});
|
||||
}
|
||||
|
||||
public void autopilotStatusAnimchanged(int status) {
|
||||
// mAutopilotTv.setText(isInAutopilot?"自动驾驶":"开启自动驾驶");
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_p_auto_nor);
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status) {
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_p_un_auto_nor);
|
||||
} else {
|
||||
mAutopilotImage.setImageResource(R.drawable.taxi_p_un_auto_nor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void startAutopilotDone(boolean success) {
|
||||
mHandler.postDelayed(() -> onAutopilotStatusChanged(CallerAutoPilotStatusListenerManager.INSTANCE.getState()), 1000L);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected BaseTaxiPassengerPresenter createPresenter() {
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.mogo.och.taxi.passenger.ui.bottom
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import kotlinx.android.synthetic.main.taxi_p_bottom_bar.view.actv_overmapview
|
||||
import kotlinx.android.synthetic.main.taxi_p_bottom_bar.view.actv_roma
|
||||
import kotlinx.android.synthetic.main.taxi_p_bottom_bar.view.actv_setting
|
||||
import kotlinx.android.synthetic.main.taxi_p_bottom_bar.view.actv_video
|
||||
|
||||
class BottomBar @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
private var checkIndex = SelectView.None
|
||||
private var overMapViewApply:ApplyClickLintener?=null
|
||||
private var videoApply:ApplyClickLintener?=null
|
||||
private var romaApply:ApplyClickLintener?=null
|
||||
private var settingApply:ApplyClickLintener?=null
|
||||
init {
|
||||
isClickable = true
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_p_bottom_bar, this, true)
|
||||
setBackgroundResource(R.drawable.taxi_p_bottom_bar_bg)
|
||||
actv_overmapview.setOnClickListener {
|
||||
setCheckIndex(SelectView.OVERMAPVIEW)
|
||||
overMapViewApply?.onApplyClick()
|
||||
}
|
||||
actv_video.setOnClickListener {
|
||||
setCheckIndex(SelectView.VIDEO)
|
||||
videoApply?.onApplyClick()
|
||||
}
|
||||
actv_roma.setOnClickListener {
|
||||
setCheckIndex(SelectView.ROMA)
|
||||
romaApply?.onApplyClick()
|
||||
}
|
||||
actv_setting.setOnClickListener {
|
||||
setCheckIndex(SelectView.SETTING)
|
||||
settingApply?.onApplyClick()
|
||||
}
|
||||
}
|
||||
|
||||
fun setOverMapApplyClick(overMapViewApply:ApplyClickLintener){
|
||||
this.overMapViewApply = overMapViewApply
|
||||
}
|
||||
fun setVideoApplyClick(overMapViewApply:ApplyClickLintener){
|
||||
this.videoApply = overMapViewApply
|
||||
}
|
||||
fun setRomaApplyClick(overMapViewApply:ApplyClickLintener){
|
||||
this.romaApply = overMapViewApply
|
||||
}
|
||||
fun setSettingApplyClick(overMapViewApply:ApplyClickLintener){
|
||||
this.settingApply = overMapViewApply
|
||||
}
|
||||
|
||||
fun setCheckIndex(index: SelectView){
|
||||
if(checkIndex==index){
|
||||
checkIndex = SelectView.None
|
||||
}else{
|
||||
checkIndex = index
|
||||
}
|
||||
if(checkIndex == SelectView.OVERMAPVIEW){
|
||||
actv_overmapview.setCheckItem(true)
|
||||
}else{
|
||||
actv_overmapview.setCheckItem(false)
|
||||
}
|
||||
if(checkIndex == SelectView.VIDEO){
|
||||
actv_video.setCheckItem(true)
|
||||
}else{
|
||||
actv_video.setCheckItem(false)
|
||||
}
|
||||
if(checkIndex == SelectView.ROMA){
|
||||
actv_roma.setCheckItem(true)
|
||||
}else{
|
||||
actv_roma.setCheckItem(false)
|
||||
}
|
||||
if(checkIndex == SelectView.SETTING){
|
||||
actv_setting.setCheckItem(true)
|
||||
}else{
|
||||
actv_setting.setCheckItem(false)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum class SelectView{
|
||||
None,OVERMAPVIEW,VIDEO,ROMA,SETTING
|
||||
}
|
||||
|
||||
interface ApplyClickLintener{
|
||||
fun onApplyClick()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.mogo.och.bus.passenger.ui.view.bottom
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import kotlinx.android.synthetic.main.m1_bottom_check.view.aciv_center_image
|
||||
import kotlinx.android.synthetic.main.m1_bottom_check.view.actv_title
|
||||
|
||||
open class BottomCheckView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "StopSiteView"
|
||||
}
|
||||
|
||||
private var backageViewId: Int = -1
|
||||
private var bottomTitle: String = ""
|
||||
private var selectedDrawable: Int = -1
|
||||
private var normalDrawable: Int = -1
|
||||
private var bottomTitleNormalColor:Int = -1
|
||||
private var bottomTitleCheckedColor:Int = -1
|
||||
private var backageView: View? = null
|
||||
|
||||
private var isCheck = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.m1_bottom_check, this, true)
|
||||
try {
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.BottomSelectView)
|
||||
backageViewId = typedArray.getResourceId(R.styleable.BottomSelectView_backageViewId, -1)
|
||||
bottomTitle = typedArray.getString(R.styleable.BottomSelectView_bottomTitle) ?: ""
|
||||
selectedDrawable = typedArray.getResourceId(R.styleable.BottomSelectView_selectedDrawable, -1)
|
||||
normalDrawable = typedArray.getResourceId(R.styleable.BottomSelectView_normalDrawable, -1)
|
||||
bottomTitleNormalColor = typedArray.getColor(R.styleable.BottomSelectView_bottomTitleNormalColor,
|
||||
ContextCompat.getColor(context,R.color.white))
|
||||
bottomTitleCheckedColor = typedArray.getColor(R.styleable.BottomSelectView_bottomTitleCheckedColor,
|
||||
ContextCompat.getColor(context,R.color.white))
|
||||
typedArray.recycle()
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun initView(context: Context) {
|
||||
if (selectedDrawable > 0) {
|
||||
aciv_center_image.setImageResource(normalDrawable)
|
||||
}
|
||||
actv_title.text = bottomTitle
|
||||
}
|
||||
|
||||
fun setCheckItem(isCheck: Boolean) {
|
||||
if (isCheck != this.isCheck) {
|
||||
this.isCheck = isCheck
|
||||
notifiBackageView()
|
||||
}
|
||||
}
|
||||
|
||||
private fun notifiBackageView() {
|
||||
if (isCheck) {
|
||||
backageView?.visibility = View.VISIBLE
|
||||
aciv_center_image.setImageResource(selectedDrawable)
|
||||
actv_title.setTextColor(bottomTitleNormalColor)
|
||||
} else {
|
||||
backageView?.visibility = View.GONE
|
||||
aciv_center_image.setImageResource(normalDrawable)
|
||||
actv_title.setTextColor(bottomTitleCheckedColor)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
parent?.let {
|
||||
if (parent is ConstraintLayout) {
|
||||
if (backageViewId > 0) {
|
||||
backageView = (parent as ConstraintLayout).findViewById(backageViewId)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isCheck) {
|
||||
backageView?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.mogo.och.taxi.passenger.ui.orderinfo
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
|
||||
class ItineraryView(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) :
|
||||
ConstraintLayout(context, attrs, defStyleAttr, defStyleRes) {
|
||||
|
||||
// 速度
|
||||
lateinit var actvSpeedValue: AppCompatTextView
|
||||
// 速度单位
|
||||
lateinit var actvSpeedUnit: AppCompatTextView
|
||||
// 终点站
|
||||
lateinit var actvEndstation: AppCompatTextView
|
||||
// 距离终点距离
|
||||
lateinit var actvDistance: AppCompatTextView
|
||||
// 距离终点距离单位
|
||||
lateinit var actvDistanceUnit: AppCompatTextView
|
||||
// 剩余时间
|
||||
lateinit var actvSurplusTime: AppCompatTextView
|
||||
// 剩余时间单位
|
||||
lateinit var actvSurplusTimeUnit: AppCompatTextView
|
||||
// 到达时间
|
||||
lateinit var actvArrivedTime: AppCompatTextView
|
||||
|
||||
private fun initView(context: Context?) {
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_p_itinerary, this, true)
|
||||
actvSpeedValue = findViewById(R.id.actv_speed_value)
|
||||
actvSpeedUnit = findViewById(R.id.actv_speed_unit)
|
||||
actvEndstation = findViewById(R.id.actv_endstation)
|
||||
actvDistance = findViewById(R.id.actv_distance)
|
||||
actvDistanceUnit = findViewById(R.id.actv_distance_unit)
|
||||
actvSurplusTime = findViewById(R.id.actv_surplus_time)
|
||||
actvSurplusTimeUnit = findViewById(R.id.actv_surplus_time_unit)
|
||||
actvArrivedTime = findViewById(R.id.actv_arrived_time)
|
||||
}
|
||||
|
||||
fun setSpeed(speedValue:String,speedUnit:String){
|
||||
actvSpeedValue.text = speedValue
|
||||
actvSpeedUnit.text = speedUnit
|
||||
}
|
||||
fun setEndStation(endStation:String){
|
||||
actvEndstation.text = endStation
|
||||
}
|
||||
|
||||
fun setDistanceInfo(distance:String,distanceUnit:String,
|
||||
surplusTime:String,surplusTimeUnit:String,
|
||||
arrivedTime:String
|
||||
){
|
||||
actvDistance.text = distance
|
||||
actvDistanceUnit.text = distanceUnit
|
||||
actvSurplusTime .text= surplusTime
|
||||
actvSurplusTimeUnit.text = surplusTimeUnit
|
||||
actvArrivedTime .text= arrivedTime
|
||||
}
|
||||
|
||||
init {
|
||||
try {
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
@@ -0,0 +1,28 @@
|
||||
<?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_107"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_center_image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="@dimen/dp_90"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_title"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_center_image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_center_image"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_4_5"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:text="靠边停车"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</merge>
|
||||
@@ -18,28 +18,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_630"
|
||||
android:layout_height="@dimen/dp_630"
|
||||
android:layout_marginLeft="-59dp"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_och_autopilot_iv"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginTop="@dimen/dp_120"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/taxi_p_un_auto_nor"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -61,60 +39,6 @@
|
||||
app:roma_open="@drawable/iv_roma_taxi_passenger_press_bg"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_och_taxi_swich_map_iv"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:background="@drawable/taxi_p_switch_map_medium"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<!--消息盒子-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxButtonView
|
||||
android:id="@+id/viewPassengerMsgBoxButton"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginStart="320dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
|
||||
android:id="@+id/viewPassengerMsgBoxBubble"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/viewPassengerMsgBoxButton"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewPassengerMsgBoxButton"
|
||||
app:layout_constraintRight_toRightOf="@id/viewPassengerMsgBoxButton" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxListView
|
||||
android:id="@+id/viewPassengerMsgBoxList"
|
||||
android:layout_width="650dp"
|
||||
android:layout_height="750dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/viewPassengerMsgBoxButton"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewPassengerMsgBoxButton"
|
||||
app:layout_constraintRight_toRightOf="@id/viewPassengerMsgBoxButton" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_temp"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="76dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:background="@drawable/taxi_p_mogologo_nor"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnAutopilotDisable"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -198,4 +122,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<com.mogo.och.taxi.passenger.ui.bottom.BottomBar
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,109 @@
|
||||
<?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_107"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<TextClock
|
||||
android:id="@+id/cl_order_time"
|
||||
android:format12Hour="HH:mm MM月dd日 EEEE"
|
||||
android:format24Hour="HH:mm MM月dd日 EEEE"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_overmapview_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/taxi_p_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_overmapview"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_overmapview"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.BottomCheckView
|
||||
android:id="@+id/actv_overmapview"
|
||||
app:backageViewId="@+id/actv_overmapview_press"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:selectedDrawable="@drawable/charter_p_bottom_softsettiing_press"
|
||||
app:normalDrawable="@drawable/charter_p_bottom_softsettiing_normal"
|
||||
app:bottomTitle="全局概览"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_video"
|
||||
app:layout_constraintStart_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_video_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/taxi_p_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_video"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_video"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.BottomCheckView
|
||||
android:id="@+id/actv_video"
|
||||
app:backageViewId="@+id/actv_video_press"
|
||||
app:selectedDrawable="@drawable/charter_p_bottom_softsettiing_press"
|
||||
app:normalDrawable="@drawable/charter_p_bottom_softsettiing_normal"
|
||||
app:bottomTitle="蘑菇咨询"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_overmapview"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_roma"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_roma_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/taxi_p_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_roma"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_roma"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.BottomCheckView
|
||||
android:id="@+id/actv_roma"
|
||||
app:backageViewId="@+id/actv_roma_press"
|
||||
app:selectedDrawable="@drawable/charter_p_bottom_softsettiing_press"
|
||||
app:normalDrawable="@drawable/charter_p_bottom_softsettiing_normal"
|
||||
app:bottomTitle="漫游"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_video"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_setting"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_setting_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/taxi_p_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_setting"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_setting"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.BottomCheckView
|
||||
android:id="@+id/actv_setting"
|
||||
app:backageViewId="@+id/actv_setting_press"
|
||||
app:selectedDrawable="@drawable/charter_p_bottom_softsettiing_press"
|
||||
app:normalDrawable="@drawable/charter_p_bottom_softsettiing_normal"
|
||||
app:bottomTitle="线路"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_roma"
|
||||
app:layout_constraintEnd_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</merge>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge 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"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
tools:layout_width="wrap_content"
|
||||
tools:layout_height="wrap_content">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_speed_value"
|
||||
tools:text="速度"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_speed_unit"
|
||||
tools:text="速度单位"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_endstation"
|
||||
tools:text="目的地"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_distance"
|
||||
tools:text="剩余距离"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_distance_unit"
|
||||
tools:text="剩余距离单位"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_surplus_time"
|
||||
tools:text="剩余时间"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_surplus_time_unit"
|
||||
android:text="剩余时间单位"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_arrived_time"
|
||||
android:text="到达时间"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"/>
|
||||
</merge>
|
||||
@@ -28,4 +28,19 @@
|
||||
</attr>
|
||||
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="BottomSelectView">
|
||||
<!-- 默认图片 -->
|
||||
<attr name="normalDrawable" format="reference" />
|
||||
<!-- 点击图片 -->
|
||||
<attr name="selectedDrawable" format="reference" />
|
||||
<!-- 显示背景view -->
|
||||
<attr name="backageViewId" format="reference" />
|
||||
|
||||
<attr name="bottomTitle" format="string"/>
|
||||
|
||||
<attr name="bottomTitleNormalColor" format="color"/>
|
||||
<attr name="bottomTitleCheckedColor" format="color"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
@@ -95,12 +95,12 @@ public class TaxiGrabOrderFragment extends BaseTaxiUIFragment implements View.On
|
||||
Calendar calendar = DateTimeUtil.formatLongToCalendar(order.bookingTime);
|
||||
if (DateTimeUtil.compareDateIsCurrentDay(calendar)){
|
||||
mOrderReserverTime.setText("用车时间:今天 "+ DateTimeUtil.formatCalendarToString(calendar, DateTimeUtil.HH_mm));
|
||||
VoiceNotice.showNotice("预约单,今天"+ DateTimeUtil.formatCalendarToString(calendar, DateTimeUtil.HH_mm)+"从"
|
||||
+order.startSiteAddr+"到"+order.endSiteAddr);
|
||||
// VoiceNotice.showNotice("预约单,今天"+ DateTimeUtil.formatCalendarToString(calendar, DateTimeUtil.HH_mm)+"从"
|
||||
// +order.startSiteAddr+"到"+order.endSiteAddr);
|
||||
}else {
|
||||
mOrderReserverTime.setText("用车时间:"+ DateTimeUtil.formatCalendarToString(calendar, DateTimeUtil.MM_dd_HH_mm));
|
||||
VoiceNotice.showNotice("预约单,"+ DateTimeUtil.formatCalendarToString(calendar, DateTimeUtil.MM_dd)+"从"
|
||||
+order.startSiteAddr+"到"+order.endSiteAddr);
|
||||
// VoiceNotice.showNotice("预约单,"+ DateTimeUtil.formatCalendarToString(calendar, DateTimeUtil.MM_dd)+"从"
|
||||
// +order.startSiteAddr+"到"+order.endSiteAddr);
|
||||
}
|
||||
mOrderStartStation.setText(order.startSiteAddr);
|
||||
mOrderEndStation.setText(order.endSiteAddr);
|
||||
|
||||
Reference in New Issue
Block a user