[taxi/bus-d 270] bus/taxi 司机端和乘客端视角切换调整
@@ -11,6 +11,7 @@ import android.view.View;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -77,8 +78,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
|
||||
//远景和中景的切换
|
||||
private ImageView mSwitchMapModeImage;
|
||||
private FrameLayout mSwitchMapModeLayout;
|
||||
private TextView mSwitchText;
|
||||
private LinearLayout mSwitchMapModeLayout;
|
||||
|
||||
private ObjectAnimator autopilotLoadingAnimator;
|
||||
|
||||
@@ -123,7 +123,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
|
||||
mSwitchMapModeLayout = findViewById(R.id.bus_switch_model_layout);
|
||||
mSwitchMapModeImage = findViewById(R.id.bus_switch_model_icon);
|
||||
mSwitchText = findViewById(R.id.bus_switch_model_text);
|
||||
updateSwitchMapIcon();
|
||||
|
||||
mSwitchMapModeLayout.setOnClickListener(new OnPreventFastClickListener() {
|
||||
|
||||
@@ -133,11 +133,11 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchText.setText(R.string.bus_map_model_normal);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchText.setText(R.string.bus_map_model_faster);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -217,6 +217,14 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
CallerHmiManager.INSTANCE.registerUpgradeTipsCallback(() -> mUpgradeTipIv);
|
||||
}
|
||||
|
||||
private void updateSwitchMapIcon(){
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_long);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
}
|
||||
}
|
||||
|
||||
private void debugArrivedRoute() {
|
||||
BDRouteDataTestUtils.converToRouteData();
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 862 B |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_medium.png
Executable file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 862 B |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_medium.png
Executable file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 862 B |
BIN
OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
@@ -71,49 +71,28 @@
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!--切换地图远近事件 @dimen/module_switch_map -->
|
||||
<FrameLayout
|
||||
android:id="@+id/bus_switch_model_layout"
|
||||
android:layout_width="@dimen/bus_switch_map"
|
||||
android:layout_height="@dimen/bus_switch_map_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
android:background="@drawable/bus_switch_map_bg"
|
||||
android:elevation="@dimen/bus_dp_10"
|
||||
android:padding="@dimen/bus_dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bus_switch_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/bus_switch_model_layout"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:background="@drawable/bus_switch_map_bg"
|
||||
android:elevation="@dimen/bus_dp_10"
|
||||
android:padding="@dimen/bus_dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_mogo_och_operation_status"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_mogo_och_operation_status"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bus_switch_model_icon"
|
||||
android:layout_width="@dimen/bus_switch_image"
|
||||
android:layout_height="@dimen/bus_switch_image"
|
||||
android:paddingLeft="@dimen/bus_switch_margin_left"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:src="@drawable/bus_switch_map_angle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_switch_model_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/bus_switch_margin_left"
|
||||
android:textSize="@dimen/bus_switch_text_size"
|
||||
android:gravity="right|center"
|
||||
android:text="@string/bus_map_model_normal"
|
||||
android:textColor="@color/module_ext_color_voice_text" />
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
<CheckedTextView
|
||||
android:id="@+id/module_mogo_och_operation_status"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
android:layout_height="@dimen/module_mogo_och_operation_status_bg_height"
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:background="@drawable/bus_operation_status_bg"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
@@ -122,8 +101,10 @@
|
||||
android:textColor="@color/bus_autopilot_text_color_selector"
|
||||
android:textSize="@dimen/module_mogo_och_autopilot_status_text_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/bus_switch_model_layout"
|
||||
app:layout_constraintLeft_toRightOf="@+id/bus_switch_model_layout" />
|
||||
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_mogo_och_margin_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_mogo_och_setting_layout"
|
||||
@@ -134,7 +115,7 @@
|
||||
android:background="@drawable/bus_operation_status_bg"
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/module_mogo_och_operation_status">
|
||||
app:layout_constraintLeft_toRightOf="@id/bus_switch_model_layout">
|
||||
<ImageView
|
||||
android:id="@+id/module_och_bus_upgrade_red_tip"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -79,6 +79,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
CallerHmiManager.INSTANCE.setProxyNotificationView(mV2XNotificationView);
|
||||
|
||||
mMapswitchBtn = findViewById(R.id.module_och_taxi_swich_map_iv);
|
||||
updateSwitchMapIcon();
|
||||
initListener();
|
||||
|
||||
onAutopilotStatusChanged(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState());
|
||||
@@ -90,6 +91,13 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSwitchMapIcon(){
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
}
|
||||
}
|
||||
private void initListener(){
|
||||
mMapswitchBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -99,9 +107,11 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
.getCurrentMapVisualAngle().isLongSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_long);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -36,7 +36,7 @@
|
||||
android:layout_marginLeft="40px"
|
||||
android:layout_marginTop="40px"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:background="@drawable/taxi_p_switch_map_bg"
|
||||
android:background="@drawable/taxi_p_switch_map_medium"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.och.taxi.ui;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI;
|
||||
import static com.mogo.och.taxi.constant.TaxiConst.TIMER_START_AUTOPILOT_INTERVAL;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
@@ -68,6 +67,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
private ImageView mAutopilotImage;
|
||||
private TextView mAutopilotTv;
|
||||
private LinearLayout mMapswitchBtn;
|
||||
private ImageView mSwitchBtnIcon;
|
||||
private ImageView mCloseNaviIcon;
|
||||
protected LinearLayout mPersonalBtn;
|
||||
protected RelativeLayout mSettingBtn;
|
||||
@@ -120,6 +120,8 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
mDriverRole = findViewById(R.id.taxi_driver_role_tv);
|
||||
|
||||
mMapswitchBtn = findViewById(R.id.module_och_taxi_swich_map_layout);
|
||||
mSwitchBtnIcon = findViewById(R.id.taxi_switch_icon);
|
||||
updateSwitchMapIcon();
|
||||
mMapswitchBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -127,9 +129,11 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .visibleAllMarkers();
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()) .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_long);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -227,6 +231,14 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
|
||||
}
|
||||
|
||||
private void updateSwitchMapIcon(){
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()) {
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_long);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_switch_map_long.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_switch_map_medium.png
Executable file
|
After Width: | Height: | Size: 5.4 KiB |
@@ -177,10 +177,10 @@
|
||||
app:layout_constraintLeft_toRightOf="@id/module_och_taxi_setting_layout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/taxi_switch_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/taxi_switch_map_bg" />
|
||||
android:layout_gravity="center" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
|
||||