手机号验证状态流转完成

This commit is contained in:
yangyakun
2022-05-12 19:47:46 +08:00
parent 8d12e3ad94
commit cfd52ec445
36 changed files with 1193 additions and 9 deletions

View File

@@ -0,0 +1,70 @@
package com.mogo.och.common.module.wigets;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.LinearGradient;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
import android.util.AttributeSet;
import android.util.TypedValue;
import com.mogo.och.common.module.R;
/**
* Created by mmin18 on 9/27/16.
*/
public class OCHShapeBlurView extends OCHStockBlurView {
Paint mPaint;
RectF mRectF;
private float mRadius;
private int mTopColor; // default #aaffffff
private int mBottomColor; // default #aaffffff
public OCHShapeBlurView(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.OCHRShapeBlurView);
mRadius = a.getDimension(R.styleable.OCHRShapeBlurView_och_realtime_radius,
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 0, context.getResources().getDisplayMetrics()));
mTopColor = a.getColor(R.styleable.OCHRShapeBlurView_och_realtime_start_color, 0xAAFFFFFF);
mBottomColor = a.getColor(R.styleable.OCHRShapeBlurView_och_realtime_end_color, 0xAAFFFFFF);
a.recycle();
mPaint = new Paint();
mRectF = new RectF();
}
/**
* Custom oval shape
*/
@Override
protected void drawBlurredBitmap(Canvas canvas, Bitmap blurredBitmap, int overlayColor) {
if (blurredBitmap != null) {
mRectF.right = getWidth();
mRectF.bottom = getHeight();
mPaint.reset();
mPaint.setAntiAlias(true);
BitmapShader shader = new BitmapShader(blurredBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
Matrix matrix = new Matrix();
matrix.postScale(mRectF.width() / blurredBitmap.getWidth(), mRectF.height() / blurredBitmap.getHeight());
shader.setLocalMatrix(matrix);
mPaint.setShader(shader);
canvas.drawRoundRect(mRectF, mRadius,mRadius,mPaint);
mPaint.reset();
mPaint.setAntiAlias(true);
/* 设置渐变色 这个正方形的颜色是改变的 */
Shader mShader = new LinearGradient(getWidth()/2, 0, getWidth()/2, getHeight(),
new int[] {mTopColor,mBottomColor}, null, Shader.TileMode.CLAMP); // 一个材质,打造出一个线性梯度沿著一条线。
mPaint.setShader(mShader);//0xBFE0E8FF,0xBF6AA2D7
canvas.drawRoundRect(mRectF, mRadius,mRadius,mPaint);
}
}
}

View File

