[2.11.0/1.6.0]bus司机端/乘客端动画调整,bus司机端语音播报调整
This commit is contained in:
@@ -146,7 +146,7 @@
|
||||
android:id="@+id/bus_p_line_stations_rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_280"
|
||||
android:layout_marginTop="@dimen/dp_260"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingLeft="@dimen/dp_30"
|
||||
android:paddingRight="@dimen/bus_p_route_info_margin_right"
|
||||
|
||||
@@ -111,7 +111,7 @@ public class BusLineModel {
|
||||
if (!NetworkUtils.isConnected(mContext)) {
|
||||
ToastUtils.showShort("网络异常,请稍后重试");
|
||||
}else {
|
||||
ToastUtils.showShort("切换路线失败:"+failMsg);
|
||||
ToastUtils.showShort("选择任务失败:"+failMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -591,7 +591,7 @@ public class BusOrderModel {
|
||||
return;
|
||||
}
|
||||
int arrivedStationIndex = backgroundCurrentStationIndex + 1;
|
||||
|
||||
String arriveStation = stationList.get(arrivedStationIndex).getName();
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"arriveSiteStation-currentStationIndex = "+ arrivedStationIndex);
|
||||
|
||||
BusServiceManager.getInstance().arriveSiteStation(mContext ,
|
||||
@@ -603,6 +603,11 @@ public class BusOrderModel {
|
||||
public void onSuccess(BaseData o) {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"arriveSiteStation success");
|
||||
queryBusRoutes();
|
||||
|
||||
ttsTips(String.format(mContext
|
||||
.getString(R.string.bus_arrived_station_tip),
|
||||
arriveStation));
|
||||
|
||||
//5s轮询核销乘客
|
||||
startOrStopQueryPassengerWriteOff(true);
|
||||
}
|
||||
@@ -728,7 +733,7 @@ public class BusOrderModel {
|
||||
}
|
||||
}
|
||||
|
||||
if (backgroundCurrentStationIndex == 0){ //默认是第一站到站查询
|
||||
if (backgroundCurrentStationIndex == 0 && stationList.get(0).getStatus() == STATION_STATUS_STOPPED){ //默认是第一站到站查询
|
||||
startOrStopQueryPassengerWriteOff(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +32,11 @@ class BusStationCommonItem @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
fun setStationPointBg(type: Int){ // 0:灰色 过站 1:绿色 到站或者即将到站 2:蓝色:未到站
|
||||
|
||||
BlinkAnimationUtil.clearAnimation(busCircleIv)
|
||||
|
||||
when(type){
|
||||
0 -> {
|
||||
BlinkAnimationUtil.clearAnimation(busCircleIv)
|
||||
busCircleIv.setImageResource(R.drawable.icon_point_grey_bus)
|
||||
|
||||
}
|
||||
@@ -43,7 +45,6 @@ class BusStationCommonItem @JvmOverloads constructor(
|
||||
BlinkAnimationUtil.setAnimation(busCircleIv)
|
||||
}
|
||||
2 -> {
|
||||
BlinkAnimationUtil.clearAnimation(busCircleIv)
|
||||
busCircleIv.setImageResource(R.drawable.icon_point_blue_bus)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,4 +41,6 @@
|
||||
<string name="bus_no_task_tip">暂无任务</string>
|
||||
<string name="bus_leave_station_tip">车辆起步,请扶稳坐好,前方到站是%1$s,请下车的乘客做好准备。</string>
|
||||
<string name="bus_end_task_tip">感谢您体验\'蘑菇车联\'无人驾驶小巴车,请您携带好随身物品,我们下次再见。</string>
|
||||
<string name="bus_arrived_station_tip">已到达%1$s站,带好随身物品,下车请注意安全。</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.och.common.module.utils;
|
||||
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.ImageView;
|
||||
|
||||
/**
|
||||
@@ -14,6 +13,7 @@ public class BlinkAnimationUtil {
|
||||
//实现图片闪烁效果
|
||||
public static void setAnimation(ImageView imageView) {
|
||||
AnimatorSet animationSet = new AnimatorSet();
|
||||
imageView.setTag(imageView.getId(),animationSet);
|
||||
|
||||
ObjectAnimator valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha",0f, 1.0f);
|
||||
ObjectAnimator valueAnimatorDisappare = ObjectAnimator.ofFloat(imageView, "alpha",1.0f, 0f);
|
||||
@@ -25,16 +25,14 @@ public class BlinkAnimationUtil {
|
||||
|
||||
animationSet.playTogether(valueAnimatorDisappare, valueAnimator);
|
||||
animationSet.start();
|
||||
|
||||
}
|
||||
|
||||
//消除动画
|
||||
public static void clearAnimation(ImageView imageView){
|
||||
Animation animation = imageView.getAnimation();
|
||||
if (animation != null){
|
||||
animation.cancel();
|
||||
Object animObject = imageView.getTag(imageView.getId());
|
||||
if (animObject instanceof AnimatorSet){
|
||||
AnimatorSet animatorSet = (AnimatorSet)animObject;
|
||||
animatorSet.cancel();
|
||||
}
|
||||
imageView.clearAnimation();
|
||||
imageView.setAnimation(null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user