Merge branch 'dev_robotaxi-d-app-module_280_220608_2.8.0' into 'test_robotaxi-d-app-module_280_220608_2.8.0.1'
Dev robotaxi d app module 280 220608 2.8.0 See merge request zhjt/AndroidApp/MoGoEagleEye!42
@@ -50,7 +50,7 @@ public class BusTrajectoryManager {
|
||||
*/
|
||||
public void syncTrajectoryInfo() {
|
||||
BusRoutesResult routesResult = BusOrderModel.getInstance().getBusRoutesResult();
|
||||
if (routesResult != null
|
||||
if (BusOrderModel.getInstance().isWorking() && routesResult != null
|
||||
&& BusOrderModel.getInstance().getCurrentStationIndex() == 0
|
||||
&& !BusOrderModel.getInstance().isGoingToNextStation()) {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "syncTrajectoryInfo() start.");
|
||||
|
||||
@@ -331,7 +331,8 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
public void run() {
|
||||
mArrivedEndView.get().setDataAndStartAnimation(arrivedEndStation,orderNo);
|
||||
}
|
||||
},200);
|
||||
//如果在全屏 回收需要300毫秒 后期优化使用单独的播放器
|
||||
},500);
|
||||
}else {
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null){
|
||||
return;
|
||||
|
||||
@@ -172,6 +172,8 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
override fun onDetachedFromWindow() {
|
||||
svpFrame.setBackgroundResource(R.drawable.tail_ani_0000)
|
||||
svpFrame.setVideoAllCallBack(null)
|
||||
svpFrame.onVideoReset()
|
||||
svpFrame.release()
|
||||
tvFeel.text = ""
|
||||
rvCommentList.visibility = View.INVISIBLE
|
||||
btnSubmit.visibility = View.INVISIBLE
|
||||
|
||||
@@ -22,7 +22,12 @@ class CommentAdapter(private val context: Context?,private val itemDataList: Mut
|
||||
this.notifyDataSetChanged()
|
||||
}
|
||||
fun getSelectComment(): List<TaxiPassengerStarWorld> {
|
||||
return itemDataList.filter { it.isSelect }
|
||||
return itemDataList.filter {
|
||||
if(it.isSelect==null){
|
||||
it.isSelect = false
|
||||
}
|
||||
it.isSelect
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemCommentHolder {
|
||||
|
||||
@@ -165,7 +165,11 @@ object OverlayLeftViewUtils {
|
||||
* 打开状态栏
|
||||
*/
|
||||
private fun open(overlayView: View,windowManager: WindowManager?) {
|
||||
acivOpenClose?.setImageResource(R.drawable.ic_baseline_arrow_right_24)
|
||||
acivOpenClose?.apply {
|
||||
pivotX = (width /2).toFloat()
|
||||
pivotY = (height /2).toFloat()
|
||||
rotation = 0f
|
||||
}
|
||||
params?.x = 0
|
||||
windowManager?.updateViewLayout(overlayView, params)
|
||||
closeByTime(overlayView, windowManager)
|
||||
@@ -193,7 +197,11 @@ object OverlayLeftViewUtils {
|
||||
* 关闭状态栏
|
||||
*/
|
||||
private fun close(overlayView: View,windowManager: WindowManager?) {
|
||||
acivOpenClose?.setImageResource(R.drawable.ic_baseline_arrow_left_24)
|
||||
acivOpenClose?.apply {
|
||||
pivotX = (width /2).toFloat()
|
||||
pivotY = (height /2).toFloat()
|
||||
rotation = 180f
|
||||
}
|
||||
params?.x = DEVIATION_WIDTH
|
||||
windowManager?.updateViewLayout(overlayView, params)
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class TaxiPassengerMogoConsultView :RelativeLayout {
|
||||
indicatorView.setSlideMode(IndicatorSlideMode.SCALE)
|
||||
indicatorView.setOrientation(IndicatorOrientation.INDICATOR_HORIZONTAL)
|
||||
indicatorView.setIndicatorStyle(IndicatorStyle.ROUND_RECT)
|
||||
indicatorView.setSliderColor(Color.parseColor("#80FFFFFF"), Color.parseColor("#2972FF"))
|
||||
indicatorView.setSliderColor(Color.parseColor("#80FFFFFF"), Color.parseColor("#2972FF"),Color.parseColor("#27C8FF"))
|
||||
indicatorView.setSliderWidth(16f, 101f)
|
||||
indicatorView.setSliderHeight(16f)
|
||||
indicatorView.setSliderGap(30f)
|
||||
@@ -94,9 +94,7 @@ class TaxiPassengerMogoConsultView :RelativeLayout {
|
||||
}
|
||||
}
|
||||
val taxiPassengerVideoPlay = arrayListOf[centerItemPosition]
|
||||
if (player.getVideoAllCallBack()==null) {
|
||||
setBackageAndPlayNext(taxiPassengerVideoPlay, player, centerItemPosition)
|
||||
}
|
||||
setBackageAndPlayNext(taxiPassengerVideoPlay, player, centerItemPosition)
|
||||
}else{
|
||||
player.onVideoResume(false)
|
||||
}
|
||||
@@ -147,7 +145,7 @@ class TaxiPassengerMogoConsultView :RelativeLayout {
|
||||
.load(taxiPassengerVideoPlay.imageUrl)
|
||||
.apply(
|
||||
RequestOptions().transform(
|
||||
GlideBlurTransform(context, taxiPassengerVideoPlay.imageUrl, 5)
|
||||
GlideBlurTransform(context, taxiPassengerVideoPlay.imageUrl, 85)
|
||||
)
|
||||
)
|
||||
.into(object : SimpleTarget<Bitmap?>() {
|
||||
|
||||
@@ -58,10 +58,9 @@ class TaxiPassengerMogoMoviesView :RelativeLayout {
|
||||
clContain = findViewById(R.id.cl_contain)
|
||||
|
||||
val arrayListOf = ArrayList<TaxiPassengerVideoPlay>()
|
||||
arrayListOf.add(TaxiPassengerVideoPlay("https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v","https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969579713/三屏.png","重新排版"))
|
||||
arrayListOf.add(TaxiPassengerVideoPlay("https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v","https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png","大运会"))
|
||||
arrayListOf.add(TaxiPassengerVideoPlay("https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v","https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png","红旗车队"))
|
||||
arrayListOf.add(TaxiPassengerVideoPlay("https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v","https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969511280/车队.png","全车型混剪增加红旗车队"))
|
||||
arrayListOf.add(TaxiPassengerVideoPlay("https://img.zhidaohulian.com/fileServer/online_car_hailing/1656491288793/小宝宝.mov","https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969579713/三屏.png","小宝宝"))
|
||||
arrayListOf.add(TaxiPassengerVideoPlay("https://img.zhidaohulian.com/fileServer/online_car_hailing/1656491340951/小猫.mov","https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969536177/大运会.png","小猫"))
|
||||
arrayListOf.add(TaxiPassengerVideoPlay("https://img.zhidaohulian.com/fileServer/online_car_hailing/1656491369828/星空.mov","https://img.zhidaohulian.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png","星空"))
|
||||
val recyclerVideoAdapter = RecyclerVideoAdapter(context, arrayListOf)
|
||||
val carouselLayoutManager = CarouselLayoutManager(CarouselLayoutManager.HORIZONTAL, true)
|
||||
carouselLayoutManager.setPostLayoutListener(CarouselZoomPostLayoutListener ())
|
||||
@@ -70,9 +69,10 @@ class TaxiPassengerMogoMoviesView :RelativeLayout {
|
||||
indicatorView.setSlideMode(IndicatorSlideMode.SCALE)
|
||||
indicatorView.setOrientation(IndicatorOrientation.INDICATOR_HORIZONTAL)
|
||||
indicatorView.setIndicatorStyle(IndicatorStyle.ROUND_RECT)
|
||||
indicatorView.setSliderColor(Color.parseColor("#80FFFFFF"), Color.parseColor("#2972FF"))
|
||||
indicatorView.setSliderWidth(14f, 90f)
|
||||
indicatorView.setSliderHeight(14f)
|
||||
indicatorView.setSliderColor(Color.parseColor("#80FFFFFF"), Color.parseColor("#2972FF"),Color.parseColor("#27C8FF"))
|
||||
indicatorView.setSliderWidth(16f, 101f)
|
||||
indicatorView.setSliderHeight(16f)
|
||||
indicatorView.setSliderGap(30f)
|
||||
rvVideoPlaylist.addOnScrollListener(object: CenterScrollListener() {
|
||||
var prePlayerPosition = 0
|
||||
override fun pageSelect(recyclerView: RecyclerView?, newState: Int) {
|
||||
@@ -93,9 +93,7 @@ class TaxiPassengerMogoMoviesView :RelativeLayout {
|
||||
}
|
||||
}
|
||||
val taxiPassengerVideoPlay = arrayListOf[centerItemPosition]
|
||||
if (player.getVideoAllCallBack()==null) {
|
||||
setBackageAndPlayNext(taxiPassengerVideoPlay, player, centerItemPosition)
|
||||
}
|
||||
setBackageAndPlayNext(taxiPassengerVideoPlay, player, centerItemPosition)
|
||||
}else{
|
||||
player.onVideoResume(false)
|
||||
}
|
||||
@@ -146,11 +144,7 @@ class TaxiPassengerMogoMoviesView :RelativeLayout {
|
||||
.load(taxiPassengerVideoPlay.imageUrl)
|
||||
.apply(
|
||||
RequestOptions().transform(
|
||||
GlideBlurTransform(
|
||||
context,
|
||||
taxiPassengerVideoPlay.imageUrl,
|
||||
5
|
||||
)
|
||||
GlideBlurTransform(context, taxiPassengerVideoPlay.imageUrl, 85)
|
||||
)
|
||||
)
|
||||
.into(object : SimpleTarget<Bitmap?>() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.taxi.passenger.ui.video.layoutmanage;
|
||||
|
||||
import android.graphics.PointF;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Parcel;
|
||||
@@ -519,6 +520,11 @@ public class CarouselLayoutManager extends RecyclerView.LayoutManager implements
|
||||
Math.round(end + transformation.mTranslationX), Math.round(bottom + transformation.mTranslationY));
|
||||
view.setScaleX(transformation.mScaleX);
|
||||
view.setScaleY(transformation.mScaleY);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
view.setTransitionAlpha(transformation.mAlpha);
|
||||
}else {
|
||||
view.setAlpha(transformation.mAlpha);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,15 +33,10 @@ public class CarouselZoomPostLayoutListener extends CarouselLayoutManager.PostLa
|
||||
translateY = Math.signum(itemPositionToCenterDiff) * translateYGeneral;
|
||||
translateX = 0;
|
||||
} else {
|
||||
final float translateXGeneral = child.getMeasuredWidth() * (1 - scale) / 2f;
|
||||
final float translateXGeneral = (child.getMeasuredWidth()*0.9f) * (1 - scale) / 2f;
|
||||
translateX = Math.signum(itemPositionToCenterDiff) * translateXGeneral;
|
||||
translateY = 0;
|
||||
}
|
||||
if(Math.abs(itemPositionToCenterDiff)==1){
|
||||
if(child instanceof ConsultVideoPlayer){
|
||||
((ConsultVideoPlayer)child).hideAllWidget();
|
||||
}
|
||||
}
|
||||
return new ItemTransformation(scale, scale, translateX, translateY);
|
||||
return new ItemTransformation(scale,scale, scale, translateX, translateY);
|
||||
}
|
||||
}
|
||||
@@ -2,15 +2,17 @@ package com.mogo.och.taxi.passenger.ui.video.layoutmanage;
|
||||
|
||||
public class ItemTransformation {
|
||||
|
||||
final float mAlpha;
|
||||
final float mScaleX;
|
||||
final float mScaleY;
|
||||
final float mTranslationX;
|
||||
final float mTranslationY;
|
||||
|
||||
public ItemTransformation(final float scaleX, final float scaleY, final float translationX, final float translationY) {
|
||||
public ItemTransformation(final float alpha,final float scaleX, final float scaleY, final float translationX, final float translationY) {
|
||||
mScaleX = scaleX;
|
||||
mScaleY = scaleY;
|
||||
mTranslationX = translationX;
|
||||
mTranslationY = translationY;
|
||||
mAlpha = alpha;
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class GlideBlurTransform extends BitmapTransformation {
|
||||
if(lruBitmap!=null){
|
||||
return lruBitmap;
|
||||
}
|
||||
Bitmap bitmap = FastBlurUtil.doBlur( toTransform, 8, blurRadius );
|
||||
Bitmap bitmap = FastBlurUtil.doBlur( toTransform, 1, blurRadius );
|
||||
// 缓存高斯模糊图片
|
||||
DiskLruCacheManager.getInstance( context ).put( key, bitmap );
|
||||
return bitmap;
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.util.TypedValue
|
||||
import android.view.Gravity
|
||||
import android.view.Surface
|
||||
import android.view.View
|
||||
@@ -68,6 +69,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
mThumbImageViewLayout.visibility = View.VISIBLE
|
||||
}
|
||||
GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL)
|
||||
aivStartPlay.scaleX = 0.8f
|
||||
aivStartPlay.scaleY = 0.8f
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -87,13 +90,29 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onWindowFocusChanged(hasWindowFocus: Boolean) {
|
||||
super.onWindowFocusChanged(hasWindowFocus)
|
||||
if(isIfCurrentIsFullscreen&&smalllPlayer!=null){
|
||||
if(hasWindowFocus){//获取焦点
|
||||
onVideoResume()
|
||||
}else{
|
||||
onVideoPause()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun touchDoubleUp() {
|
||||
|
||||
}
|
||||
|
||||
override fun changeUiToNormal() {
|
||||
super.changeUiToNormal()
|
||||
setViewShowState(mTopContainer, INVISIBLE)
|
||||
setViewShowState(fullscreenButton, INVISIBLE)
|
||||
}
|
||||
|
||||
override fun changeUiToPlayingShow() {
|
||||
super.changeUiToPlayingShow()
|
||||
setViewShowState(fullscreenButton, VISIBLE)
|
||||
}
|
||||
|
||||
public override fun hideAllWidget() {
|
||||
@@ -202,7 +221,13 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
if(mIfCurrentIsFullscreen&&smalllPlayer!=null) {
|
||||
if(mTopContainer.marginTop==0) {
|
||||
val layoutParams = mTopContainer.layoutParams as ConstraintLayout.LayoutParams
|
||||
layoutParams.setMargins(0, getStatusBarHeight(), 0, 0)
|
||||
layoutParams.height = 336
|
||||
mTopContainer.layoutParams = layoutParams
|
||||
fullscreenButton.setPadding(80,0,80,0)
|
||||
titleTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 50f)
|
||||
titleTextView.setPadding(30,0,0,0)
|
||||
aivStartPlay.scaleX = 1f
|
||||
aivStartPlay.scaleY = 1f
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +262,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||
super.onSizeChanged(w, h, oldw, oldh)
|
||||
if (!mIfCurrentIsFullscreen) {
|
||||
this.outlineProvider = TextureVideoViewOutlineProvider(40F)
|
||||
this.outlineProvider = TextureVideoViewOutlineProvider(38F)
|
||||
this.clipToOutline = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,9 +150,10 @@ open class BaseIndicatorView constructor(
|
||||
|
||||
fun setSliderColor(
|
||||
@ColorInt normalColor: Int,
|
||||
@ColorInt selectedColor: Int
|
||||
@ColorInt selectedColor: Int,
|
||||
@ColorInt selectedEndColor: Int
|
||||
): BaseIndicatorView {
|
||||
mIndicatorOptions.setSliderColor(normalColor, selectedColor)
|
||||
mIndicatorOptions.setSliderColor(normalColor, selectedColor,selectedEndColor)
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
(i * normalWidth + i * indicatorGap)
|
||||
}
|
||||
mRectF.set(left, 0f, left + normalWidth, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight,mRectF.width()>checkedWidth/2)
|
||||
}
|
||||
i == currentPosition -> {
|
||||
mPaint.color = checkedColor
|
||||
@@ -68,7 +68,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
(mIndicatorOptions.pageSize - 1) * (normalWidth + mIndicatorOptions.sliderGap) + checkedWidth
|
||||
val left = right - checkedWidth + (checkedWidth - normalWidth) * (slideProgress)
|
||||
mRectF.set(left, 0f, right, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight,mRectF.width()>checkedWidth/2)
|
||||
} else {
|
||||
if (slideProgress < 1) {
|
||||
val evaluate = argbEvaluator?.evaluate(
|
||||
@@ -78,7 +78,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
val left = i * normalWidth + i * indicatorGap
|
||||
val right = left + normalWidth + (checkedWidth - normalWidth) * (1 - slideProgress)
|
||||
mRectF.set(left, 0f, right, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight,mRectF.width()>checkedWidth/2)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
val right = left + normalWidth + (checkedWidth - normalWidth) * slideProgress
|
||||
|
||||
mRectF.set(left, 0f, right, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight,mRectF.width()>checkedWidth/2)
|
||||
}
|
||||
} else {
|
||||
if (slideProgress > 0) {
|
||||
@@ -104,7 +104,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
i * normalWidth + i * indicatorGap + normalWidth + (indicatorGap + checkedWidth)
|
||||
val left = right - (normalWidth) - (checkedWidth - normalWidth) * (slideProgress)
|
||||
mRectF.set(left, 0f, right, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight,mRectF.width()>checkedWidth/2)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
mPaint.color = mIndicatorOptions.normalSliderColor
|
||||
val left = i * minWidth + i * indicatorGap + (checkedWidth - minWidth)
|
||||
mRectF.set(left, 0f, left + minWidth, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight,false)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
mPaint.color = mIndicatorOptions.normalSliderColor
|
||||
val left = i * maxWidth + i * +mIndicatorOptions.sliderGap + (maxWidth - minWidth)
|
||||
mRectF.set(left, 0f, left + minWidth, mIndicatorOptions.sliderHeight)
|
||||
drawRoundRect(canvas, mIndicatorOptions.sliderHeight, mIndicatorOptions.sliderHeight)
|
||||
drawRoundRect(canvas, mIndicatorOptions.sliderHeight, mIndicatorOptions.sliderHeight,false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
mPaint.color =
|
||||
if (i == mIndicatorOptions.currentPosition) mIndicatorOptions.checkedSliderColor else mIndicatorOptions.normalSliderColor
|
||||
mRectF.set(left, 0f, left + sliderWidth, mIndicatorOptions.sliderHeight)
|
||||
drawRoundRect(canvas, mIndicatorOptions.sliderHeight, mIndicatorOptions.sliderHeight)
|
||||
drawRoundRect(canvas, mIndicatorOptions.sliderHeight, mIndicatorOptions.sliderHeight,false)
|
||||
left += sliderWidth + mIndicatorOptions.sliderGap
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
)
|
||||
mPaint.color = (evaluate as Int)
|
||||
mRectF.set(left, 0f, left + minWidth, mIndicatorOptions.sliderHeight)
|
||||
drawRoundRect(canvas, mIndicatorOptions.sliderHeight, mIndicatorOptions.sliderHeight)
|
||||
drawRoundRect(canvas, mIndicatorOptions.sliderHeight, mIndicatorOptions.sliderHeight,false)
|
||||
}
|
||||
|
||||
var nextSliderLeft = left + mIndicatorOptions.sliderGap + mIndicatorOptions.normalSliderWidth
|
||||
@@ -177,7 +177,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
)
|
||||
mPaint.color = evaluate as Int
|
||||
mRectF.set(nextSliderLeft, 0f, nextSliderLeft + minWidth, mIndicatorOptions.sliderHeight)
|
||||
drawRoundRect(canvas, mIndicatorOptions.sliderHeight, mIndicatorOptions.sliderHeight)
|
||||
drawRoundRect(canvas, mIndicatorOptions.sliderHeight, mIndicatorOptions.sliderHeight,false)
|
||||
}
|
||||
|
||||
private fun drawWormSlider(canvas: Canvas) {
|
||||
@@ -194,7 +194,7 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
distance
|
||||
) + mIndicatorOptions.normalSliderWidth / 2
|
||||
mRectF.set(left, 0f, right, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight,false)
|
||||
}
|
||||
|
||||
private fun drawSmoothSlider(canvas: Canvas) {
|
||||
@@ -204,13 +204,14 @@ open class RectDrawer internal constructor(indicatorOptions: IndicatorOptions) :
|
||||
val left =
|
||||
currentPosition * maxWidth + currentPosition * +indicatorGap + (maxWidth + indicatorGap) * mIndicatorOptions.slideProgress
|
||||
mRectF.set(left, 0f, left + maxWidth, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight)
|
||||
drawRoundRect(canvas, sliderHeight, sliderHeight,false)
|
||||
}
|
||||
|
||||
protected open fun drawRoundRect(
|
||||
canvas: Canvas,
|
||||
rx: Float,
|
||||
ry: Float
|
||||
ry: Float,
|
||||
isWidth:Boolean
|
||||
) {
|
||||
drawDash(canvas)
|
||||
}
|
||||
|
||||
@@ -1,24 +1,39 @@
|
||||
package com.mogo.och.taxi.passenger.widget.indicator.drawer
|
||||
|
||||
import android.graphics.Canvas
|
||||
|
||||
import android.graphics.Color
|
||||
import android.graphics.LinearGradient
|
||||
import android.graphics.Shader
|
||||
import com.mogo.och.taxi.passenger.widget.indicator.option.IndicatorOptions
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Created by zhpan on 2019/11/26.
|
||||
* Description:
|
||||
</pre> *
|
||||
*/
|
||||
class RoundRectDrawer internal constructor(indicatorOptions: IndicatorOptions) : RectDrawer(
|
||||
class RoundRectDrawer internal constructor(val indicatorOptions: IndicatorOptions) : RectDrawer(
|
||||
indicatorOptions
|
||||
) {
|
||||
|
||||
override fun drawRoundRect(
|
||||
canvas: Canvas,
|
||||
rx: Float,
|
||||
ry: Float
|
||||
) {
|
||||
override fun drawRoundRect(canvas: Canvas, rx: Float, ry: Float, isWidth: Boolean) {
|
||||
if(isWidth) {
|
||||
val linearGradient =
|
||||
LinearGradient(
|
||||
mRectF.left,
|
||||
(mRectF.bottom - mRectF.top) / 2,
|
||||
mRectF.right,
|
||||
(mRectF.bottom - mRectF.top) / 2,
|
||||
indicatorOptions.checkedSliderColor,
|
||||
indicatorOptions.checkedEndSliderColor,
|
||||
Shader.TileMode.CLAMP
|
||||
)
|
||||
mPaint.shader = linearGradient
|
||||
}else{
|
||||
mPaint.color = indicatorOptions.normalSliderColor
|
||||
mPaint.shader = null
|
||||
}
|
||||
canvas.drawRoundRect(mRectF, rx, ry, mPaint)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,10 @@ class IndicatorOptions {
|
||||
* 选中时Indicator颜色
|
||||
*/
|
||||
var checkedSliderColor: Int = 0
|
||||
/**
|
||||
* 选中时IndicatorEnd颜色
|
||||
*/
|
||||
var checkedEndSliderColor: Int = 0
|
||||
|
||||
/**
|
||||
* Indicator间距
|
||||
@@ -100,9 +104,11 @@ class IndicatorOptions {
|
||||
|
||||
fun setSliderColor(
|
||||
normalColor: Int,
|
||||
checkedColor: Int
|
||||
checkedColor: Int,
|
||||
selectedEndColor: Int
|
||||
) {
|
||||
this.normalSliderColor = normalColor
|
||||
this.checkedSliderColor = checkedColor
|
||||
this.checkedEndSliderColor = selectedEndColor
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 901 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 939 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi-2560x1440/taxi_p_mogo_consult_select.png
Executable file → Normal file
|
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 188 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi-2560x1440/taxi_p_mogo_consult_selected.png
Executable file → Normal file
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 186 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi-2560x1440/taxi_p_mogo_consult_title_icon.png
Executable file → Normal file
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi-2560x1440/taxi_p_mogo_entertainment_select.png
Executable file → Normal file
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 181 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi-2560x1440/taxi_p_mogo_entertainment_selected.png
Executable file → Normal file
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 178 KiB |
|
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 186 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi-2560x1440/taxi_p_mogo_live_selected.png
Executable file → Normal file
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 187 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi-2560x1440/taxi_p_mogo_overview_selected.png
Executable file → Normal file
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 183 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi-2560x1440/taxi_p_mogo_video_play.png
Executable file → Normal file
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 901 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 1.3 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_p_left_flow_bg.png
Normal file → Executable file
|
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 939 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_p_mogo_consult_select.png
Executable file → Normal file
|
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 188 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_p_mogo_consult_selected.png
Executable file → Normal file
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 186 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_p_mogo_consult_title_icon.png
Executable file → Normal file
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_p_mogo_entertainment_select.png
Executable file → Normal file
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 181 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_p_mogo_entertainment_selected.png
Executable file → Normal file
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 178 KiB |
|
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 186 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_p_mogo_live_selected.png
Executable file → Normal file
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 187 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_p_mogo_overview_selected.png
Executable file → Normal file
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 183 KiB |
BIN
OCH/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_p_mogo_video_play.png
Executable file → Normal file
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
@@ -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:endColor="#a3000000" android:startColor="#00000000" android:angle="90"/>
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -16,11 +16,11 @@
|
||||
</clip>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape>
|
||||
<corners android:radius="5px"/>
|
||||
<gradient android:startColor="#2972FF" android:endColor="#27C8FF"/>
|
||||
</shape>
|
||||
</clip>
|
||||
</scale>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="@drawable/taxi_p_video_shadow11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:background="@drawable/taxi_p_video_shadow"
|
||||
android:layout_width="2056px"
|
||||
android:layout_height="1294px">
|
||||
|
||||
<com.mogo.och.taxi.passenger.widget.ConsultVideoPlayer
|
||||
android:id="@+id/video_item_player"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="1734px"
|
||||
android:layout_height="973px" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="143px"
|
||||
android:layout_width="1740px"
|
||||
android:layout_height="978px" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@@ -28,9 +28,10 @@
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_title_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_title_icon"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_title_icon"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:text="蘑菇资讯"
|
||||
android:textStyle="bold"
|
||||
android:textSize="60px"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
@@ -40,8 +41,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1294px"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="156px"
|
||||
android:layout_marginEnd="156px"
|
||||
android:layout_marginTop="-40px"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_mogo_consult"/>
|
||||
@@ -53,7 +53,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="132px"
|
||||
android:layout_marginBottom="172px"
|
||||
app:vpi_orientation="horizontal"
|
||||
app:vpi_slide_mode="scale"
|
||||
app:vpi_slider_checked_color="@color/taxi_p_traffic_light_red_color_up"
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
android:background="@color/cardview_dark_background"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<View
|
||||
android:background="#4C000000"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_title_icon"
|
||||
android:src="@drawable/taxi_p_mogo_movies_title_icon"
|
||||
@@ -23,9 +29,10 @@
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_title_icon"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_title_icon"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_title_icon"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:text="影视娱乐"
|
||||
android:textStyle="bold"
|
||||
android:textSize="60px"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/taxi_order_status_textColor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
@@ -33,11 +40,9 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_video_playlist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="973px"
|
||||
android:layout_height="1294px"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_130"
|
||||
android:layout_marginStart="156px"
|
||||
android:layout_marginEnd="156px"
|
||||
android:layout_marginTop="-40px"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_mogo_consult"/>
|
||||
@@ -48,8 +53,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_video_playlist"
|
||||
android:layout_marginTop="95px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="172px"
|
||||
app:vpi_orientation="horizontal"
|
||||
app:vpi_slide_mode="scale"
|
||||
app:vpi_slider_checked_color="@color/taxi_p_traffic_light_red_color_up"
|
||||
|
||||
@@ -15,12 +15,13 @@
|
||||
android:id="@+id/thumb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/thumbImage"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true" />
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="fitXY" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
@@ -37,15 +38,17 @@
|
||||
android:id="@+id/layout_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="158px"
|
||||
android:background="@drawable/bg_taxi_p_video_bg_top"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fullscreen"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:padding="40px"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingEnd="40px"
|
||||
android:paddingStart="93px"
|
||||
android:src="@drawable/taxi_p_change_full" />
|
||||
|
||||
<TextView
|
||||
@@ -74,7 +77,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/total"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/total"
|
||||
android:layout_marginStart="35px"
|
||||
android:layout_marginStart="55px"
|
||||
android:layout_width="@dimen/notice_play_height"
|
||||
android:layout_height="@dimen/notice_play_height"
|
||||
android:src="@drawable/notice_video_pause" />
|
||||
@@ -103,8 +106,8 @@
|
||||
app:layout_constraintTop_toTopOf="@+id/total"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/total"
|
||||
android:max="100"
|
||||
android:maxHeight="10px"
|
||||
android:minHeight="10px"
|
||||
android:maxHeight="4px"
|
||||
android:minHeight="4px"
|
||||
android:progressDrawable="@drawable/taxi_video_seekbar_style"
|
||||
android:thumb="@drawable/bg_taxi_p_video_index" />
|
||||
|
||||
@@ -117,8 +120,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="64px"
|
||||
android:gravity="bottom"
|
||||
android:text="08:66"
|
||||
android:layout_marginEnd="47px"
|
||||
android:layout_marginEnd="55px"
|
||||
android:textSize="36px"
|
||||
android:textColor="@android:color/white"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:paddingTop="153px"
|
||||
android:layout_marginEnd="143px"
|
||||
android:divider="@null"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/v_drag_field"
|
||||
@@ -30,10 +31,11 @@
|
||||
android:layout_height="408px">
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_open_close"
|
||||
android:layout_marginStart="4px"
|
||||
android:src="@drawable/ic_baseline_arrow_right_24"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_marginStart="14px"
|
||||
android:src="@drawable/ic_baseline_arrow"
|
||||
android:rotation="180"
|
||||
android:layout_width="25px"
|
||||
android:layout_height="33px"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout >
|
||||
|
||||
@@ -253,6 +253,7 @@ dependencies {
|
||||
androidTestImplementation project(':core:mogo-core-function-call')
|
||||
androidTestImplementation project(':core:mogo-core-res')
|
||||
androidTestImplementation project(':core:function-impl:mogo-core-function-notice')
|
||||
|
||||
}
|
||||
|
||||
apply from: "./functions/och.gradle"
|
||||
@@ -263,6 +264,7 @@ dependencies {
|
||||
androidTestImplementation rootProject.ext.dependencies.androidx_unit_ext_ktx
|
||||
androidTestImplementation rootProject.ext.dependencies.androidx_runner
|
||||
androidTestImplementation rootProject.ext.dependencies.androidx_espresso_core
|
||||
androidTestImplementation rootProject.ext.dependencies.localbroadcastmanager
|
||||
}
|
||||
|
||||
if (!isAndroidTestBuild()) {
|
||||
|
||||
@@ -56,6 +56,12 @@ android {
|
||||
}
|
||||
|
||||
}
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
// Or, if you prefer, you can continue to check for errors in release builds,
|
||||
// but continue the build even when errors are found:
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -16,7 +16,6 @@ import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.function.Consumer
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -168,11 +167,11 @@ class IdentifyOriginDataDrawer : Identify, IMoGoAutopilotStatusListener {
|
||||
data.toBuilder().setHeading(cacheData.heading).setLongitude(cacheData.longitude)
|
||||
.setLatitude(cacheData.latitude).build()
|
||||
}
|
||||
mFilterTrafficData.add(data)
|
||||
//更新已存在的感知物体数据
|
||||
}
|
||||
mMarkersCaches[uuid] = data
|
||||
trafficDataUuidList.add(uuid)
|
||||
mFilterTrafficData.add(data)
|
||||
//更新已存在的感知物体数据
|
||||
}
|
||||
return mFilterTrafficData
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.IntentFilter
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.provider.Settings.System
|
||||
import android.util.*
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
@@ -102,6 +103,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
V2XManager.init(V2XConfig.Builder().also {
|
||||
it.aiCloudConfig(MoGoAiCloudClientConfig.getInstance())
|
||||
it.context(context)
|
||||
it.loggable(true)
|
||||
it.distanceForTriggerRefresh(200f) //行驶超过200(包含)米,刷新道路周边信息(短链请求)
|
||||
it.durationForTriggerRefresh(
|
||||
60,
|
||||
@@ -152,7 +154,6 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
BridgeApi.registerCenter()?.let {
|
||||
it.unregisterMogoMapListener(MODULE_NAME)
|
||||
it.unregisterMogoMarkerClickListener(ModuleNames.CARD_TYPE_ROAD_CONDITION)
|
||||
it.unregisterMogoMarkerClickListener(MODULE_NAME)
|
||||
}
|
||||
BridgeApi.statusManager()?.let {
|
||||
it.unregisterStatusChangedListener(MODULE_NAME, ACC_STATUS, this)
|
||||
@@ -431,7 +432,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
* V2XEvent事件回调
|
||||
*/
|
||||
override fun onAck(event: V2XEvent) {
|
||||
CallerLogger.d("$M_V2X$TAG", "OK->: $event")
|
||||
Log.d("$M_V2X$TAG", "OK->: $event")
|
||||
when (event) {
|
||||
is V2XEvent.ForwardsWarning -> {
|
||||
handleAdvanceWarningEvent(event)
|
||||
@@ -465,6 +466,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
l3.location = V2XMarkerLocation().also { l4 ->
|
||||
l4.lat = this.roadwork?.center?.point?.lat ?: 0.0
|
||||
l4.lon = this.roadwork?.center?.point?.lon ?: 0.0
|
||||
l4.angle = this.roadwork?.center?.road?.bearing?.toDouble() ?: 0.0
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -48,8 +48,7 @@ public class V2XAlarmServer {
|
||||
// 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告
|
||||
for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) {
|
||||
// 0、道路事件必须有朝向,角度>=0;
|
||||
boolean ignoreAngle = EventTypeEnum.AI_ROAD_WORK.getPoiType().equals(v2XRoadEventEntity.getPoiType());
|
||||
if (v2XRoadEventEntity.getLocation().getAngle() >= 0 || ignoreAngle) {
|
||||
if (v2XRoadEventEntity.getLocation().getAngle() >= 0) {
|
||||
// 计算车辆距离指定气泡的距离
|
||||
MarkerLocation eventLocation = v2XRoadEventEntity.getLocation();
|
||||
// 1、判断是否到达了触发距离,20 ~ 500,
|
||||
@@ -64,7 +63,7 @@ public class V2XAlarmServer {
|
||||
double carBearing = currentLocation.getBearing();
|
||||
double eventBearing = eventLocation.getAngle();
|
||||
double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing);
|
||||
if (ignoreAngle || diffAngle < 20) {
|
||||
if (diffAngle < 20) {
|
||||
// 3、计算当前车辆行驶方向与事件位置之间夹角《20度,保证道路事件在车辆前方
|
||||
double eventAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
|
||||
currentLocation.getLongitude(),
|
||||
@@ -73,7 +72,7 @@ public class V2XAlarmServer {
|
||||
eventLocation.getLat(),
|
||||
(int) currentLocation.getBearing()
|
||||
);
|
||||
if (ignoreAngle || 0 <= eventAngle && eventAngle <= 20) {
|
||||
if (0 <= eventAngle && eventAngle <= 20) {
|
||||
// 判断是否已经提示过道路事件
|
||||
boolean isAlreadyAlert = false;
|
||||
String lastTime = mAlertRoadEventList.get(v2XRoadEventEntity);
|
||||
|
||||
@@ -6,13 +6,13 @@ import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
@@ -41,7 +41,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
@Override
|
||||
public void init(V2XMessageEntity<V2XRoadEventEntity> v2XMessageEntity) {
|
||||
try {
|
||||
CallerLogger.INSTANCE.d(M_V2X + TAG, "v2XMessageEntity:" + GsonUtil.jsonFromObject(v2XMessageEntity));
|
||||
Logger.d(M_V2X + TAG, "v2XMessageEntity:" + GsonUtil.jsonFromObject(v2XMessageEntity));
|
||||
V2XRoadEventEntity v2XRoadEventEntity = v2XMessageEntity.getContent();
|
||||
if (v2XRoadEventEntity != null) {
|
||||
if (v2XMessageEntity.isShowState()) {
|
||||
|
||||
@@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.4.3.7
|
||||
MOGO_TELEMATIC_VERSION=1.4.3.7
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.3.0.7
|
||||
MAP_SDK_VERSION=2.3.0.8
|
||||
MAP_SDK_OPERATION_VERSION=1.0.13
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
|
||||
@@ -113,8 +113,7 @@ public class AMapWrapper implements IMogoMap {
|
||||
}
|
||||
markerOptionsArrayList.add(markerOptions);
|
||||
}
|
||||
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList,false,8.0f,0,100);
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList,false,8.0f,0,100,0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -742,6 +742,7 @@ enum class EventTypeEnum(
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.poiTypeSrcVr
|
||||
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.poiTypeSrcVr
|
||||
GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeSrcVr
|
||||
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeSrcVr
|
||||
else -> TYPE_ERROR.poiTypeSrcVr
|
||||
}
|
||||
}
|
||||
|
||||