@@ -0,0 +1,343 @@
package com.mogo.och.common.module.wigets;
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewTreeObserver;
import com.mogo.och.common.module.R;
public class OCHStockBlurView extends View {
private float mDownsampleFactor; // default 4
private int mOverlayColor; // default #aaffffff
private float mBlurRadius; // default 10dp (0 < r <= 25)
private boolean onece;
private boolean mDirty;
private Bitmap mBitmapToBlur, mBlurredBitmap;
private Canvas mBlurringCanvas;
private boolean mIsRendering;
private Paint mPaint;
private final Rect mRectSrc = new Rect(), mRectDst = new Rect();
// mDecorView should be the root view of the activity (even if you are on a different window like a dialog)
private View mDecorView;
// If the view is on different root view (usually means we are on a PopupWindow),
// we need to manually call invalidate() in onPreDraw(), otherwise we will not be able to see the changes
private boolean mDifferentRoot;
private static int RENDERING_COUNT;
private static int BLUR_IMPL;
private RenderScript mRenderScript;
private ScriptIntrinsicBlur mBlurScript;
private Allocation mBlurInput, mBlurOutput;
public OCHStockBlurView(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.OCHRealtimeBlurView);
mBlurRadius = a.getDimension(R.styleable.OCHRealtimeBlurView_och_realtime_blur_radius,
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20, context.getResources().getDisplayMetrics()));
mDownsampleFactor = a.getFloat(R.styleable.OCHRealtimeBlurView_och_realtime_downsample_factor, 4);
mOverlayColor = a.getColor(R.styleable.OCHRealtimeBlurView_och_realtime_overlay_color, 0xAAFFFFFF);
onece = a.getBoolean(R.styleable.OCHRealtimeBlurView_och_realtime_onece,false);
a.recycle();
mPaint = new Paint();
}
public void setBlurRadius(float radius) {
if (mBlurRadius != radius) {
mBlurRadius = radius;
mDirty = true;
invalidate();
}
}
public void setDownsampleFactor(float factor) {
if (factor <= 0) {
throw new IllegalArgumentException("Downsample factor must be greater than 0.");
}
if (mDownsampleFactor != factor) {
mDownsampleFactor = factor;
mDirty = true; // may also change blur radius
releaseBitmap();
invalidate();
}
}
public void setOverlayColor(int color) {
if (mOverlayColor != color) {
mOverlayColor = color;
invalidate();
}
}
private void releaseBitmap() {
if (mBitmapToBlur != null) {
mBitmapToBlur.recycle();
mBitmapToBlur = null;
}
if (mBlurredBitmap != null) {
mBlurredBitmap.recycle();
mBlurredBitmap = null;
}
}
protected void release() {
releaseBitmap();
releaseBlur();
}
protected boolean prepare() {
if (mBlurRadius == 0) {
release();
return false;
}
float downsampleFactor = mDownsampleFactor;
float radius = mBlurRadius / downsampleFactor;
if (radius > 25) {
downsampleFactor = downsampleFactor * radius / 25;
radius = 25;
}
final int width = getWidth();
final int height = getHeight();
int scaledWidth = Math.max(1, (int) (width / downsampleFactor));
int scaledHeight = Math.max(1, (int) (height / downsampleFactor));
boolean dirty = mDirty;
if (mBlurringCanvas == null || mBlurredBitmap == null
|| mBlurredBitmap.getWidth() != scaledWidth
|| mBlurredBitmap.getHeight() != scaledHeight) {
dirty = true;
releaseBitmap();
boolean r = false;
try {
mBitmapToBlur = Bitmap.createBitmap(scaledWidth, scaledHeight, Bitmap.Config.ARGB_8888);
if (mBitmapToBlur == null) {
return false;
}
mBlurringCanvas = new Canvas(mBitmapToBlur);
mBlurredBitmap = Bitmap.createBitmap(scaledWidth, scaledHeight, Bitmap.Config.ARGB_8888);
if (mBlurredBitmap == null) {
return false;
}
r = true;
} catch (OutOfMemoryError e) {
// Bitmap.createBitmap() may cause OOM error
// Simply ignore and fallback
} finally {
if (!r) {
release();
return false;
}
}
}
if (dirty) {
if (prepareBlur(getContext(), mBitmapToBlur, radius)) {
mDirty = false;
} else {
return false;
}
}
return true;
}
protected void blur(Bitmap bitmapToBlur, Bitmap blurredBitmap) {
mBlurInput.copyFrom(bitmapToBlur);
mBlurScript.setInput(mBlurInput);
mBlurScript.forEach(mBlurOutput);
mBlurOutput.copyTo(blurredBitmap);
}
private final ViewTreeObserver.OnPreDrawListener preDrawListener = new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
final int[] locations = new int[2];
Bitmap oldBmp = mBlurredBitmap;
View decor = mDecorView;
if (decor != null && isShown() && prepare()) {
boolean redrawBitmap = mBlurredBitmap != oldBmp;
oldBmp = null;
decor.getLocationOnScreen(locations);
int x = -locations[0];
int y = -locations[1];
getLocationOnScreen(locations);
x += locations[0];
y += locations[1];
// just erase transparent
mBitmapToBlur.eraseColor(mOverlayColor & 0xffffff);
int rc = mBlurringCanvas.save();
mIsRendering = true;
RENDERING_COUNT++;
try {
mBlurringCanvas.scale(1.f * mBitmapToBlur.getWidth() / getWidth(), 1.f * mBitmapToBlur.getHeight() / getHeight());
mBlurringCanvas.translate(-x, -y);
if (decor.getBackground() != null) {
decor.getBackground().draw(mBlurringCanvas);
}
decor.draw(mBlurringCanvas);
} catch (StopException e) {
} finally {
mIsRendering = false;
RENDERING_COUNT--;
mBlurringCanvas.restoreToCount(rc);
}
blur(mBitmapToBlur, mBlurredBitmap);
if (redrawBitmap || mDifferentRoot) {
invalidate();
}
}
if(onece) {
mDecorView.getViewTreeObserver().removeOnPreDrawListener(this);
}
return true;
}
};
protected View getActivityDecorView() {
Context ctx = getContext();
for (int i = 0; i < 4 && ctx != null && !(ctx instanceof Activity) && ctx instanceof ContextWrapper; i++) {
ctx = ((ContextWrapper) ctx).getBaseContext();
}
if (ctx instanceof Activity) {
return ((Activity) ctx).getWindow().getDecorView();
} else {
return null;
}
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
mDecorView = getRootView();
if (mDecorView != null) {
mDecorView.getViewTreeObserver().addOnPreDrawListener(preDrawListener);
mDifferentRoot = mDecorView.getRootView() != getRootView();
if (mDifferentRoot) {
mDecorView.postInvalidate();
}
} else {
mDifferentRoot = false;
}
}
@Override
protected void onDetachedFromWindow() {
if (mDecorView != null) {
mDecorView.getViewTreeObserver().removeOnPreDrawListener(preDrawListener);
}
release();
super.onDetachedFromWindow();
}
@Override
public void draw(Canvas canvas) {
if (mIsRendering) {
// Quit here, don't draw views above me
throw STOP_EXCEPTION;
} else if (RENDERING_COUNT > 0) {
// Doesn't support blurview overlap on another blurview
} else {
super.draw(canvas);
}
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
drawBlurredBitmap(canvas, mBlurredBitmap, mOverlayColor);
}
/**
* Custom draw the blurred bitmap and color to define your own shape
*
* @param canvas
* @param blurredBitmap
* @param overlayColor
*/
protected void drawBlurredBitmap(Canvas canvas, Bitmap blurredBitmap, int overlayColor) {
if (blurredBitmap != null) {
mRectSrc.right = blurredBitmap.getWidth();
mRectSrc.bottom = blurredBitmap.getHeight();
mRectDst.right = getWidth();
mRectDst.bottom = getHeight();
canvas.drawBitmap(blurredBitmap, mRectSrc, mRectDst, null);
}
mPaint.setColor(overlayColor);
canvas.drawRect(mRectDst, mPaint);
}
private static class StopException extends RuntimeException {
}
private static StopException STOP_EXCEPTION = new StopException();
public boolean prepareBlur(Context context, Bitmap buffer, float radius) {
if (mRenderScript == null) {
try {
mRenderScript = RenderScript.create(context);
mBlurScript = ScriptIntrinsicBlur.create(mRenderScript, Element.U8_4(mRenderScript));
} catch (android.renderscript.RSRuntimeException e) {
// In release mode, just ignore
releaseBlur();
return false;
}
}
mBlurScript.setRadius(radius);
mBlurInput = Allocation.createFromBitmap(mRenderScript, buffer,
Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT);
mBlurOutput = Allocation.createTyped(mRenderScript, mBlurInput.getType());
return true;
}
public void releaseBlur() {
if (mBlurInput != null) {
mBlurInput.destroy();
mBlurInput = null;
}
if (mBlurOutput != null) {
mBlurOutput.destroy();
mBlurOutput = null;
}
if (mBlurScript != null) {
mBlurScript.destroy();
mBlurScript = null;
}
if (mRenderScript != null) {
mRenderScript.destroy();
mRenderScript = null;
}
}
}

