diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java index c7f2778798..c6560e82f9 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseBusTabFragment.java @@ -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 //远景和中景的切换 private ImageView mSwitchMapModeImage; - private FrameLayout mSwitchMapModeLayout; - private TextView mSwitchText; + private LinearLayout mSwitchMapModeLayout; private ObjectAnimator autopilotLoadingAnimator; @@ -123,7 +123,7 @@ public abstract class BaseBusTabFragment 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 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 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(); } diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_angle.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_angle.png deleted file mode 100644 index 3e1b96f3e3..0000000000 Binary files a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_angle.png and /dev/null differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_long.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_long.png new file mode 100755 index 0000000000..cf3e5a3778 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_long.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_medium.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_medium.png new file mode 100755 index 0000000000..bdc2725468 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_switch_map_medium.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_angle.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_angle.png deleted file mode 100644 index 3e1b96f3e3..0000000000 Binary files a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_angle.png and /dev/null differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_long.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_long.png new file mode 100755 index 0000000000..cf3e5a3778 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_long.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_medium.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_medium.png new file mode 100755 index 0000000000..bdc2725468 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_switch_map_medium.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_angle.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_angle.png deleted file mode 100644 index 3e1b96f3e3..0000000000 Binary files a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_angle.png and /dev/null differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_long.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_long.png new file mode 100755 index 0000000000..cf3e5a3778 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_long.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_medium.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_medium.png new file mode 100644 index 0000000000..bdc2725468 Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_switch_map_medium.png differ diff --git a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml index 77d35e6207..6e5d9df0c7 100644 --- a/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml +++ b/OCH/mogo-och-bus/src/main/res/layout/bus_base_fragment.xml @@ -71,49 +71,28 @@ tools:visibility="visible" /> - - - - + android:layout_height="wrap_content" /> - + 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"/> + app:layout_constraintLeft_toRightOf="@id/bus_switch_model_layout"> diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java index 0df85304cf..56b8f488ef 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseTaxiTabFragment.java @@ -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 + android:layout_gravity="center" />