This commit is contained in:
zhongchao
2021-04-09 11:49:54 +08:00
75 changed files with 667 additions and 461 deletions

View File

@@ -1332,9 +1332,9 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
public void onCarLocationChanged2(Location location) {
vrModeNavInfoView.refreshCurrentSpeed((int) (location.getSpeed() * 3.6F));
int speed = (int) (location.getSpeed() * 3.6F);
mouduleArc.setArcColor(Color.parseColor(speed > 40 ? "#DB3137" : "#3E77F6"));
mouduleArc.setArcColor(Color.parseColor(speed > 60 ? "#DB3137" : "#3E77F6"));
mouduleArc.setValues(speed);
flSpeed.setBackgroundResource(speed > 40 ? R.drawable.yi_biao_pan_bg_speeding : R.drawable.yi_biao_pan_bg_nor);
flSpeed.setBackgroundResource(speed > 60 ? R.drawable.yi_biao_pan_bg_speeding : R.drawable.yi_biao_pan_bg_nor);
}
@Override

View File

@@ -52,8 +52,7 @@ public class TopView extends FrameLayout {
originX = ev.getY();
} else if (ev.getAction() == MotionEvent.ACTION_MOVE) {
// 垂直滑动,事件拦截
return Math.abs(originY - ev.getY()) > ViewConfiguration.get(getContext()).getScaledTouchSlop()
||Math.abs(originX - ev.getX()) > ViewConfiguration.get(getContext()).getScaledTouchSlop();
return Math.abs(originY - ev.getY()) > ViewConfiguration.get(getContext()).getScaledTouchSlop();
}
return false;
}