View File

@@ -34,4 +34,16 @@
<attr name="och_card_right_bottom_radius" format="dimension" />
<attr name="och_card_left_bottom_radius" format="dimension" />
</declare-styleable>
<declare-styleable name="OCHRealtimeBlurView">
<attr name="och_realtime_blur_radius" format="dimension" />
<attr name="och_realtime_downsample_factor" format="float" />
<attr name="och_realtime_overlay_color" format="color" />
<attr name="och_realtime_onece" format="boolean" />
</declare-styleable>
<declare-styleable name="OCHRShapeBlurView">
<attr name="och_realtime_start_color" format="color" />
<attr name="och_realtime_end_color" format="color" />
<attr name="och_realtime_radius" format="dimension" />
</declare-styleable>
</resources>

View File

@@ -0,0 +1,15 @@
package com.mogo.och.taxi.passenger.bean;
import com.mogo.eagle.core.data.BaseData;
import java.util.List;
import java.util.Objects;
/**
* Created by pangfan on 2021/8/19
*
* 查询订单返回数据结构
*/
public class TaxiPassengerBaseRespBean extends BaseData {
public Object data;
}

View File

@@ -0,0 +1,17 @@
package com.mogo.och.taxi.passenger.bean;
/**
* Created by pangfan on 2021/8/19
*
* 验证手机号后四位同时流转订单状态
*/
public class TaxiPassengerCheckPhoneUpdateOrderReqBean {
public String orderNo;
public String phone;
public TaxiPassengerCheckPhoneUpdateOrderReqBean(String driverSn, String orderNo,String phone) {
this.orderNo = orderNo;
this.phone = phone;
}
}

View File

@@ -45,7 +45,10 @@ public class TaxiPassengerOrderQueryRespBean extends BaseData {
public long startTime;
//预计用车时间:预约单=下单时的预约用车时间;即时单=派单成功的时间+预估的达到上车点的时间
public long bookingTime;
//乘客手机号
public String passengerPhone;
//订单多少乘客
public String passengerCount;
// !!!接口中暂无此字段仅用于本地实现逻辑使用起始站目的站距离km

View File

@@ -0,0 +1,6 @@
package com.mogo.och.taxi.passenger.callback;
public interface ITaxiPassengerCheckPhoneCallback {
//验证手机号并流转状态
void onCheckPhoneAndUpdateOrderStatus(String phoneTail);
}

View File

@@ -26,10 +26,12 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
import com.mogo.eagle.core.utilcode.util.ToastUtils;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerBaseRespBean;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRemainingResp;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRespBean;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrdersInServiceQueryRespBean;
@@ -673,6 +675,28 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
SharedPrefsMgr.getInstance(mContext).putInt(TaxiPassengerConst.SP_KEY_ORDER_SUM_DIS,(int) sumLength);
}
public void checkPhoneAndUpdateStatus(String phoneTail) {
if (mCurrentOCHOrder == null) return;
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "--route--- checkPhoneAndUpdateStatus");
TaxiPassengerServiceManager.getInstance().checkPhoneAndUpdateOrderStatus(mContext, mCurrentOCHOrder.orderNo,
phoneTail, new TaxiPassengerServiceCallback<TaxiPassengerBaseRespBean>() {
@Override
public void onSuccess(TaxiPassengerBaseRespBean data) {
ToastUtils.showLong("success");
}
@Override
public void onError() {
ToastUtils.showLong("当前网络异常,请重新验证;若始终异常,请您在手机端取消行程,给您带来不便,十分抱歉!");
}
@Override
public void onFail(int code, String msg) {
ToastUtils.showLong("onFail"+code+msg);
}
});
}
private void runOnUIThread(Runnable executor) {
if (executor == null) {
return;

View File

@@ -1,4 +1,6 @@
package com.mogo.och.taxi.passenger.network;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerBaseRespBean;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerCheckPhoneUpdateOrderReqBean;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRemainingResp;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryReqBean;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRespBean;
@@ -63,4 +65,14 @@ interface TaxiPassengerServiceApi {
// @GET( "/autopilot-car-hailing/api/v1/driver/serviceStatus/query" )
@GET( "/autopilot-car-hailing/order/v2/driver/taxi/passenger/orderRoute" )
Observable<TaxiPassengerQueryOrderRouteResp> queryOrderRoute(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("orderNo") String orderNo);
/**
* 通过orderNo查询订单信息用于本地已经有orderNo时
* @param data
* @return
*/
@Headers( {"Content-type:application/json;charset=UTF-8"} )
@POST( "/autopilot-car-hailing/passenger/v2/vehicle/taxi/verification/phone" )
Observable<TaxiPassengerBaseRespBean> checkPhoneAndUpdateOrderStatus(@Header ("appId") String appId, @Header("ticket") String ticket, @Body TaxiPassengerCheckPhoneUpdateOrderReqBean data);
}

View File

@@ -12,6 +12,8 @@ import com.mogo.eagle.core.network.RequestOptions;
import com.mogo.eagle.core.network.SubscribeImpl;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerBaseRespBean;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerCheckPhoneUpdateOrderReqBean;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRemainingResp;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryReqBean;
import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRespBean;
@@ -141,4 +143,15 @@ public class TaxiPassengerServiceManager {
}
};
}
public void checkPhoneAndUpdateOrderStatus(Context context, String orderNo,String phone ,TaxiPassengerServiceCallback<TaxiPassengerBaseRespBean> callback){
mOCHTaxiServiceApi.checkPhoneAndUpdateOrderStatus(
MoGoAiCloudClientConfig.getInstance().getServiceAppId()
,MoGoAiCloudClientConfig.getInstance().getToken()
,new TaxiPassengerCheckPhoneUpdateOrderReqBean(getDriverAppSn(),orderNo,phone))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getSubscribeImpl(context, callback, "checkPhoneAndUpdateOrderStatus"));
}
}

