Merge remote-tracking branch 'origin/dev_robosweeper-d_app-module_221230_1.1.0' into dev_robosweeper-d_app-module_221230_1.1.0
# Conflicts: # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/SweeperProvider.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/BaseSweeperTabFragment.java
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.sweeper;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_SWEEPER;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
@@ -39,8 +40,8 @@ public class SweeperProvider implements IMogoOCH {
|
||||
* 进入鹰眼模式,设置手势缩放地图失效
|
||||
*/
|
||||
private void stepIntoVrMode(){
|
||||
CallerLogger.INSTANCE.d( M_BUS + TAG, "进入vr模式" );
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController())
|
||||
CallerLogger.INSTANCE.d( M_SWEEPER + TAG, "进入vr模式" );
|
||||
MogoMapUIController.getInstance()
|
||||
.stepInVrMode(false);
|
||||
}
|
||||
|
||||
@@ -71,7 +72,7 @@ public class SweeperProvider implements IMogoOCH {
|
||||
|
||||
private final IMogoStatusChangedListener statusChangedListener = (descriptor, isTrue) -> {
|
||||
if (descriptor == StatusDescriptor.VR_MODE) {
|
||||
// 进入vr模式默认显示网约车小巴fragment
|
||||
// 进入vr模式默认显示清扫车fragment
|
||||
if (isTrue) {
|
||||
showFragment();
|
||||
} else {
|
||||
|
||||
@@ -12,7 +12,6 @@ import android.widget.RelativeLayout;
|
||||
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
@@ -25,6 +24,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.listener.MogoMapListenerHandler;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
@@ -35,6 +35,10 @@ import com.mogo.och.sweeper.ui.SweeperOperatePanelView;
|
||||
import com.mogo.och.sweeper.view.SweeperTrafficDataView;
|
||||
import com.mogo.och.sweeper.view.SweeperWorkModeView;
|
||||
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
/**
|
||||
* 网约车基础Fragment,主要负责布局通用界面,处理站点面板和通话面板互斥情况
|
||||
* <p>
|
||||
@@ -75,14 +79,12 @@ public abstract class BaseSweeperTabFragment<V extends IView, P extends Presente
|
||||
groupTestPanel = findViewById(R.id.groupTestPanel);
|
||||
flTaskListPanelContainer = findViewById(R.id.module_mogo_och_task_list_container);
|
||||
mTrafficDataView = findViewById(R.id.sweeper_arc);
|
||||
panelView = LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flTaskListPanelContainer);
|
||||
|
||||
panelView = LayoutInflater.from(getContext()).inflate(getTaskListPanelViewId(), flTaskListPanelContainer);
|
||||
mSwitchMapModeLayout = findViewById(R.id.sweeper_switch_model_layout);
|
||||
mSwitchMapModeImage = findViewById(R.id.sweeper_switch_model_icon);
|
||||
mClWorkMode = findViewById(R.id.sweeper_cl_work_mode);
|
||||
mOperatePanel = findViewById(R.id.module_mogo_och_sweeper_operate_panel);
|
||||
updateSwitchMapIcon();
|
||||
|
||||
mSwitchMapModeLayout.setOnClickListener(new OnPreventFastClickListener() {
|
||||
|
||||
@Override
|
||||
@@ -194,7 +196,7 @@ public abstract class BaseSweeperTabFragment<V extends IView, P extends Presente
|
||||
*
|
||||
* @return 站点面板view
|
||||
*/
|
||||
public abstract int getStationPanelViewId();
|
||||
public abstract int getTaskListPanelViewId();
|
||||
|
||||
/**
|
||||
* 获取清扫车操作面板layout id
|
||||
|
||||
@@ -51,7 +51,7 @@ class SweeperFragment : BaseSweeperTabFragment<SweeperFragment?, SweeperPresente
|
||||
super.onResume()
|
||||
}
|
||||
|
||||
override fun getStationPanelViewId(): Int {
|
||||
override fun getTaskListPanelViewId(): Int {
|
||||
return R.layout.fragment_och_sweeper
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.mogo.och.sweeper.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.och.sweeper.R
|
||||
|
||||
/**
|
||||
* 清扫车任务操作菜单
|
||||
*/
|
||||
class SweeperTaskMenuView:ConstraintLayout {
|
||||
constructor(context: Context) : super(context)
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs){
|
||||
initView(context)
|
||||
}
|
||||
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
|
||||
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
|
||||
|
||||
private fun initView(context: Context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.sweeper_task_menu, this)
|
||||
}
|
||||
}
|
||||
16
OCH/mogo-och-sweeper/src/main/res/drawable/bg_bubble.xml
Normal file
16
OCH/mogo-och-sweeper/src/main/res/drawable/bg_bubble.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<rotate
|
||||
android:fromDegrees="-45"
|
||||
android:pivotX="85%"
|
||||
android:pivotY="-35%">
|
||||
<shape android:shape="rectangle">
|
||||
<size
|
||||
android:width="30dp"
|
||||
android:height="30dp" />
|
||||
<solid android:color="#2F6296"/>
|
||||
</shape>
|
||||
</rotate>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<gradient android:angle="270" android:startColor="#2F6296" android:endColor="#263A5B"/>
|
||||
<corners android:radius="@dimen/dp_16"/>
|
||||
</shape>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -20,7 +20,7 @@
|
||||
android:background="@drawable/bg_shape_work_mode"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/sweeper_arc"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="visible"/>
|
||||
<com.mogo.och.sweeper.view.SweeperCurrentTaskInfoView
|
||||
app:layout_constraintTop_toBottomOf="@+id/sweeper_cl_work_mode"
|
||||
android:layout_width="@dimen/dp_560"
|
||||
@@ -30,8 +30,15 @@
|
||||
android:layout_marginStart="@dimen/dp_41"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
/>
|
||||
<com.mogo.och.sweeper.view.SweeperTaskMenuView
|
||||
android:id="@+id/sweeper_task_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toEndOf="@+id/sweeper_cl_work_mode"
|
||||
app:layout_constraintTop_toBottomOf="@+id/sweeper_cl_work_mode"
|
||||
android:visibility="gone"/>
|
||||
<FrameLayout
|
||||
android:id="@+id/module_mogo_och_task_list_container"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -41,7 +48,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/sweeper_arc"
|
||||
app:layout_goneMarginTop="@dimen/module_mogo_och_station_panel_container_margin_top_no_call"
|
||||
app:layout_constraintBottom_toTopOf="@+id/sweeper_switch_model_layout"
|
||||
android:visibility="visible"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="@dimen/dp_30"/>
|
||||
<com.mogo.och.sweeper.ui.SweeperOperatePanelView
|
||||
android:id="@+id/module_mogo_och_sweeper_operate_panel"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/itemTaskView"
|
||||
android:paddingEnd="@dimen/dp_36">
|
||||
<TextView
|
||||
@@ -13,7 +14,7 @@
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="惠新西街南口地铁站"
|
||||
tools:text="惠新西街南口地铁站"
|
||||
android:layout_marginStart="@dimen/dp_38"
|
||||
android:layout_marginTop="@dimen/dp_21"/>
|
||||
<TextView
|
||||
@@ -24,7 +25,7 @@
|
||||
android:textColor="#A6CEFF"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskName"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:text="全程包含12个子任务"
|
||||
tools:text="全程包含12个子任务"
|
||||
android:layout_marginStart="@dimen/dp_38"
|
||||
android:layout_marginTop="1dp"/>
|
||||
<TextView
|
||||
@@ -34,7 +35,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="9:00"
|
||||
tools:text="9:00"
|
||||
android:textColor="@color/white"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_174"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_gravity="center"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
<ImageView
|
||||
android:id="@+id/ivTriangle"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:src="@drawable/bg_bubble"/>
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_task_menu"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivTriangle"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
<TextView
|
||||
android:id="@+id/tvTaskJumpOver"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivTriangle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="跳过"
|
||||
android:textColor="#A6CEFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_16"/>
|
||||
<View
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivTriangle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="#A6CEFF"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskJumpOver"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"/>
|
||||
<TextView
|
||||
android:id="@+id/tvTaskFinish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivTriangle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/line1"
|
||||
android:text="结束"
|
||||
android:textColor="#A6CEFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_16"/>
|
||||
<View
|
||||
android:id="@+id/line2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivTriangle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="#A6CEFF"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskFinish"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"/>
|
||||
<TextView
|
||||
android:id="@+id/tvTaskCancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivTriangle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/line2"
|
||||
android:text="结束"
|
||||
android:textColor="#A6CEFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_16"/>
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivTriangle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTaskCancel"/>
|
||||
<com.mogo.och.common.module.wigets.OCHShapeBlurView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:clickable="false"
|
||||
app:och_realtime_onece="true"
|
||||
app:och_realtime_end_color="#121526"
|
||||
app:och_realtime_radius="@dimen/dp_10"
|
||||
app:och_realtime_start_color="#121526"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user