diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseOchBusTabFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseOchBusTabFragment.java index 849925cefb..ae2a9c920b 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseOchBusTabFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BaseOchBusTabFragment.java @@ -39,6 +39,7 @@ import com.mogo.module.common.MogoApisHandler; import com.mogo.module.common.constants.DataTypes; import com.mogo.module.common.view.OnPreventFastClickListener; import com.mogo.och.bus.R; +import com.mogo.och.bus.ui.BusTrafficLightView; import com.mogo.och.bus.view.BusArcView; import com.mogo.och.bus.view.SlidePanelView; @@ -69,6 +70,7 @@ public abstract class BaseOchBusTabFragment { + mCurrentLightId = 0; + BusTrafficLightView.this.setVisibility(GONE); + }); + } + + /** + * @param redNum 红灯倒计时 + * @param yellowNum 黄灯倒计时 + * @param greenNum 绿灯倒计时 + */ + @Override + public void changeCountdownTrafficLightNum(int redNum, int yellowNum, int greenNum) { + super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum); + switch (mCurrentLightId) { + case 1: + changeCountdownRed(redNum); + break; + case 2: + changeCountdownYellow(yellowNum); + break; + case 3: + changeCountdownGreen(greenNum); + break; + default: + UiThreadHandler.post(() -> { + mLightTimeTV.setText(""); + }); + break; + } + } + + @Override + public void changeCountdownRed(int redNum) { + super.changeCountdownRed(redNum); + UiThreadHandler.post(() -> { + if (redNum > 0) { + mLightTimeTV.setVertrial(true); + mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_traffic_light_red_color_up), + getResources().getColor(R.color.bus_traffic_light_red_color_down)}); + mLightTimeTV.setText(String.valueOf(redNum)); + } else { + mLightTimeTV.setText(""); + } + }); + } + + @Override + public void changeCountdownGreen(int greenNum) { + super.changeCountdownGreen(greenNum); + UiThreadHandler.post(() -> { + if (greenNum > 0) { + mLightTimeTV.setVertrial(true); + mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_traffic_light_green_color_up), + getResources().getColor(R.color.bus_traffic_light_green_color_down)}); + mLightTimeTV.setText(String.valueOf(greenNum)); + } else { + mLightTimeTV.setText(""); + } + }); + } + + @Override + public void changeCountdownYellow(int yellowNum) { + super.changeCountdownYellow(yellowNum); + UiThreadHandler.post(() -> { + if (yellowNum > 0) { + mLightTimeTV.setVertrial(true); + mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_traffic_light_yellow_color_up), + getResources().getColor(R.color.bus_traffic_light_yellow_color_down)}); + mLightTimeTV.setText(String.valueOf(yellowNum)); + } else { + mLightTimeTV.setText(""); + } + }); + } + + /** + * 更新红绿灯icon + * + * @param lightId 0-都是默认,1-红,2-黄,3-绿 + */ + private void updateTrafficLightIcon(int lightId) { + UiThreadHandler.post(() -> { + switch (lightId) { + case 1: + mLightIconIV.setBackgroundResource(R.drawable.bus_light_red_nor); + BusTrafficLightView.this.setVisibility(VISIBLE); + break; + case 2: + mLightIconIV.setBackgroundResource(R.drawable.bus_lightyellow_nor); + BusTrafficLightView.this.setVisibility(VISIBLE); + break; + case 3: + mLightIconIV.setBackgroundResource(R.drawable.bus_light_green_nor); + BusTrafficLightView.this.setVisibility(VISIBLE); + break; + default: + BusTrafficLightView.this.setVisibility(GONE); + break; + } + }); + } +} diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/GradientTextView.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/GradientTextView.java new file mode 100644 index 0000000000..c93f1c1475 --- /dev/null +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/GradientTextView.java @@ -0,0 +1,113 @@ +package com.mogo.och.bus.ui; + +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.LinearGradient; +import android.graphics.Paint; +import android.graphics.Rect; +import android.graphics.Shader; +import android.util.AttributeSet; + +import androidx.appcompat.widget.AppCompatTextView; + +/** + * @author: wangmingjun + * @date: 2022/3/22 + */ +public class GradientTextView extends AppCompatTextView { + + private LinearGradient mLinearGradient; + private Paint mPaint; + private int mViewWidth = 0;//文字的宽度 + private int mViewHeight = 0;//文字的高度 + private Rect mTextBound = new Rect(); + private int[] mColorList;//存放颜色的数组 + private boolean isVertrial;//默认是横向 + + private float mRadius; + private float mdx; + private float mdy; + private int mColor; + + public GradientTextView(Context context) { + this(context, null); + } + + public GradientTextView(Context context, + AttributeSet attrs) { + super(context, attrs); + //设置默认的颜色 + mColorList = new int[]{0xFFFFFFFF, 0xFFFFFFF}; + } + + + @Override + protected void onDraw(Canvas canvas) { + + if (isVertrial) { + mViewHeight = getMeasuredHeight(); + } else { + mViewWidth = getMeasuredWidth(); + } + mPaint = getPaint(); + String mTipText = getText().toString(); + + setStyle(); + + mPaint.getTextBounds(mTipText, 0, mTipText.length(), mTextBound); + + mPaint.setShadowLayer(mRadius, mdx, mdy, mColor); + + //画出文字 + canvas.drawText(mTipText, getMeasuredWidth() / 2 - mTextBound.width() / 2, getMeasuredHeight() / 2 + mTextBound.height() / 2, mPaint); + } + + /** + * true表示纵向渐变,false变身横向渐变 + * + * @param vertrial + */ + public void setVertrial(boolean vertrial) { + isVertrial = vertrial; + } + + /** + * 设置渐变的颜色 + * + * @param mColorList + */ + public void setmColorList(int[] mColorList) { + if (mColorList != null && mColorList.length < 2) { + throw new RuntimeException("ClorList's length must be > 2"); + } else { + + this.mColorList = mColorList; + } + } + + public void setStyle() { + mPaint.setAntiAlias(true); + mPaint.setDither(true); + mPaint.setFilterBitmap(true); + //前面4个参数分别表示渐变的开始x轴,开始y轴,结束的x轴,结束的y轴,mcolorList表示渐变的颜色数组 + mLinearGradient = new LinearGradient(0, 0, mViewWidth, mViewHeight, mColorList, null, Shader.TileMode.CLAMP); + mPaint.setShader(mLinearGradient); + mPaint.setStrokeJoin(Paint.Join.ROUND); + mPaint.setStrokeCap(Paint.Cap.ROUND); + mPaint.setStyle(Paint.Style.FILL_AND_STROKE); + } + + /** + * 设置投影层 + * @param radius + * @param dx + * @param dy + * @param color + */ + public void setShadowLayerCustom(float radius, float dx, float dy, int color) { + this.mRadius = radius; + this.mdx = dx; + this.mdy = dy; + this.mColor = color; + } +} diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_light_green_nor.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_light_green_nor.png new file mode 100644 index 0000000000..bc9fed952d Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_light_green_nor.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_light_red_nor.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_light_red_nor.png new file mode 100644 index 0000000000..8732508ded Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_light_red_nor.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_lightyellow_nor.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_lightyellow_nor.png new file mode 100644 index 0000000000..bae01408fd Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1440/bus_lightyellow_nor.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_light_green_nor.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_light_green_nor.png new file mode 100644 index 0000000000..bc9fed952d Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_light_green_nor.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_light_red_nor.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_light_red_nor.png new file mode 100644 index 0000000000..8732508ded Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_light_red_nor.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_lightyellow_nor.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_lightyellow_nor.png new file mode 100644 index 0000000000..bae01408fd Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi-2560x1600/bus_lightyellow_nor.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_light_green_nor.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_light_green_nor.png new file mode 100644 index 0000000000..bc9fed952d Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_light_green_nor.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_light_red_nor.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_light_red_nor.png new file mode 100644 index 0000000000..8732508ded Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_light_red_nor.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_lightyellow_nor.png b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_lightyellow_nor.png new file mode 100644 index 0000000000..bae01408fd Binary files /dev/null and b/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/bus_lightyellow_nor.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable/bg_bus_traffic_light_background.xml b/OCH/mogo-och-bus/src/main/res/drawable/bg_bus_traffic_light_background.xml new file mode 100644 index 0000000000..e0b90b9c55 --- /dev/null +++ b/OCH/mogo-och-bus/src/main/res/drawable/bg_bus_traffic_light_background.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file 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 7cf9966090..611be76c84 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 @@ -230,4 +230,13 @@ app:constraint_referenced_ids="btnAutopilotArrive,btnAutopilotDisable,btnAutopilotEnable,btnAutopilotRunning" tools:visibility="visible" /> + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/layout/bus_traffic_light_view.xml b/OCH/mogo-och-bus/src/main/res/layout/bus_traffic_light_view.xml new file mode 100644 index 0000000000..05f2d9c38b --- /dev/null +++ b/OCH/mogo-och-bus/src/main/res/layout/bus_traffic_light_view.xml @@ -0,0 +1,35 @@ + + + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml index 3ef9d9d932..a27b69ae1d 100644 --- a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml +++ b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1440/dimens.xml @@ -124,4 +124,16 @@ 20px + 225px + 154px + 60px + 40px + 23px + 210px + 120px + 15px + 17px + 154px + 130px + 60px \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml index 8f068b0633..9c23585e71 100644 --- a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml +++ b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml @@ -121,4 +121,17 @@ 120px 86px 50px + + 225px + 154px + 60px + 40px + 23px + 210px + 120px + 15px + 17px + 154px + 130px + 60px \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/values/colors.xml b/OCH/mogo-och-bus/src/main/res/values/colors.xml index a702d05967..600e6c2c33 100644 --- a/OCH/mogo-och-bus/src/main/res/values/colors.xml +++ b/OCH/mogo-och-bus/src/main/res/values/colors.xml @@ -38,4 +38,10 @@ #19FFFFFF #FFFFFF + #FFFFA28B + #FFDA1100 + #FF60FFD3 + #FF006D43 + #FFFFE198 + #FFFF9B00 \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/values/dimens.xml b/OCH/mogo-och-bus/src/main/res/values/dimens.xml index 49e258a5e0..51d39b3e5c 100644 --- a/OCH/mogo-och-bus/src/main/res/values/dimens.xml +++ b/OCH/mogo-och-bus/src/main/res/values/dimens.xml @@ -137,4 +137,17 @@ 72px 52px 20px + + 225px + 154px + 60px + 40px + 23px + 210px + 120px + 15px + 17px + 154px + 130px + 60px \ No newline at end of file diff --git a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_traffic_light_view.xml b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_traffic_light_view.xml index 86fec7678b..5055eaa928 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_traffic_light_view.xml +++ b/OCH/mogo-och-taxi-passenger/src/main/res/layout/taxi_p_traffic_light_view.xml @@ -28,7 +28,6 @@ android:layout_height="match_parent" android:textSize="@dimen/taxi_p_traffic_light_time_size" android:textStyle="bold" - android:text="300" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" android:gravity="center" /> diff --git a/OCH/mogo-och-taxi-passenger/src/main/res/values-sw320dp/dimens.xml b/OCH/mogo-och-taxi-passenger/src/main/res/values-sw320dp/dimens.xml index 702aa40369..7e4f321016 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/res/values-sw320dp/dimens.xml +++ b/OCH/mogo-och-taxi-passenger/src/main/res/values-sw320dp/dimens.xml @@ -37,7 +37,7 @@ 15px 17px 154px - 127px + 130px 60px 31px diff --git a/OCH/mogo-och-taxi-passenger/src/main/res/values-xhdpi-2560x1440/dimens.xml b/OCH/mogo-och-taxi-passenger/src/main/res/values-xhdpi-2560x1440/dimens.xml index 88aec68c97..4979821f90 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/res/values-xhdpi-2560x1440/dimens.xml +++ b/OCH/mogo-och-taxi-passenger/src/main/res/values-xhdpi-2560x1440/dimens.xml @@ -106,7 +106,7 @@ 15px 17px 154px - 127px + 130px 60px 31px diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseOchTaxiTabFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseOchTaxiTabFragment.java index df823a11d3..33c4ae13ef 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseOchTaxiTabFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/BaseOchTaxiTabFragment.java @@ -77,6 +77,7 @@ public abstract class BaseOchTaxiTabFragment 2"); + } else { + + this.mColorList = mColorList; + } + } + + public void setStyle() { + mPaint.setAntiAlias(true); + mPaint.setDither(true); + mPaint.setFilterBitmap(true); + //前面4个参数分别表示渐变的开始x轴,开始y轴,结束的x轴,结束的y轴,mcolorList表示渐变的颜色数组 + mLinearGradient = new LinearGradient(0, 0, mViewWidth, mViewHeight, mColorList, null, Shader.TileMode.CLAMP); + mPaint.setShader(mLinearGradient); + mPaint.setStrokeJoin(Paint.Join.ROUND); + mPaint.setStrokeCap(Paint.Cap.ROUND); + mPaint.setStyle(Paint.Style.FILL_AND_STROKE); + } + + /** + * 设置投影层 + * @param radius + * @param dx + * @param dy + * @param color + */ + public void setShadowLayerCustom(float radius, float dx, float dy, int color) { + this.mRadius = radius; + this.mdx = dx; + this.mdy = dy; + this.mColor = color; + } +} + diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiTrafficLightView.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiTrafficLightView.java new file mode 100644 index 0000000000..1567404022 --- /dev/null +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiTrafficLightView.java @@ -0,0 +1,165 @@ +package com.mogo.och.taxi.ui; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.LayoutInflater; +import android.widget.ImageView; + +import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight; +import com.mogo.eagle.core.utilcode.util.UiThreadHandler; +import com.mogo.och.taxi.R; + +import org.jetbrains.annotations.Nullable; + +/** + * Taxi司机端:红绿灯view + * + * Created on 2022/3/29 + */ +public class TaxiTrafficLightView extends IViewTrafficLight { + + private ImageView mLightIconIV; + private GradientTextView mLightTimeTV; + private int mCurrentLightId; + + public TaxiTrafficLightView(@Nullable Context context) { + this(context, null, 0); + } + + public TaxiTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) { + this(context, attrs, 0); + } + + public TaxiTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + init(context); + } + + private void init(Context context) { + LayoutInflater.from(context).inflate(R.layout.taxi_traffic_light_view, this, true); + mLightIconIV = findViewById(R.id.taxi_traffic_light_iv); + mLightTimeTV = findViewById(R.id.taxi_traffic_light_time_tv); + } + + /** + * 展示红绿灯预警 + * + * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 + */ + @Override + public void showWarningTrafficLight(int checkLightId) { + super.showWarningTrafficLight(checkLightId); + mCurrentLightId = checkLightId; + updateTrafficLightIcon(checkLightId); + } + + /** + * 关闭红绿灯预警展示,并重制灯态 + */ + @Override + public void disableWarningTrafficLight() { + super.disableWarningTrafficLight(); + UiThreadHandler.post(() -> { + mCurrentLightId = 0; + TaxiTrafficLightView.this.setVisibility(GONE); + }); + } + + /** + * @param redNum 红灯倒计时 + * @param yellowNum 黄灯倒计时 + * @param greenNum 绿灯倒计时 + */ + @Override + public void changeCountdownTrafficLightNum(int redNum, int yellowNum, int greenNum) { + super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum); + switch (mCurrentLightId) { + case 1: + changeCountdownRed(redNum); + break; + case 2: + changeCountdownYellow(yellowNum); + break; + case 3: + changeCountdownGreen(greenNum); + break; + default: + UiThreadHandler.post(() -> { + mLightTimeTV.setText(""); + }); + break; + } + } + + @Override + public void changeCountdownRed(int redNum) { + super.changeCountdownRed(redNum); + UiThreadHandler.post(() -> { + if (redNum > 0) { + mLightTimeTV.setVertrial(true); + mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_traffic_light_red_color_up), + getResources().getColor(R.color.taxi_traffic_light_red_color_down)}); + mLightTimeTV.setText(String.valueOf(redNum)); + } else { + mLightTimeTV.setText(""); + } + }); + } + + @Override + public void changeCountdownGreen(int greenNum) { + super.changeCountdownGreen(greenNum); + UiThreadHandler.post(() -> { + if (greenNum > 0) { + mLightTimeTV.setVertrial(true); + mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_traffic_light_green_color_up), + getResources().getColor(R.color.taxi_traffic_light_green_color_down)}); + mLightTimeTV.setText(String.valueOf(greenNum)); + } else { + mLightTimeTV.setText(""); + } + }); + } + + @Override + public void changeCountdownYellow(int yellowNum) { + super.changeCountdownYellow(yellowNum); + UiThreadHandler.post(() -> { + if (yellowNum > 0) { + mLightTimeTV.setVertrial(true); + mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_traffic_light_yellow_color_up), + getResources().getColor(R.color.taxi_traffic_light_yellow_color_down)}); + mLightTimeTV.setText(String.valueOf(yellowNum)); + } else { + mLightTimeTV.setText(""); + } + }); + } + + /** + * 更新红绿灯icon + * + * @param lightId 0-都是默认,1-红,2-黄,3-绿 + */ + private void updateTrafficLightIcon(int lightId) { + UiThreadHandler.post(() -> { + switch (lightId) { + case 1: + mLightIconIV.setBackgroundResource(R.drawable.taxi_light_red_nor); + TaxiTrafficLightView.this.setVisibility(VISIBLE); + break; + case 2: + mLightIconIV.setBackgroundResource(R.drawable.taxi_lightyellow_nor); + TaxiTrafficLightView.this.setVisibility(VISIBLE); + break; + case 3: + mLightIconIV.setBackgroundResource(R.drawable.taxi_light_green_nor); + TaxiTrafficLightView.this.setVisibility(VISIBLE); + break; + default: + TaxiTrafficLightView.this.setVisibility(GONE); + break; + } + }); + } +} diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_light_green_nor.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_light_green_nor.png new file mode 100644 index 0000000000..bc9fed952d Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_light_green_nor.png differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_light_red_nor.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_light_red_nor.png new file mode 100644 index 0000000000..8732508ded Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_light_red_nor.png differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_lightyellow_nor.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_lightyellow_nor.png new file mode 100644 index 0000000000..bae01408fd Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1440/taxi_lightyellow_nor.png differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_light_green_nor.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_light_green_nor.png new file mode 100644 index 0000000000..bc9fed952d Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_light_green_nor.png differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_light_red_nor.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_light_red_nor.png new file mode 100644 index 0000000000..8732508ded Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_light_red_nor.png differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_lightyellow_nor.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_lightyellow_nor.png new file mode 100644 index 0000000000..bae01408fd Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi-2560x1600/taxi_lightyellow_nor.png differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_light_green_nor.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_light_green_nor.png new file mode 100644 index 0000000000..bc9fed952d Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_light_green_nor.png differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_light_red_nor.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_light_red_nor.png new file mode 100644 index 0000000000..8732508ded Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_light_red_nor.png differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_lightyellow_nor.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_lightyellow_nor.png new file mode 100644 index 0000000000..bae01408fd Binary files /dev/null and b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/taxi_lightyellow_nor.png differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable/bg_taxi_traffic_light_background.xml b/OCH/mogo-och-taxi/src/main/res/drawable/bg_taxi_traffic_light_background.xml new file mode 100644 index 0000000000..d93d55da56 --- /dev/null +++ b/OCH/mogo-och-taxi/src/main/res/drawable/bg_taxi_traffic_light_background.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/layout/taxi_base_fragment.xml b/OCH/mogo-och-taxi/src/main/res/layout/taxi_base_fragment.xml index 71532e41b4..86f725cb1d 100644 --- a/OCH/mogo-och-taxi/src/main/res/layout/taxi_base_fragment.xml +++ b/OCH/mogo-och-taxi/src/main/res/layout/taxi_base_fragment.xml @@ -269,4 +269,14 @@ app:layout_constraintRight_toRightOf="parent" app:layout_constraintBottom_toBottomOf="parent" android:src="@drawable/taxi_close_navi_icon"/> + + \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/layout/taxi_traffic_light_view.xml b/OCH/mogo-och-taxi/src/main/res/layout/taxi_traffic_light_view.xml new file mode 100644 index 0000000000..badf0a393e --- /dev/null +++ b/OCH/mogo-och-taxi/src/main/res/layout/taxi_traffic_light_view.xml @@ -0,0 +1,35 @@ + + + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/values-sw320dp/dimens.xml b/OCH/mogo-och-taxi/src/main/res/values-sw320dp/dimens.xml index bc5aa49d07..c58602dcd2 100644 --- a/OCH/mogo-och-taxi/src/main/res/values-sw320dp/dimens.xml +++ b/OCH/mogo-och-taxi/src/main/res/values-sw320dp/dimens.xml @@ -88,4 +88,17 @@ 220px 16px + + 225px + 154px + 60px + 40px + 23px + 210px + 120px + 15px + 17px + 154px + 130px + 60px \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1440/dimens.xml b/OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1440/dimens.xml index 57d4a93749..7dd0bd4e6b 100644 --- a/OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1440/dimens.xml +++ b/OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1440/dimens.xml @@ -89,4 +89,16 @@ 16px + 225px + 154px + 60px + 40px + 23px + 210px + 120px + 15px + 17px + 154px + 130px + 60px \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/values/colors.xml b/OCH/mogo-och-taxi/src/main/res/values/colors.xml index da629efd4c..6cec08f793 100644 --- a/OCH/mogo-och-taxi/src/main/res/values/colors.xml +++ b/OCH/mogo-och-taxi/src/main/res/values/colors.xml @@ -15,4 +15,11 @@ #FF52BBFF #4DFFFFFF + + #FFFFA28B + #FFDA1100 + #FF60FFD3 + #FF006D43 + #FFFFE198 + #FFFF9B00 \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/values/dimens.xml b/OCH/mogo-och-taxi/src/main/res/values/dimens.xml index bfbb7d9072..ae72969ee1 100644 --- a/OCH/mogo-och-taxi/src/main/res/values/dimens.xml +++ b/OCH/mogo-och-taxi/src/main/res/values/dimens.xml @@ -87,4 +87,16 @@ 16px + 225px + 154px + 60px + 40px + 23px + 210px + 120px + 15px + 17px + 154px + 130px + 60px \ No newline at end of file diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 2302ddf666..73921d2321 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -107,9 +107,13 @@ public class MogoApplication extends MainMoGoApplication { if (DebugConfig.getProductFlavor().equals("fPadLenovoOchTaxi") || DebugConfig.getProductFlavor().equals("fPadLenovoOchTaxiPassenger")) { HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche; + //是否显示 红绿等 + HmiBuildConfig.isShowTrafficLightView = false; } else if (DebugConfig.getProductFlavor().equals("fPadLenovoOchBus") || DebugConfig.getProductFlavor().equals("fPadLenovoOchBusPassenger")) { HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache; + //是否显示 红绿等 + HmiBuildConfig.isShowTrafficLightView = false; HmiBuildConfig.isShowBrakeLightView = false; HmiBuildConfig.isShowTurnLightView = false; } @@ -117,8 +121,6 @@ public class MogoApplication extends MainMoGoApplication { if (DebugConfig.getProductFlavor().equals("fPadLenovoOchTaxiPassenger")) { //是否显示 限速UI HmiBuildConfig.isShowLimitingVelocityView = false; - //是否显示 红绿等 - HmiBuildConfig.isShowTrafficLightView = false; //是否显示 路侧监控 HmiBuildConfig.isShowCameraView = false; }