View File

@@ -149,6 +149,11 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
TaxiPassengerGeocodeSearchModel.getInstance(getContext()).destroyGeocodeSearch();
return;
}
if (TaxiPassengerOrderStatusEnum.ArriveAtStart.getCode() == order.orderStatus) {
runOnUIThread(() -> mView.showOrHidePressengerCheckPager(true, order.startSiteAddr,
order.endSiteAddr, order.passengerCount, order.carNumber, order.passengerPhone));
return;
}
if (TaxiPassengerOrderStatusEnum.ArriveAtStart.getCode() == order.orderStatus
|| TaxiPassengerOrderStatusEnum.OnTheWayToEnd.getCode() == order.orderStatus){
runOnUIThread(() -> mView.showOrHideServingOrderFragment(true));
@@ -174,4 +179,8 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
}
}
public void checkAndUpdateStatus(String phone){
TaxiPassengerModel.getInstance().checkPhoneAndUpdateStatus(phone);
}
}

View File

@@ -26,6 +26,7 @@ import com.mogo.map.uicontroller.VisualAngleMode;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.constants.DataTypes;
import com.mogo.och.taxi.passenger.R;
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerCheckPhoneCallback;
import com.mogo.och.taxi.passenger.presenter.BaseTaxiPassengerPresenter;
@@ -49,6 +50,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
// private ConstraintLayout mArrivedEndCL;
private View mArrivedEndView;
private TaxiPassengerCheckView mArrivedCheckView;
private TextView mArrivedEndStation;
protected TaxiPassengerServingOrderFragment ochServingOrderFragment = null;
@@ -83,7 +85,21 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
mArrivedEndView = LayoutInflater.from(getContext()).inflate(R.layout.taxi_p_arrived_end_panel,null);
mArrivedEndStation = mArrivedEndView.findViewById(R.id.arrived_end_station);
mArrivedCheckView = new TaxiPassengerCheckView(getContext());
mMapswitchBtn = findViewById(R.id.module_och_taxi_swich_map_iv);
initListener();
onAutopilotStatusChanged(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState());
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()){
switchVRFlatMode(true);
}else {
switchVRFlatMode(false);
}
//showOrHidePressengerCheckPager(true,"衡山科学城","石鼓收费站","2","京A876589","18811539480");
}
private void initListener(){
mMapswitchBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -98,14 +114,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
}
}
});
onAutopilotStatusChanged(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState());
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()){
switchVRFlatMode(true);
}else {
switchVRFlatMode(false);
}
mArrivedCheckView.setOnCheckPhoneAndUpdateStatusListener(phoneTail -> getPresenter().checkAndUpdateStatus(phoneTail));
}
/**
@@ -253,4 +262,22 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
OverlayViewUtils.dismissOverlayView(mArrivedEndView);
}
}
public void showOrHidePressengerCheckPager(boolean isShow, String startSiteAddr,
String endSiteAddr,
String passengerCount,
String carNumber,
String phone) {
try {
if (isShow) {
mArrivedCheckView.setData(startSiteAddr, endSiteAddr, passengerCount, carNumber,phone);
OverlayViewUtils.showOverlayView(getActivity(), mArrivedCheckView);
} else {
OverlayViewUtils.dismissOverlayView(mArrivedCheckView);
mArrivedCheckView.setData("--", "--", "--", "--","");
}
}catch (Exception e){
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,197 @@
package com.mogo.och.taxi.passenger.ui
import android.content.Context
import android.graphics.Typeface
import android.text.Spannable
import android.text.SpannableStringBuilder
import android.text.style.TextAppearanceSpan
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.widget.RelativeLayout
import android.widget.TextView
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.taxi.passenger.R
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerCheckPhoneCallback
/**
* V2X预警事件view通过FloatWindow呈现无需加入到自定义layout中
*
* Created on 2022/3/16
*/
class TaxiPassengerCheckView :RelativeLayout, View.OnClickListener {
constructor(context: Context?) : super(context)
constructor(context: Context?, attributeSet: AttributeSet) : super(context, attributeSet)
constructor(context: Context?, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
constructor(context: Context?, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
var onCheckPhoneAndUpdateStatusListener: ITaxiPassengerCheckPhoneCallback?=null
private lateinit var tvPassengerCount: TextView
private lateinit var tvPassengerStart: TextView
private lateinit var tvPassengerEnd: TextView
private lateinit var tvTaxiNumber: TextView
private lateinit var tvTaxiPassengerNumberfirst: TextView
private lateinit var tvTaxiPassengerNumberSecond: TextView
private lateinit var tvTaxiPassengerNumberThird: TextView
private lateinit var tvTaxiPassengerNumberFourth: TextView
private var index = 0
private var phone = ""
private val numSelect = arrayOfNulls<Int>(4)
private val numSelectTextView = arrayOfNulls<TextView>(4)
private fun initView(context: Context) {
d(SceneConstant.M_TAXI_P + TAG, "initView")
LayoutInflater.from(context).inflate(R.layout.taxi_p_passenger_check_panel, this, true)
tvPassengerCount = findViewById(R.id.tv_passenger_count)
tvPassengerStart = findViewById(R.id.tv_passenger_start)
tvPassengerEnd = findViewById(R.id.tv_passenger_end)
tvTaxiNumber = findViewById(R.id.tv_taxi_number)
tvTaxiPassengerNumberfirst = findViewById(R.id.tv_taxi_passenger_number_first)
tvTaxiPassengerNumberSecond = findViewById(R.id.tv_taxi_passenger_number_second)
tvTaxiPassengerNumberThird = findViewById(R.id.tv_taxi_passenger_number_third)
tvTaxiPassengerNumberFourth = findViewById(R.id.tv_taxi_passenger_number_fourth)
keyBoardLogic()
numSelectTextView[0] = tvTaxiPassengerNumberfirst
numSelectTextView[1] = tvTaxiPassengerNumberSecond
numSelectTextView[2] = tvTaxiPassengerNumberThird
numSelectTextView[3] = tvTaxiPassengerNumberFourth
}
private fun keyBoardLogic() {
findViewById<TextView>(R.id.tv_taxi_passenger_number_one).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_two).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_three).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_four).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_five).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_six).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_seven).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_eight).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_nine).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_zero).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_back).setOnClickListener(this)
findViewById<TextView>(R.id.tv_taxi_passenger_number_submit).setOnClickListener(this)
tvTaxiPassengerNumberfirst.setOnClickListener(this)
tvTaxiPassengerNumberSecond.setOnClickListener(this)
tvTaxiPassengerNumberThird.setOnClickListener(this)
tvTaxiPassengerNumberFourth.setOnClickListener(this)
}
override fun onClick(v: View?) {
when (v?.id) {
R.id.tv_taxi_passenger_number_one -> {showNumver(1)}
R.id.tv_taxi_passenger_number_two -> {showNumver(2)}
R.id.tv_taxi_passenger_number_three-> {showNumver(3)}
R.id.tv_taxi_passenger_number_four-> {showNumver(4)}
R.id.tv_taxi_passenger_number_five -> {showNumver(5)}
R.id.tv_taxi_passenger_number_six -> {showNumver(6)}
R.id.tv_taxi_passenger_number_seven -> {showNumver(7)}
R.id.tv_taxi_passenger_number_eight -> {showNumver(8)}
R.id.tv_taxi_passenger_number_nine -> {showNumver(9)}
R.id.tv_taxi_passenger_number_zero -> {showNumver(0)}
R.id.tv_taxi_passenger_number_back -> {deleteNumver()}
R.id.tv_taxi_passenger_number_first -> {selectIndex(0)}
R.id.tv_taxi_passenger_number_second -> {selectIndex(1)}
R.id.tv_taxi_passenger_number_third -> {selectIndex(2)}
R.id.tv_taxi_passenger_number_fourth -> {selectIndex(3)}
R.id.tv_taxi_passenger_number_submit -> {checkAndCommit()}
else -> {}
}
}
private fun checkAndCommit() {
val numberStr = "${numSelect[0]}${numSelect[1]}${numSelect[2]}${numSelect[3]}"
if(!phone.endsWith(numberStr)){
ToastUtils.showLong("请输入正确的手机尾号")
return
}
onCheckPhoneAndUpdateStatusListener?.onCheckPhoneAndUpdateOrderStatus(numberStr)
}
private fun selectIndex(i: Int) {
index = i
changeStyle()
}
private fun showNumver(number: Int) {
if (index in 0..3) {
numSelect[index] = number
numSelectTextView[index]!!.text = number.toString()
if(index!=3){
index++
}
changeStyle()
}
}
private fun deleteNumver() {
if (index in 0..3) {
if(numSelect[index]==null){
if(index!=0){
index--
}
changeStyle()
return
}
numSelect[index] = null
numSelectTextView[index]!!.text = ""
}
}
private fun changeStyle() {
numSelectTextView.forEachIndexed { indexIn, textView ->
if(indexIn==index){
numSelectTextView[index]!!.setBackgroundResource(R.drawable.bg_taxi_p_checked_input_background)
numSelectTextView[index]!!.setTextColor(resources.getColor(R.color.taxi_p_check_keyboard_input_field_checked))
numSelectTextView[index]!!.setShadowLayer(0f,0f,0f,
resources.getColor(R.color.taxi_p_check_keyboard_input_field_checked_text_shadow))
}else{
numSelectTextView[indexIn]!!.setBackgroundResource(R.drawable.bg_taxi_p_check_input_background)
numSelectTextView[indexIn]!!.setTextColor(resources.getColor(R.color.taxi_p_check_keyboard_input_field))
numSelectTextView[indexIn]!!.setShadowLayer(20f,0f,2f,
resources.getColor(R.color.taxi_p_check_keyboard_input_field_checked_text_shadow))
}
}
}
fun setData(
startSiteAddr: String?,
endSiteAddr: String?,
passengerCount: String? = "1",
carNumber: String?,
phone: String?
) {
this.phone = phone?:""
val sb = SpannableStringBuilder("乘客数:$passengerCount") // 包装字体内容
sb.setSpan(
TextAppearanceSpan("default",
Typeface.NORMAL,100,
resources.getColorStateList(R.color.taxi_p_check_passenger_number) ,null ),
4, 5, Spannable.SPAN_INCLUSIVE_INCLUSIVE)
tvPassengerCount.text = sb
tvPassengerStart.text = "起 点 : $startSiteAddr"
tvPassengerEnd.text = "终 点 : $endSiteAddr"
tvTaxiNumber.text = "蘑菇 " + carNumber + "为您服务"
}
companion object {
const val TAG = "TaxiPassengerCheckView"
}
init {
try {
initView(context)
} catch (e: Exception) {
e.printStackTrace()
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#4DFFFFFF"/>
<corners android:radius="40px"/>
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#4DFFFFFF"/>
<corners android:radius="@dimen/dp_20"/>
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#FF4580FF"/>
<corners android:radius="@dimen/dp_20"/>
</shape>

View File

@@ -0,0 +1,370 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cl_contain"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/taxi_p_passenger_check_panel_bg"
android:clickable="true"
android:focusable="true"
tools:ignore="MissingDefaultResource">
<ImageView
android:layout_width="@dimen/dp_90"
android:layout_height="@dimen/dp_90"
android:layout_marginStart="@dimen/dp_63"
android:layout_marginTop="@dimen/dp_132"
android:src="@drawable/taxi_p_passenger_check_logo"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_hello"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_129"
android:layout_marginTop="@dimen/dp_406"
android:padding="@dimen/dp_40"
android:shadowColor="@color/taxi_p_check_hello_text_color"
android:shadowDy ="4"
android:shadowRadius="40"
android:text="@string/taxi_p_check_hello_text"
android:textColor="@color/taxi_autopilot_text_color_normal"
android:textSize="@dimen/sp_120"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_welcome_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_3"
android:shadowColor="@color/taxi_p_check_hello_small_text_color"
android:paddingStart="@dimen/dp_40"
android:paddingEnd="@dimen/dp_20"
android:paddingTop="@dimen/dp_20"
android:paddingBottom="@dimen/dp_20"
android:shadowDy ="2"
android:shadowRadius="20"
android:text="@string/taxi_p_check_hello_small_text"
android:textColor="@color/taxi_autopilot_text_color_normal"
android:textSize="@dimen/sp_46"
app:layout_constraintStart_toStartOf="@+id/tv_hello"
app:layout_constraintTop_toBottomOf="@+id/tv_hello" />
<TextView
android:id="@+id/tv_passenger_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_239"
tools:text="乘客数2位"
android:shadowColor="@color/taxi_p_check_hello_small_text_color"
android:shadowDy ="2"
android:shadowRadius="20"
android:paddingStart="@dimen/dp_40"
android:paddingEnd="@dimen/dp_20"
android:paddingTop="@dimen/dp_20"
android:paddingBottom="@dimen/dp_20"
android:textColor="@color/taxi_autopilot_text_color_normal"
android:textSize="@dimen/sp_46"
app:layout_constraintStart_toStartOf="@+id/tv_welcome_message"
app:layout_constraintTop_toBottomOf="@+id/tv_welcome_message" />
<TextView
android:id="@+id/tv_passenger_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_44"
android:layout_marginTop="@dimen/dp_86"
tools:text="起 点 : 衡山科学城"
android:textColor="@color/taxi_autopilot_text_color_normal"
android:textSize="@dimen/sp_46"
app:layout_constraintStart_toEndOf="@+id/iv_passenger_start_boll"
app:layout_constraintTop_toBottomOf="@+id/tv_passenger_count" />
<ImageView
android:id="@+id/iv_passenger_start_boll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_40"
android:src="@drawable/taxi_p_passenger_check_start_boll"
app:layout_constraintBottom_toBottomOf="@+id/tv_passenger_start"
app:layout_constraintStart_toStartOf="@+id/tv_passenger_count"
app:layout_constraintTop_toTopOf="@+id/tv_passenger_start" />
<ImageView
android:id="@+id/iv_passenger_start_end_line"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/taxi_p_passenger_check_start_end_line"
app:layout_constraintEnd_toEndOf="@+id/iv_passenger_start_boll"
app:layout_constraintStart_toStartOf="@+id/iv_passenger_start_boll"
app:layout_constraintTop_toBottomOf="@+id/iv_passenger_start_boll" />
<ImageView
android:id="@+id/iv_passenger_end_boll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/taxi_p_passenger_check_end_boll"
app:layout_constraintEnd_toEndOf="@+id/iv_passenger_start_end_line"
app:layout_constraintStart_toStartOf="@+id/iv_passenger_start_end_line"
app:layout_constraintTop_toBottomOf="@+id/iv_passenger_start_end_line" />
<TextView
android:id="@+id/tv_passenger_end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_44"
tools:text="终 点 : 石鼓收费站"
android:textColor="@color/taxi_autopilot_text_color_normal"
android:textSize="@dimen/sp_46"
app:layout_constraintBottom_toBottomOf="@+id/iv_passenger_end_boll"
app:layout_constraintStart_toEndOf="@+id/iv_passenger_end_boll"
app:layout_constraintTop_toTopOf="@+id/iv_passenger_end_boll" />
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout
android:layout_width="929px"
android:layout_height="1143px"
android:layout_marginEnd="155px"
android:layout_marginBottom="231px"
android:orientation="vertical"
app:bgColor="@color/transparent_white_30"
app:blurRadius="@dimen/dp_60"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:och_card_left_bottom_radius="@dimen/dp_40"
app:och_card_right_bottom_radius="@dimen/dp_40"
app:shadowColor="@color/taxi_p_check_keyboard_bg"
app:shadowRadius="60px"
app:xOffset="0px"
app:yOffset="0px">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null">
<com.mogo.och.common.module.wigets.OCHShapeBlurView
android:id="@+id/och_shape_blur"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="false"
app:och_realtime_onece="true"
app:och_realtime_end_color="#BF6AA2D7"
app:och_realtime_radius="@dimen/dp_60"
app:och_realtime_start_color="#BFE0E8FF" />
<ImageView
android:id="@+id/iv_robot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_45"
android:layout_marginTop="@dimen/dp_84"
android:src="@drawable/taxi_p_passenger_check_robot"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_small_mogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_28"
android:layout_marginTop="@dimen/dp_88"
android:text="@string/taxi_p_check_small_mogo"
android:textColor="@color/taxi_p_check_keyboard_samll_mogo_color"
android:textSize="42px"
app:layout_constraintStart_toEndOf="@+id/iv_robot"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_taxi_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_14"
tools:text="蘑菇 3291号为您服务"
android:textColor="@color/taxi_p_check_keyboard_samll_mogo_color"
android:textSize="@dimen/dp_24"
app:layout_constraintStart_toStartOf="@+id/tv_small_mogo"
app:layout_constraintTop_toBottomOf="@+id/tv_small_mogo" />
<TextView
android:id="@+id/tv_taxi_passenger_number_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_84"
android:layout_marginTop="@dimen/dp_129"
android:text="@string/taxi_p_check_input_phone_tail_title"
android:textColor="@color/taxi_p_check_keyboard_samll_mogo_color"
android:textSize="@dimen/sp_36"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_taxi_number" />
<TextView
android:id="@+id/tv_taxi_passenger_number_first"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_150"
android:layout_marginTop="@dimen/dp_41"
android:layout_marginEnd="@dimen/dp_38"
style="@style/och_check_number_checked"
android:backgroundTintMode="screen"
android:gravity="center"
android:textSize="@dimen/dp_76"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_second"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_taxi_passenger_number_title" />
<TextView
android:id="@+id/tv_taxi_passenger_number_second"
android:layout_marginEnd="@dimen/dp_38"
style="@style/och_check_number"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_third"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_first"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_first" />
<TextView
android:id="@+id/tv_taxi_passenger_number_third"
android:layout_marginEnd="@dimen/dp_38"
style="@style/och_check_number"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_fourth"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_second"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_second" />
<TextView
android:id="@+id/tv_taxi_passenger_number_fourth"
style="@style/och_check_number"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_third"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_third" />
<TextView
android:id="@+id/tv_taxi_passenger_number_nine"
android:layout_marginEnd="@dimen/dp_30"
android:layout_marginBottom="@dimen/dp_98"
style="@style/och_check_number_keyboard"
android:text="9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_zero"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tv_taxi_passenger_number_zero"
android:layout_marginEnd="@dimen/dp_30"
android:text="0"
style="@style/och_check_number_keyboard"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_back"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_nine"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_nine" />
<TextView
android:id="@+id/tv_taxi_passenger_number_back"
android:layout_marginEnd="@dimen/dp_30"
android:background="@drawable/bg_taxi_p_keyboard_background"
android:text="x"
style="@style/och_check_number_keyboard"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_submit"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_zero"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_nine" />
<TextView
android:id="@+id/tv_taxi_passenger_number_submit"
style="@style/och_check_number_keyboard"
android:background="@drawable/bg_taxi_p_keyboard_submit_background"
android:text="确定"
android:textColor="@color/taxi_autopilot_text_color_normal"
android:textSize="@dimen/sp_36"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_back"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_nine" />
<TextView
android:id="@+id/tv_taxi_passenger_number_five"
style="@style/och_check_number_keyboard"
android:layout_marginEnd="@dimen/dp_30"
android:layout_marginBottom="@dimen/dp_30"
android:text="5"
app:layout_constraintBottom_toTopOf="@id/tv_taxi_passenger_number_nine"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_six"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tv_taxi_passenger_number_six"
style="@style/och_check_number_keyboard"
android:layout_marginEnd="@dimen/dp_30"
android:text="6"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_seven"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_five"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_five" />
<TextView
android:id="@+id/tv_taxi_passenger_number_seven"
style="@style/och_check_number_keyboard"
android:layout_marginEnd="@dimen/dp_30"
android:background="@drawable/bg_taxi_p_keyboard_background"
android:text="7"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_eight"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_six"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_five" />
<TextView
android:id="@+id/tv_taxi_passenger_number_eight"
style="@style/och_check_number_keyboard"
android:text="8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_seven"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_five" />
<TextView
android:id="@+id/tv_taxi_passenger_number_one"
style="@style/och_check_number_keyboard"
android:layout_marginEnd="@dimen/dp_30"
android:layout_marginBottom="@dimen/dp_30"
android:text="1"
app:layout_constraintBottom_toTopOf="@id/tv_taxi_passenger_number_five"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_two"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tv_taxi_passenger_number_two"
style="@style/och_check_number_keyboard"
android:layout_marginEnd="@dimen/dp_30"
android:text="2"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_three"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_one"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_one" />
<TextView
android:id="@+id/tv_taxi_passenger_number_three"
style="@style/och_check_number_keyboard"
android:layout_marginEnd="@dimen/dp_30"
android:text="3"
app:layout_constraintEnd_toStartOf="@+id/tv_taxi_passenger_number_four"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_two"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_one" />
<TextView
android:id="@+id/tv_taxi_passenger_number_four"
style="@style/och_check_number_keyboard"
android:text="4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/tv_taxi_passenger_number_three"
app:layout_constraintTop_toTopOf="@+id/tv_taxi_passenger_number_one" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.mogo.och.common.module.wigets.OCHBorderShadowLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -38,4 +38,17 @@
<color name="taxi_p_map_bg">#00000000</color>
<color name="taxi_p_check_passenger_number">#FFFFC836</color>
<color name="taxi_p_check_keyboard_input_field">#FF282F62</color>
<color name="taxi_p_check_keyboard_input_field_checked">#FFFFFF</color>
<color name="taxi_p_check_keyboard_input_field_checked_text_shadow">#FFFFFF</color>
<color name="taxi_p_check_hello_text_color">#7020466F</color>
<color name="taxi_p_check_hello_small_text_color">#8039388E</color>
<color name="taxi_p_check_keyboard_bg">#B630347D</color>
<color name="taxi_p_check_keyboard_samll_mogo_color">#151937</color>
</resources>

View File

@@ -24,4 +24,10 @@
<string name="taxi_p_arrive_end_tts">已达到目的地,请从右侧下车,感谢乘坐\'蘑菇车联\'无人驾驶车</string>
<string name="taxi_p_arrived_title">已到达</string>
<string name="taxi_p_arrived_end_tips">感谢您使用蘑菇车联自动驾驶出行服务,期待下次与您相遇</string>
<string name="taxi_p_check_hello_small_text">欢迎体验MOGO自动驾驶出租车</string>
<string name="taxi_p_check_hello_text">Hello您好</string>
<string name="taxi_p_check_input_phone_tail_title">请输出手机号后4位:</string>
<string name="taxi_p_check_small_mogo">小蘑菇</string>
</resources>

View File

@@ -11,4 +11,29 @@
<item name="android:textSize">32px</item>
</style>
<style name="och_check_number_checked">
<item name="android:background">@drawable/bg_taxi_p_checked_input_background</item>
<item name="android:textColor">@color/taxi_p_check_keyboard_input_field_checked</item>
</style>
<style name="och_check_number">
<item name="android:background">@drawable/bg_taxi_p_check_input_background</item>
<item name="android:textColor">@color/taxi_p_check_keyboard_input_field</item>
<item name="android:shadowColor">@color/taxi_p_check_keyboard_input_field_checked_text_shadow</item>
<item name="android:shadowDy">2</item>
<item name="android:shadowRadius">20</item>
<item name="android:textSize">@dimen/dp_76</item>
<item name="android:gravity">center</item>
<item name="android:layout_width">@dimen/dp_150</item>
<item name="android:layout_height">@dimen/dp_150</item>
</style>
<style name="och_check_number_keyboard">
<item name="android:layout_width">@dimen/dp_150</item>
<item name="android:layout_height">@dimen/dp_80</item>
<item name="android:background">@drawable/bg_taxi_p_keyboard_background</item>
<item name="android:gravity">center</item>
<item name="android:textColor">@color/taxi_p_check_keyboard_samll_mogo_color</item>
<item name="android:textSize">@dimen/dp_56</item>
</style>
</resources>

View File

@@ -236,6 +236,7 @@
android:text="@string/module_och_taxi_order_server_start"
android:textColor="#4DFFFFFF"
android:textSize="24sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1051,7 +1051,10 @@
<dimen name="sp_38">38px</dimen>
<dimen name="sp_40">40px</dimen>
<dimen name="sp_42">42px</dimen>
<dimen name="sp_46">46px</dimen>
<dimen name="sp_48">48px</dimen>
<dimen name="sp_76">76px</dimen>
<dimen name="sp_120">120px</dimen>
<dimen name="module_common_shadow_width">-10px</dimen>
<dimen name="module_common_shadow_width_pos">10px</dimen>
<dimen name="heart_ratingbar_width">34px</dimen>