[2.13.0-arch-opt] remove the check module and carcoder module

This commit is contained in:
zhongchao
2022-12-29 18:46:00 +08:00
parent 4cf6a0c5d8
commit e82dc525a3
102 changed files with 5 additions and 3685 deletions

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,65 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'com.alibaba.arouter'
}
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
// buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode Integer.valueOf(VERSION_CODE)
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
//ARouter apt 参数
kapt {
useBuildCache = false
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
implementation rootProject.ext.dependencies.coroutinescore
implementation rootProject.ext.dependencies.arouter
kapt rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation project(':libraries:map-usbcamera')
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogo_core_function_call
implementation rootProject.ext.dependencies.mogo_core_data
}else {
implementation project(':libraries:map-usbcamera')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-function-call')
implementation project(':core:mogo-core-data')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1,3 +0,0 @@
GROUP=com.mogo.eagle.core.function.impl
POM_ARTIFACT_ID=carcorder
VERSION_CODE=1

View File

@@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.eagle.core.function.carcorder">
<application>
<service
android:name=".service.CarcorderService"
android:enabled="true"
android:exported="true"
android:process=":uvcservice">
<intent-filter>
<action android:name="com.mogo.launcher.action.CARCORDER_SERVICE" />
</intent-filter>
</service>
</application>
</manifest>

View File

@@ -1,162 +0,0 @@
package com.mogo.eagle.core.function.carcorder.service
import android.content.Intent
import android.hardware.usb.UsbDevice
import android.os.IBinder
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_CORDER
import com.mogo.usbcamera.UVCCameraHelper
import com.serenegiant.usb.IFrameCallback
import com.serenegiant.usb.USBMonitor
import com.serenegiant.usb.USBMonitor.OnDeviceConnectListener
import com.serenegiant.usb.USBMonitor.UsbControlBlock
import com.serenegiant.usb.UVCCamera
import com.serenegiant.usb.common.BaseService
import com.serenegiant.usb.encoder.MediaVideoBufferEncoder
/**
* 行车记录仪服务
* @author donghongyu
*/
class CarcorderService : BaseService() {
private val DEBUG = true
val TAG = CarcorderService::class.java.name
// 挂载的USB设备集合
private var mDeviceList: List<UsbDevice>? = null
// USB 设备连接工具
private var mUSBMonitor: USBMonitor? = null
// 用于接入UVC摄像机
private var mUVCCamera: UVCCamera? = null
// 相机控制
private var mCtrlBlock: UsbControlBlock? = null
/**
* 配置相机基本按书
*/
private val previewWidth = 640
private val previewHeight = 480
// Default using MJPEG
// if your device is connected,but have no images
// please try to change it to FRAME_FORMAT_YUYV
val FRAME_FORMAT_MJPEG: Int = UVCCamera.FRAME_FORMAT_MJPEG
val MODE_BRIGHTNESS = UVCCamera.PU_BRIGHTNESS
val MODE_CONTRAST = UVCCamera.PU_CONTRAST
private val mFrameFormat = UVCCameraHelper.FRAME_FORMAT_MJPEG
override fun onCreate() {
super.onCreate()
if (DEBUG) {
CallerLogger.d("$M_CORDER$TAG", "onCreate……")
}
if (mUSBMonitor == null) {
mUSBMonitor = USBMonitor(applicationContext, mOnDeviceConnectListener)
mUSBMonitor!!.register()
mDeviceList = mUSBMonitor!!.deviceList
}
}
override fun onDestroy() {
super.onDestroy()
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "onDestroy:")
if (mUSBMonitor != null) {
mUSBMonitor!!.unregister()
mUSBMonitor = null
}
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
return super.onStartCommand(intent, flags, startId)
}
override fun onBind(intent: Intent): IBinder? {
return null
}
override fun onRebind(intent: Intent) {
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "onRebind:$intent")
}
override fun onUnbind(intent: Intent): Boolean {
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "onUnbind:$intent")
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "onUnbind:finished")
return true
}
//**********************************************************************************************************************************
private val mSync: Any = Any()
private val mVideoEncoder: MediaVideoBufferEncoder? = null
/**
* USB 设备连接监听
*/
private val mOnDeviceConnectListener: OnDeviceConnectListener = object : OnDeviceConnectListener {
override fun onAttach(device: UsbDevice) {
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "OnDeviceConnectListener#onAttach:${device.deviceName}---mDeviceList:${mDeviceList?.size}")
mUSBMonitor!!.requestPermission(device)
}
override fun onConnect(device: UsbDevice, ctrlBlock: UsbControlBlock, createNew: Boolean) {
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "OnDeviceConnectListener#onConnect:${device.deviceName}")
openCamera(device, ctrlBlock, createNew)
}
override fun onDisconnect(device: UsbDevice, ctrlBlock: UsbControlBlock) {
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "OnDeviceConnectListener#onDisconnect:${device.deviceName}")
}
override fun onDettach(device: UsbDevice) {
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "OnDeviceConnectListener#onDettach:${device.deviceName}")
}
override fun onCancel(device: UsbDevice) {
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "OnDeviceConnectListener#onCancel:${device.deviceName}")
}
}
/**
* 连接相机
*/
private fun openCamera(device: UsbDevice, ctrlBlock: UsbControlBlock, createNew: Boolean) {
if (mUVCCamera == null) {
mUVCCamera = UVCCamera()
mUVCCamera!!.open(ctrlBlock)
mUVCCamera!!.setStatusCallback { statusClass, event, selector, statusAttribute, data ->
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "IStatusCallback#onStatus(statusClass=${statusClass},event=${event},selector=${selector},statusAttribute=${statusAttribute},data=${data})")
}
try {
mUVCCamera!!.setPreviewSize(UVCCamera.DEFAULT_PREVIEW_WIDTH, UVCCamera.DEFAULT_PREVIEW_HEIGHT, UVCCamera.FRAME_FORMAT_MJPEG)
} catch (e: Exception) {
e.printStackTrace()
try {
mUVCCamera!!.setPreviewSize(UVCCamera.DEFAULT_PREVIEW_WIDTH, UVCCamera.DEFAULT_PREVIEW_HEIGHT, UVCCamera.DEFAULT_PREVIEW_MODE)
} catch (e: Exception) {
e.printStackTrace()
mUVCCamera!!.destroy()
}
}
mUVCCamera!!.setFrameCallback(mIFrameCallback, UVCCamera.PIXEL_FORMAT_YUV420SP)
mUVCCamera!!.startPreview()
}
}
/**
* 视频帧回掉
*/
private val mIFrameCallback = IFrameCallback { frame ->
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "IFrameCallback#onFrame:${frame}")
}
}

View File

@@ -1,53 +0,0 @@
package com.mogo.eagle.core.function.carcorder.service
import android.content.Intent
import android.os.IBinder
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_CORDER
import com.serenegiant.usb.common.BaseService
/**
* 行车记录仪服务
* @author donghongyu
*/
class LivePushService : BaseService() {
private val DEBUG = true
val TAG = LivePushService::class.java.name
override fun onCreate() {
super.onCreate()
if (DEBUG) {
CallerLogger.d("$M_CORDER$TAG", "onCreate……")
}
}
override fun onDestroy() {
super.onDestroy()
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "onDestroy:")
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
return super.onStartCommand(intent, flags, startId)
}
override fun onBind(intent: Intent): IBinder? {
return null
}
override fun onRebind(intent: Intent) {
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "onRebind:$intent")
}
override fun onUnbind(intent: Intent): Boolean {
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "onUnbind:$intent")
if (DEBUG) CallerLogger.d("$M_CORDER$TAG", "onUnbind:finished")
return true
}
}

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,39 +0,0 @@
# 状态检测模块
硬件检测范围
主激光雷达
侧激光雷达-2个
ADAS长焦摄像头-前
ADAS广角摄像头-前
ADAS标准摄像头-前
ADAS广角摄像头-后
RTK设备
OUB设备
PAD
路由器
自动驾驶软件检测范围 节点
车控节点
轨迹地图加载节点
轨迹规划节点
定位转化节点
融合节点
yolov5节点包含红绿灯检测
激光雷达渲染节点
摄像头驱动节点
gnss定位驱动节点
中激光驱动节点
左激光解码节点
左激光驱动节点
右激光解码节点
右激光驱动节点
监控节点
通讯交互节点
轨迹录制节点
can车辆控制节点
鹰眼
版本更新
自动驾驶版本
鹰眼版本
功能隐藏 不用适配

View File

@@ -1,74 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'com.alibaba.arouter'
}
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode Integer.valueOf(VERSION_CODE)
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
//ARouter apt 参数
kapt {
useBuildCache = false
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.androidxrecyclerview
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.arouter
implementation rootProject.ext.dependencies.coroutinesandroid
implementation rootProject.ext.dependencies.coroutinescore
implementation rootProject.ext.dependencies.rxandroid
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
implementation rootProject.ext.dependencies.material
kapt rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.callchatprovider
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogo_core_network
implementation rootProject.ext.dependencies.mogo_core_function_call
} else {
implementation project(":foudations:mogo-commons")
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-network')
implementation project(':core:mogo-core-function-call')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1,3 +0,0 @@
GROUP=com.mogo.eagle.core.function.impl
POM_ARTIFACT_ID=check
VERSION_CODE=1

View File

@@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.eagle.core.function.check">
<application>
<activity
android:name="com.mogo.eagle.core.function.check.view.CheckActivity"
android:launchMode="singleTask"
android:screenOrientation="landscape" />
</application>
</manifest>

View File

@@ -1,130 +0,0 @@
package com.mogo.eagle.core.function.check
import android.content.Context
import android.content.Intent
import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.commons.module.status.IMogoStatusChangedListener
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.commons.module.status.StatusDescriptor
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.function.api.check.ICheckProvider
import com.mogo.eagle.core.function.api.check.IMogoCheckListener
import com.mogo.eagle.core.function.check.api.ICheckResultCallBack
import com.mogo.eagle.core.function.check.net.CheckNetWork.checkNetWork
import com.mogo.eagle.core.function.check.net.CheckResultData
import com.mogo.eagle.core.function.check.view.CheckActivity
import com.mogo.eagle.core.function.check.view.CheckDialog
import com.mogo.eagle.core.function.report.IPCReportManager
import com.mogo.eagle.core.utilcode.util.*
import java.util.concurrent.ConcurrentHashMap
/**
* 鹰眼系统、自动驾驶系统 检测模块
*
* @date 4/21/21 3:39 PM
* 需求地址
* wikihttp://wiki.zhidaohulian.com/pages/viewpage.action?pageId=58204952
*/
@Route(path = MogoServicePaths.PATH_CHECK)
class VehicleMonitoringManager : ICheckProvider, IMogoStatusChangedListener {
private val TAG = "VehicleMonitoringManager"
private var mContext: Context? = null
private val mListeners: ConcurrentHashMap<String, IMogoCheckListener> = ConcurrentHashMap()
private var hasTipShow = false //是否已经弹框提示
var dialog: CheckDialog? = null
override val functionName: String
get() = "VehicleMonitoringManager"
override fun init(context: Context) {
mContext = context
MogoStatusManager.getInstance().registerStatusChangedListener(TAG,
StatusDescriptor.MAIN_PAGE_RESUME,
this)
//开启工控机监控节点上报服务
IPCReportManager.INSTANCE.initServer()
}
override fun registerVehicleMonitoringListener(module: String, listener: IMogoCheckListener) {
mListeners[module] = listener
}
override fun unregisterListener(module: String) {
mListeners.remove(module)
}
override fun startCheckActivity(context: Context) {
val starter = Intent(context, CheckActivity::class.java)
starter.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity(starter)
}
override fun showCheckDialog(context: Context) {
showDialog(context)
}
override fun checkMonitor(context: Context) {
checkNetWork( context, object : ICheckResultCallBack {
override fun callBackWithCheckData(data: CheckResultData) {
updateMonitoringStatus(TAG, data.data.vehicle.state)
if (data.data.vehicle.state == 1) {
hasTipShow = false
} else {
if (!hasTipShow) {
showDialog(context)
hasTipShow = true //已弹框
}
}
}
override fun callBackWithError(message: String, code: Int) {
}
})
}
/**
* 指标异常弹框
*/
private fun showDialog(context: Context) {
try {
if (AppStateManager.isActive() && AppUtils.isAppRunning(
AppUtils.getAppPackageName()
) && ActivityUtils.getTopActivity() !is CheckActivity
) {
if (dialog != null) {
dialog!!.dismiss()
}
dialog = CheckDialog(context, true)
dialog!!.show()
}
} catch (e: Exception) {
e.printStackTrace()
}
}
override fun updateMonitoringStatus(module: String, state: Int) {
for (listener in mListeners) {
listener.value.updateMonitoringStatus(state)
}
}
override fun onStatusChanged(descriptor: StatusDescriptor, isTrue: Boolean) {
if (descriptor == StatusDescriptor.MAIN_PAGE_RESUME) {
if (!isTrue) {
if (dialog != null && dialog!!.isShowing) {
dialog!!.dismiss()
}
}
}
}
override fun onDestroy() {
//停止工控机监控节点上报服务
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG,
StatusDescriptor.MAIN_PAGE_RESUME,
this)
IPCReportManager.INSTANCE.destroy()
}
}

View File

@@ -1,14 +0,0 @@
package com.mogo.eagle.core.function.check.api;
import com.mogo.eagle.core.function.check.net.CheckResultData;
/**
* @author liujing
* @description 自车检测结果回调
* @since: 9/28/21
*/
public interface ICheckResultCallBack {
void callBackWithCheckData(CheckResultData data);
void callBackWithError(String message, int code);
}

View File

@@ -1,138 +0,0 @@
package com.mogo.eagle.core.function.check.model;
import java.io.Serializable;
import java.util.ArrayList;
/**
* @author liujing
* @description 描述
* @since: 7/28/21
*/
public class CheckItemInfo implements Serializable {
//view类型
private int style;
//view顶端标题
private String viewTitle;
//icon 下第一行title 自动驾驶软件\鹰眼系统
private String title;
private String value;
private ArrayList itemList;
//是否存在异常
private boolean usual;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public ArrayList getItemList() {
return itemList;
}
public void setItemList(ArrayList itemList) {
this.itemList = itemList;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public boolean isUsual() {
return usual;
}
public void setUsual(boolean usual) {
this.usual = usual;
}
public int getStyle() {
return style;
}
public void setStyle(int style) {
this.style = style;
}
public String getViewTitle() {
return viewTitle;
}
public void setViewTitle(String viewTitle) {
this.viewTitle = viewTitle;
}
@Override
public String toString() {
return "CheckItemInfo{" +
"style=" + style +
", viewTitle='" + viewTitle + '\'' +
", title='" + title + '\'' +
", value='" + value + '\'' +
", itemList=" + itemList +
", usual=" + usual +
'}';
}
public static class DetailItem implements Serializable {
private boolean usual;
private String title;
private String value;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public boolean isUsual() {
return usual;
}
public void setUsual(boolean usual) {
this.usual = usual;
}
@Override
public String toString() {
return "DetailItem{" +
"usual=" + usual +
", title='" + title + '\'' +
", value='" + value + '\'' +
'}';
}
}
public interface CheckAdapterStyleEnum {
int ITEM_TYPE_CHECK_TITLE = 0;
int ITEM_TYPE_CHECK_LIST = 1;
int ITEM_TYPE_CHECK_IMAGE = 2;
}
public interface CheckInfoStyle {
String CHECK_INFO_STYLE_DEVICES = "devices";
String CHECK_INFO_STYLE_SOFT = "soft";
}
}

View File

@@ -1,32 +0,0 @@
package com.mogo.eagle.core.function.check.net;
import com.mogo.commons.constants.HostConst;
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
/**
* @author liujing
* @description 描述
* @since: 8/13/21
*/
public class CheckApiServiceFactory {
private static CheckApiServices mDataApiService;
/**
* 获取指定域名下的 API 服务
*/
public static CheckApiServices getApiService(String netHost) {
return MoGoRetrofitFactory.getInstance(netHost).create(CheckApiServices.class);
}
public static CheckApiServices getDataApiService() {
if (mDataApiService == null) {
synchronized (CheckApiServiceFactory.class) {
if (mDataApiService == null) {
mDataApiService = getApiService(HostConst.DATA_SERVICE_HOST);
}
}
}
return mDataApiService;
}
}

View File

@@ -1,18 +0,0 @@
package com.mogo.eagle.core.function.check.net;
import java.util.Map;
import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.QueryMap;
/**
* @author liujing
* @description 描述
* @since: 8/13/21
*/
public interface CheckApiServices {
@GET("/yycp-vehicle-management-service/monitor/license/detail")
Observable<CheckResultData> loadMonitorDetail(@QueryMap Map<String, Object> param);
}

View File

@@ -1,43 +0,0 @@
package com.mogo.eagle.core.function.check.net
import android.content.Context
import com.elegant.network.ParamsBuilder
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.function.check.api.ICheckResultCallBack
import com.mogo.eagle.core.network.RequestOptions
import com.mogo.eagle.core.network.SubscribeImpl
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
/**
* @author liujing
* @description 自测检测网络请求类
* @since: 10/12/21
*/
object CheckNetWork {
//网络请求,获取自车检测结果(工控机上报云端)
fun checkNetWork(context: Context, callbackFlow: ICheckResultCallBack) {
val params = ParamsBuilder.of(false)
.append("sn", MoGoAiCloudClientConfig.getInstance().sn)
.build()
CheckApiServiceFactory.getDataApiService().loadMonitorDetail(params)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : SubscribeImpl<CheckResultData>(RequestOptions.create(context)) {
override fun onSuccess(o: CheckResultData) {
super.onSuccess(o)
ThreadUtils.runOnUiThread { callbackFlow?.callBackWithCheckData(o) }
}
override fun onError(message: String, code: Int) {
super.onError(message, code)
ThreadUtils.runOnUiThread { callbackFlow?.callBackWithError(message, code) }
}
})
}
}

View File

@@ -1,278 +0,0 @@
package com.mogo.eagle.core.function.check.net;
import com.mogo.eagle.core.data.BaseData;
import java.io.Serializable;
import java.util.List;
/**
* @author liujing
* @description 描述
* @since: 8/13/21
*/
public class CheckResultData extends BaseData {
private Data data;
private boolean success;
public Data getData() {
return data;
}
public void setData(Data data) {
this.data = data;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
@Override
public String toString() {
return "CheckResultData{" +
"data=" + data +
", success=" + success +
'}';
}
public static class Data implements Serializable{
private Vehicle vehicle;
private List<CheckListItem> soft;
private List<CheckListItem> devices;
private Integer deviceState = 1;//硬件状态
private Integer softState = 0;//系统(软件)状态
public Vehicle getVehicle() {
return vehicle;
}
public void setVehicle(Vehicle vehicle) {
this.vehicle = vehicle;
}
public List<CheckListItem> getSoft() {
return soft;
}
public void setSoft(List<CheckListItem> soft) {
this.soft = soft;
}
public List<CheckListItem> getDevices() {
return devices;
}
public void setDevices(List<CheckListItem> devices) {
this.devices = devices;
}
public Integer getSoftState() {
return softState;
}
public void setSoftState(Integer softState) {
this.softState = softState;
}
public Integer getDeviceState() {
return deviceState;
}
public void setDeviceState(Integer deviceState) {
this.deviceState = deviceState;
}
@Override
public String toString() {
return "Data{" +
"vehicle=" + vehicle +
", soft=" + soft +
", devices=" + devices +
", softState=" + softState +
", deviceState=" + deviceState +
'}';
}
}
public static class Vehicle implements Serializable {
private String id;
private String sn;
private String vin;
private String carBrand;
private String carLicense;
private String carType;
private String userName;
private String userPhone;
private String carImage;
private double createTime;
private Integer state;
private Integer ipcState;
private Integer autoState;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getVin() {
return vin;
}
public void setVin(String vin) {
this.vin = vin;
}
public String getCarBrand() {
return carBrand;
}
public void setCarBrand(String carBrand) {
this.carBrand = carBrand;
}
public String getCarLicense() {
return carLicense;
}
public void setCarLicense(String carLicense) {
this.carLicense = carLicense;
}
public String getCarType() {
return carType;
}
public void setCarType(String carType) {
this.carType = carType;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserPhone() {
return userPhone;
}
public void setUserPhone(String userPhone) {
this.userPhone = userPhone;
}
public String getCarImage() {
return carImage;
}
public void setCarImage(String carImage) {
this.carImage = carImage;
}
public double getCreateTime() {
return createTime;
}
public void setCreateTime(double createTime) {
this.createTime = createTime;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public Integer getIpcState() {
return ipcState;
}
public void setIpcState(Integer ipcState) {
this.ipcState = ipcState;
}
public Integer getAutoState() {
return autoState;
}
public void setAutoState(Integer autoState) {
this.autoState = autoState;
}
@Override
public String toString() {
return "vehicle{" +
"id='" + id + '\'' +
", sn='" + sn + '\'' +
", vin='" + vin + '\'' +
", carBrand='" + carBrand + '\'' +
", carLicense='" + carLicense + '\'' +
", carType='" + carType + '\'' +
", userName='" + userName + '\'' +
", userPhone='" + userPhone + '\'' +
", carImage='" + carImage + '\'' +
", createTime='" + createTime + '\'' +
", state='" + state + '\'' +
", ipcState='" + ipcState + '\'' +
", autoState='" + autoState + '\'' +
'}';
}
}
public static class CheckListItem implements Serializable{
private String name;
private String stateValue;
private List<CheckResultData.CheckListItem> items;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Object getStateValue() {
return stateValue;
}
public void setStateValue(String stateValue) {
this.stateValue = stateValue;
}
public List getItems() {
return items;
}
public void setItems(List items) {
this.items = items;
}
@Override
public String toString() {
return "soft{" +
"name='" + name + '\'' +
", stateValue=" + stateValue +
", items=" + items +
'}';
}
}
}

View File

@@ -1,225 +0,0 @@
package com.mogo.eagle.core.function.check.view;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.eagle.core.function.check.R;
import com.mogo.eagle.core.function.check.api.ICheckResultCallBack;
import com.mogo.eagle.core.function.check.net.CheckNetWork;
import com.mogo.eagle.core.function.check.net.CheckResultData;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.eagle.core.utilcode.mogo.view.SpacesItemDecoration;
import java.math.BigDecimal;
/**
* @author liujing
* @description 车辆监控页面首页
* @since: 7/27/21
*/
public class CheckActivity extends AppCompatActivity {
private RecyclerView mRecyclerView;
private static CheckResultData sCheckResultData;
private ImageView mImageView;
//车模
private ImageView scanBottomCarImage;
//扫描束
private ImageView scanLineImage;
//车辆模型顶部色值加深车模
private ImageViewClipBounds scanTopImageView;
//车模顶部小部件图片
private ImageViewClipBounds tipsImageView;
//动画组
private AnimatorSet setAnimation = null;
private ValueAnimator mValueAnimator;
private float movement = 1162f;
//进度条
private ProgressBar mProgressBar;
private final static long DURATION_TIME = 1000;
private CheckAdapter mCheckAdapter;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_check);
initView();
}
@Override
protected void onStart() {
super.onStart();
animation();
checkAction();
}
/**
* 列表View初始化
*/
public void initView() {
setAnimation = new AnimatorSet();
mImageView = findViewById(R.id.btnBack);
scanBottomCarImage = findViewById(R.id.scan_car_image);
scanLineImage = findViewById(R.id.scan_line_image);
scanTopImageView = findViewById(R.id.scan_car_top_image);
tipsImageView = findViewById(R.id.scan_car_tips);
mProgressBar = findViewById(R.id.check_progress);
mImageView.setOnClickListener(v -> {
finish();
});
mRecyclerView = findViewById(R.id.check_list);
CheckLinearLayout linearLayoutManager =
new CheckLinearLayout(this, CheckLinearLayout.VERTICAL, false);
mRecyclerView.addItemDecoration(new SpacesItemDecoration((int) getResources().getDimension(R.dimen.check_item_space_vr)));
mRecyclerView.setLayoutManager(linearLayoutManager);
mCheckAdapter = new CheckAdapter(CheckActivity.this, sCheckResultData);
mRecyclerView.setAdapter(mCheckAdapter);
}
private void checkAction() {
CheckNetWork.INSTANCE.checkNetWork(this.getApplicationContext(), new ICheckResultCallBack() {
@Override
public void callBackWithCheckData(CheckResultData data) {
ThreadUtils.runOnUiThread(() -> {
if (data != null && mCheckAdapter != null) {
mCheckAdapter.errorMsg = null;
mCheckAdapter.mCheckResultData = data;
mCheckAdapter.notifyDataSetChanged();
}
});
}
@Override
public void callBackWithError(String message, int code) {
if (message != null) {
mCheckAdapter.errorMsg = message;
mCheckAdapter.notifyDataSetChanged();
}
}
});
}
/**
* **************************************************************************************检测动画
*/
public void animation() {
ObjectAnimator animatorX = ObjectAnimator.ofFloat(scanLineImage, "translationX",
scanBottomCarImage.getWidth(), 0);
ObjectAnimator animatorAl = ObjectAnimator.ofFloat(scanLineImage, "alpha",
0, 1);
setAnimation.playTogether(animatorX, animatorAl);
setAnimation.setDuration(DURATION_TIME);
setAnimation.start();
setAnimation.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
if (scanTopImageView != null) {
movement = (float) scanTopImageView.getWidth();
scanLineImage.setVisibility(View.VISIBLE);
scanTopImageView.setVisibility(View.VISIBLE);
tipsImageView.setVisibility(View.VISIBLE);
}
if (scanLineImage != null) {
scanLineImage
.animate()
.translationX(movement)
.setDuration(DURATION_TIME)
.setListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
animatorScanCarBorder(true, scanTopImageView.getWidth());
}
@Override
public void onAnimationEnd(Animator animation) {
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
}).start();
}
}
});
}
/**
* 扫描动画:实现扫描束位移+顶部深色车模及检测元件的显示
*/
public void animatorScanCarBorder(boolean show, int weight) {
if (show) {
mValueAnimator = ValueAnimator.ofInt(0, weight);
}
mValueAnimator.addUpdateListener(animation -> {
Rect rect = new Rect(0, 0, (int) mValueAnimator.getAnimatedValue(), scanTopImageView.getHeight());
setProgressBarRefresh((int) mValueAnimator.getAnimatedValue());
scanTopImageView.setClip(rect);
tipsImageView.setClip(rect);
});
mValueAnimator.setDuration(DURATION_TIME);
mValueAnimator.start();
}
/**
* 进度条状态刷新
*/
public void setProgressBarRefresh(int animateValue) {
if (mProgressBar != null) {
double scale = BigDecimal.valueOf((float) animateValue / scanBottomCarImage.getWidth())
.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() * 100;
if (mProgressBar.getProgress() < 100) {
mProgressBar.setProgress((int) scale);
} else {
findViewById(R.id.animationLayout).setVisibility(View.GONE);
}
}
}
@Override
protected void onPause() {
super.onPause();
if (mCheckAdapter != null) {
mCheckAdapter.dismissDialog();
}
}
@Override
protected void onStop() {
super.onStop();
}
@Override
protected void onRestart() {
super.onRestart();
}
@Override
protected void onDestroy() {
super.onDestroy();
mCheckAdapter.onDestroy();
}
}

View File

@@ -1,192 +0,0 @@
package com.mogo.eagle.core.function.check.view;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.eagle.core.function.check.R;
import com.mogo.eagle.core.function.check.model.CheckItemInfo;
import com.mogo.eagle.core.function.check.net.CheckResultData;
/**
* @author liujing
* @description 检测首页单元格
* @since: 7/27/21
*/
public class CheckAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
LayoutInflater mLayoutInflater;
CheckResultData mCheckResultData;
private Context mContext;
CheckInfoListDialog mCheckInfoListDialog;
String errorMsg;
public CheckAdapter(@NonNull Context context, @NonNull CheckResultData checkResult) {
mContext = context;
mCheckResultData = checkResult;
mLayoutInflater = LayoutInflater.from(mContext);
}
@Override
public int getItemViewType(int position) {
if (position == 0) {
return CheckItemInfo.CheckAdapterStyleEnum.ITEM_TYPE_CHECK_TITLE;
}
return CheckItemInfo.CheckAdapterStyleEnum.ITEM_TYPE_CHECK_LIST;
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
if (viewType == CheckItemInfo.CheckAdapterStyleEnum.ITEM_TYPE_CHECK_TITLE) {
View v = mLayoutInflater.inflate(R.layout.check_titel, parent,
false);
return new CheckTitleViewHolder(v);
}
View v = mLayoutInflater.inflate(R.layout.check_list, parent,
false);
return new CheckListViewHolder(v);
}
public void dismissDialog() {
if (mCheckInfoListDialog != null && mCheckInfoListDialog.isShowing()) {
mCheckInfoListDialog.dismiss();
}
}
public void onDestroy() {
mContext = null;
mCheckInfoListDialog = null;
}
/**
* 顶部view列表
*/
private static class CheckTitleViewHolder extends RecyclerView.ViewHolder {
private final ImageView errorImage;
private final TextView mTextView;
public CheckTitleViewHolder(@NonNull View itemView) {
super(itemView);
errorImage = itemView.findViewById(R.id.check_tip_image);
mTextView = itemView.findViewById(R.id.check_title);
}
}
/**
* 版本->软件检测
*/
private static class CheckListViewHolder extends RecyclerView.ViewHolder {
private final TextView viewTitle;
private TextView iconAutoTitle;
private final TextView autoRiskState;
private final ImageView iconAuto;
public CheckListViewHolder(@NonNull View itemView) {
super(itemView);
viewTitle = itemView.findViewById(R.id.list_item_title);
//自动驾驶
iconAuto = itemView.findViewById(R.id.icon_auto);
iconAutoTitle = itemView.findViewById(R.id.icon_auto_title);
autoRiskState = itemView.findViewById(R.id.auto_risk_state);
}
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
if (errorMsg != null) {
errorMsgShow(holder, position);
}
if (mCheckResultData == null || mCheckResultData.getData() == null) {
return;
}
try {
if (position == 0) {
if (mCheckResultData.getData().getVehicle().getState() == 1) {
((CheckTitleViewHolder) holder).errorImage.setImageResource(R.drawable.check_right);
((CheckTitleViewHolder) holder).mTextView.setText("车辆自检正常");
} else {
((CheckTitleViewHolder) holder).errorImage.setImageResource(R.drawable.check_wrong);
((CheckTitleViewHolder) holder).mTextView.setText("车辆存在异常项");
}
} else if (position == 1) {
((CheckListViewHolder) holder).viewTitle.setText("硬件检测:");
if (mCheckResultData.getData().getDeviceState() == 1) {
((CheckListViewHolder) holder).autoRiskState.setTextColor(
(mContext.getResources().getColor(R.color.check_little_btn_green)));
((CheckListViewHolder) holder).autoRiskState.setText("运行正常");
} else {
((CheckListViewHolder) holder).autoRiskState.setTextColor(
(mContext.getResources().getColor(R.color.check_icon_error_color)));
((CheckListViewHolder) holder).autoRiskState.setText("存在异常项");
}
((CheckListViewHolder) holder).iconAuto.setOnClickListener(v -> {
if (mCheckInfoListDialog != null) {
mCheckInfoListDialog.dismiss();
}
mCheckInfoListDialog = new CheckInfoListDialog(mContext, CheckItemInfo.CheckInfoStyle.CHECK_INFO_STYLE_DEVICES, mCheckResultData);
mCheckInfoListDialog.show();
});
} else if (position == 2) {
((CheckListViewHolder) holder).viewTitle.setText("系统检测:");
if (mCheckResultData.getData().getSoftState() == 1) {
((CheckListViewHolder) holder).autoRiskState.setTextColor(
(mContext.getResources().getColor(R.color.check_little_btn_green)));
((CheckListViewHolder) holder).autoRiskState.setText("运行正常");
} else {
((CheckListViewHolder) holder).autoRiskState.setTextColor(
(mContext.getResources().getColor(R.color.check_icon_error_color)));
((CheckListViewHolder) holder).autoRiskState.setText("存在异常项");
}
((CheckListViewHolder) holder).iconAuto.setOnClickListener(v -> {
if (mCheckInfoListDialog != null) {
mCheckInfoListDialog.dismiss();
}
mCheckInfoListDialog = new CheckInfoListDialog(mContext, CheckItemInfo.CheckInfoStyle.CHECK_INFO_STYLE_SOFT, mCheckResultData);
mCheckInfoListDialog.show();
});
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void errorMsgShow(@NonNull RecyclerView.ViewHolder holder, int position) {
switch (position) {
case 0:
((CheckTitleViewHolder) holder).mTextView.setText(errorMsg);
break;
case 1:
((CheckListViewHolder) holder).viewTitle.setText("硬件检测:");
((CheckListViewHolder) holder).autoRiskState.setText(errorMsg);
((CheckListViewHolder) holder).autoRiskState.setTextColor(
(mContext.getResources().getColor(R.color.check_icon_error_color)));
break;
case 2:
((CheckListViewHolder) holder).viewTitle.setText("系统检测:");
((CheckListViewHolder) holder).autoRiskState.setText(errorMsg);
((CheckListViewHolder) holder).autoRiskState.setTextColor(
(mContext.getResources().getColor(R.color.check_icon_error_color)));
break;
default:
}
}
@Override
public int getItemCount() {
return 3;
}
}

View File

@@ -1,78 +0,0 @@
package com.mogo.eagle.core.function.check.view;
import android.app.Dialog;
import android.content.Context;
import android.os.Build;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.mogo.eagle.core.function.call.check.CallerCheckManager;
import com.mogo.eagle.core.function.check.R;
/**
* @author liujing
* @description 车辆监控弹框提示(长时间未检测或者后台任务检测出现问题的弹框)
* 第一版本为添加长时间未检测的提示框,因为逻辑冲突,二期需求与产品确认,UI公用
* @since: 7/30/21
*/
public class CheckDialog extends Dialog {
private boolean showWarning;
private Context mContext;
public CheckDialog(@NonNull Context context, boolean hasError) {
super(context,R.style.CheckInfoDialogStyle);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
} else {
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
}
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE);
mContext = context;
showWarning = hasError;
initView();
}
public CheckDialog(@NonNull Context context, int themeResId) {
super(context, themeResId);
}
public void initView() {
setContentView(R.layout.check_dialog);
ImageView cancel = findViewById(R.id.cancel_button);
cancel.setOnClickListener(v -> {
dismiss();
});
TextView checkDetail = findViewById(R.id.check_detail);
checkDetail.setOnClickListener(v -> {
dismiss();
if (mContext != null) {
CallerCheckManager.startCheckActivity(mContext);
}
});
//根据条件显示体检页面/风险提示
if (showWarning) {
findViewById(R.id.error_view).setVisibility(View.VISIBLE);
findViewById(R.id.check_view).setVisibility(View.INVISIBLE);
} else {
findViewById(R.id.error_view).setVisibility(View.INVISIBLE);
findViewById(R.id.check_view).setVisibility(View.VISIBLE);
}
}
public void cancel() {
}
@Override
public void dismiss() {
super.dismiss();
}
}

View File

@@ -1,131 +0,0 @@
package com.mogo.eagle.core.function.check.view;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.eagle.core.function.check.R;
import com.mogo.eagle.core.function.check.net.CheckResultData;
import java.util.List;
/**
* @author liujing
* @description 点击自动驾驶icon显示各个检测指标结果
* @since: 9/23/21
*/
public class CheckInfoAdapter extends RecyclerView.Adapter {
LayoutInflater mLayoutInflater;
private Context mContext;
private String mStyle;
private final List<CheckResultData.CheckListItem> showData;
//item类型
public static final int ITEM_TYPE_CONTENT = 0;//内容
public static final int ITEM_TYPE_BOTTOM = 1;//footer类型
//适配UI的空白表格
private int mBottomCount = 0;
public CheckInfoAdapter(Context context, String style, List<CheckResultData.CheckListItem> checkResultData) {
mContext = context;
mStyle = style;
showData = checkResultData;
mLayoutInflater = LayoutInflater.from(context);
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
if (viewType == ITEM_TYPE_BOTTOM) {
View v = mLayoutInflater.inflate(R.layout.check_recycler_footer, parent,
false);
CheckInfoAdapter.CheckInfoFooter holder = new CheckInfoAdapter.CheckInfoFooter(v);
return holder;
}
View v = mLayoutInflater.inflate(R.layout.check_info_adapter, parent,
false);
CheckInfoAdapter.CheckInfoViewHolder holder = new CheckInfoViewHolder(v);
return holder;
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
try {
if (holder instanceof CheckInfoAdapter.CheckInfoViewHolder) {
if (position < showData.size() * 2) {
int index = position / 2;
CheckResultData.CheckListItem positionItem = showData.get(index);
if (isEven(position)) {//偶数隐藏图片显示检测指标
((CheckInfoViewHolder) holder).checkIcon.setVisibility(View.GONE);
((CheckInfoViewHolder) holder).mTextView.setText(positionItem.getName());
} else {//奇数显示图片和检测指标结果
((CheckInfoViewHolder) holder).checkIcon.setVisibility(View.VISIBLE);
String state = (String) positionItem.getStateValue();
if (state.equals("1")) {
((CheckInfoViewHolder) holder).mTextView.setText("正常");
((CheckInfoViewHolder) holder).checkIcon.setImageResource(R.drawable.check_right);
} else if ((state.equals("0"))) {
((CheckInfoViewHolder) holder).mTextView.setText("异常");
((CheckInfoViewHolder) holder).checkIcon.setImageResource(R.drawable.check_wrong);
} else {
((CheckInfoViewHolder) holder).mTextView.setText(state);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
public boolean isEven(int position) {
if (position % 2 == 0) {
System.out.println("偶数");
return true;
} else {
return false;
}
}
@Override
public int getItemCount() {
if (isEven(showData.size())) {
mBottomCount = 0;
} else {
mBottomCount = 1;
}
return showData.size() * 2 + mBottomCount;
}
private static class CheckInfoViewHolder extends RecyclerView.ViewHolder {
private final ImageView checkIcon;
private final TextView mTextView;
public CheckInfoViewHolder(View v) {
super(v);
checkIcon = v.findViewById(R.id.info_check_icon);
mTextView = v.findViewById(R.id.info_result_tx);
}
}
private static class CheckInfoFooter extends RecyclerView.ViewHolder {
public CheckInfoFooter(View v) {
super(v);
}
}
@Override
public int getItemViewType(int position) {
if (position > showData.size() * 2) {
return ITEM_TYPE_BOTTOM;
}
return ITEM_TYPE_CONTENT;
}
}

View File

@@ -1,160 +0,0 @@
package com.mogo.eagle.core.function.check.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.view.View;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
/**
* @author liujing
* @description 网格布局网格绘制类
* @since: 9/22/21
*/
public class CheckInfoGridItemDivider extends RecyclerView.ItemDecoration {
private static final int[] ATTRS = new int[]{android.R.attr.listDivider};
private final Drawable divider;
public CheckInfoGridItemDivider(Context context) {
final TypedArray a = context.obtainStyledAttributes(ATTRS);
divider = a.getDrawable(0);
a.recycle();
}
public CheckInfoGridItemDivider(Drawable drawable) {
divider = drawable;
}
public CheckInfoGridItemDivider(int height, int color) {
GradientDrawable shapeDrawable = new GradientDrawable();
shapeDrawable.setColor(color);
shapeDrawable.setShape(GradientDrawable.RECTANGLE);
shapeDrawable.setSize(height, height);
divider = shapeDrawable;
}
@Override
public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) {
drawHorizontal(c, parent);
drawVertical(c, parent);
}
private int getSpanCount(RecyclerView parent) {
// 列数
int spanCount = -1;
RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();
if (layoutManager instanceof GridLayoutManager) {
spanCount = ((GridLayoutManager) layoutManager).getSpanCount();
} else if (layoutManager instanceof StaggeredGridLayoutManager) {
spanCount = ((StaggeredGridLayoutManager) layoutManager)
.getSpanCount();
}
return spanCount;
}
public void drawHorizontal(Canvas c, RecyclerView parent) {
int childCount = parent.getChildCount(); //获取可见item的数量
int spanCount = getSpanCount(parent);
for (int i = 0; i < childCount; i++) {
final View child = parent.getChildAt(i);
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();
final int left = child.getLeft() - params.leftMargin;
final int right = child.getRight() + params.rightMargin
+ divider.getIntrinsicWidth();
final int top = child.getBottom() + params.bottomMargin;
final int bottom = top + divider.getIntrinsicHeight();
divider.setBounds(left, top, right, bottom);
divider.draw(c);
if (i < spanCount) { //画第一行顶部的分割线
drawHorizontalForFirstRow(c, child);
}
}
}
private void drawHorizontalForFirstRow(Canvas c, View child) {
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();
int left = child.getLeft() - params.leftMargin - divider.getIntrinsicWidth();
int top = child.getTop() - params.topMargin - divider.getIntrinsicHeight();
int right = child.getRight() + params.rightMargin + divider.getIntrinsicWidth();
int bottom = top + divider.getIntrinsicHeight();
divider.setBounds(left, top, right, bottom);
divider.draw(c);
}
private void drawVerticalForFirstColum(Canvas c, View child) {
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();//在父布局的
int left = child.getLeft() - params.leftMargin - divider.getIntrinsicWidth();
int top = child.getTop() - params.topMargin;
int right = child.getLeft() - params.leftMargin;
int bottom = top + child.getHeight() + divider.getIntrinsicHeight();
divider.setBounds(left, top, right, bottom);
divider.draw(c);
}
public void drawVertical(Canvas c, RecyclerView parent) {
final int childCount = parent.getChildCount();
for (int i = 0; i < childCount; i++) {
final View child = parent.getChildAt(i);
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();
final int top = child.getTop() - params.topMargin;
final int bottom = child.getBottom() + params.bottomMargin;
final int left = child.getRight() + params.rightMargin;
final int right = left + divider.getIntrinsicWidth();
divider.setBounds(left, top, right, bottom);
divider.draw(c);
if (isFirstColum(parent, i, getSpanCount(parent))) { //画第一列左边分割线
drawVerticalForFirstColum(c, child);
}
}
}
//是否为第一列
private boolean isFirstColum(RecyclerView parent, int pos, int spanCount) {
RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();
if (layoutManager instanceof GridLayoutManager) { //网格布局
if ((pos + 1) % spanCount == 1) {
return true;
}
}
return false;
}
//是否为第一行
private boolean isFirstRaw(int pos, int spanCount) {
return pos < spanCount;
}
@Override
public void getItemOffsets(Rect outRect, int itemPosition,
RecyclerView parent) {
int spanCount = getSpanCount(parent); //列数
if (itemPosition == 0) { //第一行第一个,四边都画
outRect.set(divider.getIntrinsicWidth(), divider.getIntrinsicHeight(),
divider.getIntrinsicWidth(), divider.getIntrinsicHeight());
} else if (isFirstRaw(itemPosition, spanCount)) { //第一行,画上下右三边
outRect.set(0, divider.getIntrinsicHeight(), divider.getIntrinsicWidth(), divider.getIntrinsicHeight());
} else if (isFirstColum(parent, itemPosition, spanCount)) { //第一列,画左右下三边
outRect.set(divider.getIntrinsicWidth(), 0, divider.getIntrinsicWidth(), divider.getIntrinsicHeight());
} else { //其他,画右下两边
outRect.set(0, 0, divider.getIntrinsicWidth(), divider.getIntrinsicHeight());
}
}
}

View File

@@ -1,124 +0,0 @@
package com.mogo.eagle.core.function.check.view;
import android.app.Dialog;
import android.content.Context;
import android.os.Build;
import android.view.WindowManager;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import com.mogo.eagle.core.function.check.R;
import com.mogo.eagle.core.function.check.model.CheckItemInfo;
import com.mogo.eagle.core.function.check.net.CheckResultData;
import java.util.ArrayList;
import java.util.List;
/**
* @author liujing
* @description 检测指标详情弹框
* @since: 9/22/21
*/
public class CheckInfoListDialog extends Dialog {
private static final String TAG = "CheckInfoListDialog";
private CheckInfoRecyclerView mRecyclerView;
private Context mContext;
private TextView titleView;
private int span;
private String mStyle;
private CheckResultData mCheckResultData;
private final List<CheckResultData.CheckListItem> result = new ArrayList<>();
public CheckInfoListDialog(@NonNull Context context, String style, CheckResultData checkResultData) {
super(context,R.style.CheckInfoDialogStyle);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
} else {
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
}
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE);
mContext = context;
mStyle = style;
mCheckResultData = checkResultData;
initView();
}
public CheckInfoListDialog(@NonNull Context context, int themeResId) {
super(context, themeResId);
}
public void initView() {
setContentView(R.layout.check_info_list);
mRecyclerView = findViewById(R.id.check_list_recycler);
titleView = findViewById(R.id.check_info_title);
if (mStyle.equals(CheckItemInfo.CheckInfoStyle.CHECK_INFO_STYLE_DEVICES)) {
titleView.setText("硬件自检结果");
} else {
titleView.setText("系统自检结果");
}
//网格布局
GridLayoutManager layoutManager = new GridLayoutManager(mContext, 4);
mRecyclerView.setLayoutManager(layoutManager);
layoutManager.setOrientation(GridLayoutManager.VERTICAL);
//网格绘制
try {
CheckInfoGridItemDivider gridLayoutDivider = new CheckInfoGridItemDivider(1,
(mContext.getResources().getColor(R.color.check_info_position_line_color)));
mRecyclerView.addItemDecoration(gridLayoutDivider);
} catch (Exception e) {
e.printStackTrace();
}
List<CheckResultData.CheckListItem> resultData = showInfoResult();
CheckInfoAdapter adapter = new CheckInfoAdapter(mContext, mStyle, resultData);
mRecyclerView.setAdapter(adapter);
//关闭按钮
findViewById(R.id.cancel_info_list_button).setOnClickListener(v -> {
dismiss();
});
}
public List<CheckResultData.CheckListItem> showInfoResult() {
if (result.size() > 0) {
result.clear();
}
try {
List<CheckResultData.CheckListItem> checkListResult = new ArrayList<CheckResultData.CheckListItem>();
try {
if (mStyle.equals(CheckItemInfo.CheckInfoStyle.CHECK_INFO_STYLE_DEVICES)) {
checkListResult = mCheckResultData.getData().getDevices();
} else {
checkListResult = mCheckResultData.getData().getSoft();
}
for (CheckResultData.CheckListItem item : checkListResult) {
if (item.getStateValue() != null) {
result.addAll(checkListResult);
}
if (item.getItems() != null) {
result.addAll(item.getItems());
}
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
}
return result;
}
public void cancel() {
}
@Override
public void dismiss() {
super.dismiss();
}
}

View File

@@ -1,42 +0,0 @@
package com.mogo.eagle.core.function.check.view;
import android.content.Context;
import android.util.AttributeSet;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.eagle.core.function.check.R;
/**
* @author liujing
* @description 列表自适应高+限高
* @since: 9/29/21
*/
public class CheckInfoRecyclerView extends RecyclerView {
private final int maxHeight = (int) getContext().getResources().getDimension(R.dimen.check_height);
private final int maxWeight = (int) getContext().getResources().getDimension(R.dimen.check_width);
public CheckInfoRecyclerView(@NonNull Context context) {
super(context);
}
public CheckInfoRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public CheckInfoRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onMeasure(int widthSpec, int heightSpec) {
super.onMeasure(widthSpec, heightSpec);
int limitHeight = getMeasuredHeight();
if (getMeasuredHeight() > maxHeight) {
limitHeight = maxHeight;
}
setMeasuredDimension(maxWeight, limitHeight);
}
}

View File

@@ -1,36 +0,0 @@
package com.mogo.eagle.core.function.check.view;
import android.content.Context;
import android.util.AttributeSet;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
/**
* @author liujing
* @description 描述
* @since: 7/27/21
*/
class CheckLinearLayout extends LinearLayoutManager {
public CheckLinearLayout(Context context) {
super(context);
}
public CheckLinearLayout(Context context, int orientation, boolean reverseLayout) {
super(context, orientation, reverseLayout);
}
public CheckLinearLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
try {
super.onLayoutChildren(recycler, state);
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
}
}
}

View File

@@ -1,57 +0,0 @@
package com.mogo.eagle.core.function.check.view;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.util.AttributeSet;
import androidx.appcompat.widget.AppCompatImageView;
import java.util.Objects;
/**
* @author donghongyu
* @date 2019-08-22
*/
public class ImageViewClipBounds extends AppCompatImageView {
Rect mClipBounds = null;
public ImageViewClipBounds(Context context) {
this(context, null);
}
public ImageViewClipBounds(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public ImageViewClipBounds(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onDraw(Canvas canvas) {
if (mClipBounds != null) {
// clip bounds ignore scroll
canvas.clipRect(mClipBounds);
}
super.onDraw(canvas);
}
public void setClip(Rect clipBounds) {
if (Objects.equals(clipBounds, mClipBounds)) {
return;
}
if (clipBounds != null) {
if (mClipBounds == null) {
mClipBounds = new Rect(clipBounds);
} else {
mClipBounds.set(clipBounds);
}
} else {
mClipBounds = null;
}
invalidate();
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#4192FF"/>
<corners android:radius="55dp"/>
</shape>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="6dp" />
<gradient
android:angle="180"
android:endColor="#2B6EFF"
android:startColor="#3DCCFF" />
</shape>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#2B6EFF"/>
<corners android:radius="55dp"/>
</shape>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/check_list_item_back"/>
<corners android:radius="30dp"/>
</shape>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/check_info_position_line_color" />
</shape>
</item>
<item
android:left="@dimen/dp_3"
android:right="@dimen/dp_1"
android:top="@dimen/dp_3"
android:bottom="@dimen/dp_1">
<shape>
<solid android:color="@color/check_info_title_back" />
</shape>
</item>
</layer-list>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_30" />
<gradient
android:angle="180"
android:endColor="@color/check_list_item_back"
android:startColor="@color/check_list_item_back"
android:type="linear" />
</shape>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="@dimen/check_little_btn_width"
android:height="@dimen/check_little_btn_width" />
//填充
<solid android:color="@color/check_little_btn_solid" />
//描边
<stroke
android:width="2dp"
android:color="@color/check_little_btn" />
</shape>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="@dimen/check_little_btn_width"
android:height="@dimen/check_little_btn_width" />
//填充
<solid android:color="@color/check_little_btn_solid_green" />
//描边
<stroke
android:width="2dp"
android:color="@color/check_little_btn_green" />
</shape>

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="@dimen/dp_33" />
<solid android:color="#0B1030" />
</shape>
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape>
<corners android:radius="@dimen/dp_33" />
<solid android:color="#3DCCFF" />
<gradient
android:angle="180"
android:endColor="#2B6EFF"
android:startColor="#3DCCFF" />
</shape>
</scale>
</item>
<item android:id="@android:id/secondaryProgress">
<scale android:scaleWidth="100%">
<shape>
<corners android:radius="@dimen/dp_33" />
<solid android:color="#0B1030" />
</shape>
</scale>
</item>
</layer-list>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="3dp"
android:color="@color/check_info_shape_color" />
<padding
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="0dp" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 KiB

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/check_info_position_line_color" />
</shape>
</item>
<item
android:left="@dimen/dp_2"
android:right="0dp"
android:top="0dp"
android:bottom="0dp">
<shape>
<solid android:color="@color/check_info_title_back" />
</shape>
</item>
</layer-list>

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:bottom="0dp"
android:left="0dp"
android:right="0dp"
android:top="0dp">
<shape>
<solid android:color="@color/check_info_title_back" />
</shape>
</item>
</layer-list>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="3dp"
android:color="@color/check_info_shape_color" />
<padding
android:bottom="0dp"
android:left="2dp"
android:right="2dp"
android:top="2dp" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,105 +0,0 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue_back_color"
tools:context="com.mogo.eagle.core.function.check.view.CheckActivity">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/check_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<ImageView
android:id="@+id/btnBack"
android:layout_width="@dimen/dp_106"
android:layout_height="@dimen/dp_106"
android:layout_marginLeft="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_50"
android:src="@drawable/dark_clore_close"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/animationLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue_back_color">
<ImageView
android:id="@+id/scan_car_image"
android:layout_width="@dimen/check_scan_width"
android:layout_height="@dimen/check_scan_height"
android:layout_marginTop="@dimen/dp_400"
android:src="@drawable/check_scan_first"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.check.view.ImageViewClipBounds
android:id="@+id/scan_car_top_image"
android:layout_width="@dimen/check_scan_width"
android:layout_height="@dimen/check_scan_height"
android:scaleType="fitXY"
android:src="@drawable/check_scan_second"
android:visibility="invisible"
app:layout_constraintLeft_toLeftOf="@id/scan_car_image"
app:layout_constraintTop_toTopOf="@id/scan_car_image" />
<com.mogo.eagle.core.function.check.view.ImageViewClipBounds
android:id="@+id/scan_car_tips"
android:layout_width="@dimen/check_scan_width"
android:layout_height="@dimen/check_scan_height"
android:layout_marginLeft="@dimen/dp_699"
android:layout_marginTop="@dimen/dp_400"
android:layout_marginRight="@dimen/dp_699"
android:scaleType="fitEnd"
android:src="@drawable/check_scan_tips"
android:visibility="invisible"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/check_progress_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_120"
android:text="自动驾驶车辆体检中,请稍候……"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/scan_car_image" />
<ProgressBar
android:id="@+id/check_progress"
style="@style/check_progressBar_scale"
android:layout_width="@dimen/dp_520"
android:layout_height="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_57"
android:max="100"
android:progress="0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/check_progress_text" />
<ImageView
android:id="@+id/scan_line_image"
android:layout_width="@dimen/dp_25"
android:layout_height="@dimen/dp_652"
android:layout_marginTop="@dimen/dp_370"
android:src="@drawable/scan_tip_line"
app:layout_constraintLeft_toLeftOf="@id/scan_car_image"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,121 +0,0 @@
<?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:layout_width="1529dp"
android:layout_height="720dp"
android:layout_gravity="center"
android:background="@drawable/check_dialog_back">
<ImageView
android:id="@+id/cancel_button"
android:layout_width="@dimen/dp_106"
android:layout_height="@dimen/dp_106"
android:layout_marginLeft="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_30"
android:src="@drawable/dark_clore_close"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView"
android:layout_width="@dimen/dp_795"
android:layout_height="@dimen/dp_484"
android:layout_marginEnd="@dimen/dp_50"
android:layout_marginBottom="@dimen/dp_78"
android:src="@drawable/check_tip_image"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/error_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_97"
android:layout_marginTop="@dimen/dp_225"
android:visibility="visible"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/error_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="自动驾驶车辆存在风险"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_54"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@id/error_view"
app:layout_constraintTop_toTopOf="@id/error_view" />
<ImageView
android:id="@+id/error_image"
android:layout_width="@dimen/dp_56"
android:layout_height="@dimen/dp_56"
android:layout_marginTop="@dimen/dp_25"
android:src="@drawable/check_wrong"
app:layout_constraintTop_toBottomOf="@id/error_title"
tools:ignore="MissingConstraints" />
<TextView
android:id="@+id/error_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_26"
android:layout_marginTop="@dimen/dp_23"
android:text="软件运行异常"
android:textColor="@color/check_tip_error_color"
android:textSize="@dimen/dp_38"
app:layout_constraintLeft_toRightOf="@+id/error_image"
app:layout_constraintTop_toBottomOf="@id/error_title" />
<TextView
android:id="@+id/check_detail"
android:layout_width="@dimen/dp_287"
android:layout_height="@dimen/dp_100"
android:layout_marginTop="@dimen/dp_70"
android:background="@drawable/check_detail"
android:gravity="center"
android:text="查看详情"
android:textColor="@android:color/white"
android:textSize="@dimen/check_button_text_size"
app:layout_constraintTop_toBottomOf="@id/error_image"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/check_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_133"
android:layout_marginTop="@dimen/dp_200"
android:visibility="invisible"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/check_text_view"
android:layout_width="@dimen/dp_520"
android:layout_height="wrap_content"
android:text="您的自动驾驶系统已经很久没有进行体检了,建议立即体检。"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_44"
tools:ignore="MissingConstraints" />
<TextView
android:id="@+id/check_button"
android:layout_width="@dimen/dp_287"
android:layout_height="@dimen/dp_100"
android:layout_marginTop="@dimen/dp_70"
android:background="@drawable/check_button"
android:gravity="center"
android:text="立即体检"
android:textColor="@android:color/white"
android:textSize="@dimen/check_button_text_size"
app:layout_constraintTop_toBottomOf="@id/check_text_view"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,314 +0,0 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/dp_100"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginEnd="@dimen/dp_100"
android:layout_marginBottom="@dimen/dp_15"
android:background="@drawable/check_list_item_back">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_50"
android:gravity="left"
android:text="硬件检测:"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_goneMarginTop="@dimen/dp_50" />
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_50"
android:text="(下面 1 项存在异常)"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42"
app:layout_constraintLeft_toRightOf="@+id/title"
app:layout_constraintTop_toTopOf="parent" />
<!--角激光文字-->
<TextView
android:id="@+id/jiaoJiGuangTop_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/check_image"
android:layout_marginStart="@dimen/dp_1000"
android:layout_marginTop="@dimen/dp_236"
android:gravity="center"
android:text="角激光"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!--车辆模型-->
<RelativeLayout
android:id="@+id/check_image"
android:layout_width="@dimen/check_hard_ware_image_width"
android:layout_height="@dimen/check_hard_ware_image_height"
android:layout_marginLeft="@dimen/dp_460"
android:layout_marginTop="144dp"
android:background="@drawable/check_scan_first"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<!--Pad-->
<ImageView
android:id="@+id/pad"
android:layout_width="@dimen/dp_95"
android:layout_height="@dimen/dp_145"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_292"
android:src="@drawable/pad_unusual" />
<TextView
android:id="@+id/pad_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/pad"
android:layout_alignEnd="@+id/pad"
android:layout_centerVertical="true"
android:gravity="center"
android:text="Pad"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42" />
<!--前摄像头3-->
<TextView
android:id="@+id/camera_front_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/camera"
android:layout_marginStart="@dimen/dp_434"
android:layout_marginBottom="@dimen/dp_42"
android:gravity="center"
android:text="摄像头"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42" />
<LinearLayout
android:id="@+id/camera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_65"
android:layout_toEndOf="@+id/pad"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/top"
android:layout_width="@dimen/dp_56"
android:layout_height="@dimen/dp_56"
android:src="@drawable/camera_usual" />
<ImageView
android:id="@+id/middle"
android:layout_width="@dimen/dp_56"
android:layout_height="@dimen/dp_56"
android:layout_marginTop="@dimen/dp_10"
android:src="@drawable/camera_usual" />
<ImageView
android:id="@+id/bottom"
android:layout_width="@dimen/dp_56"
android:layout_height="@dimen/dp_56"
android:layout_marginTop="@dimen/dp_10"
android:src="@drawable/camera_usual" />
</LinearLayout>
<!--角激光-->
<ImageView
android:id="@+id/jiaoJiGuangTop"
android:layout_width="@dimen/dp_70"
android:layout_height="@dimen/dp_70"
android:layout_marginLeft="@dimen/dp_57"
android:layout_marginTop="@dimen/dp_100"
android:layout_toEndOf="@+id/camera"
android:src="@drawable/zhujiguang_usual" />
<ImageView
android:id="@+id/jiaoJiGuangBottom"
android:layout_width="@dimen/dp_70"
android:layout_height="@dimen/dp_70"
android:layout_alignTop="@+id/jiaoJiGuangTop"
android:layout_marginLeft="@dimen/dp_57"
android:layout_marginTop="@dimen/dp_440"
android:layout_toEndOf="@+id/camera"
android:src="@drawable/zhujiguang_usual" />
<!--主激光-->
<ImageView
android:id="@+id/zhujiguang"
android:layout_width="@dimen/dp_140"
android:layout_height="@dimen/dp_140"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_77"
android:layout_toEndOf="@+id/camera"
android:src="@drawable/zhujiguang_usual" />
<TextView
android:id="@+id/zhujiguang_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/zhujiguang"
android:layout_alignEnd="@+id/zhujiguang"
android:layout_centerVertical="true"
android:gravity="center"
android:text="主激光"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42" />
<!--RTK-->
<ImageView
android:id="@+id/rtk"
android:layout_width="@dimen/dp_140"
android:layout_height="@dimen/dp_80"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_48"
android:layout_toEndOf="@+id/zhujiguang"
android:src="@drawable/rtk_usual" />
<TextView
android:id="@+id/rtk_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/rtk"
android:layout_alignEnd="@+id/rtk"
android:layout_centerVertical="true"
android:gravity="center"
android:text="RTK"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42" />
<!--摄像头-后1-->
<ImageView
android:id="@+id/camera_begind"
android:layout_width="@dimen/dp_56"
android:layout_height="@dimen/dp_56"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_78"
android:layout_toEndOf="@+id/rtk"
android:src="@drawable/camera_usual" />
<TextView
android:id="@+id/camera_begind_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/camera_begind"
android:layout_marginStart="@dimen/dp_972"
android:layout_marginBottom="@dimen/dp_42"
android:gravity="center"
android:text="摄像头"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42" />
<!--路由器-->
<ImageView
android:id="@+id/luyouqi"
android:layout_width="@dimen/dp_77"
android:layout_height="@dimen/dp_90"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_38"
android:layout_toEndOf="@+id/camera_begind"
android:src="@drawable/luyouqi_usual" />
<TextView
android:id="@+id/luyouqi_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/luyouqi"
android:layout_marginStart="@dimen/check_luyouqi_start"
android:layout_marginTop="@dimen/dp_42"
android:gravity="center"
android:text="路由器"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42" />
<!--OBU-->
<ImageView
android:id="@+id/obu"
android:layout_width="@dimen/dp_140"
android:layout_height="@dimen/dp_80"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_140"
android:layout_toEndOf="@+id/luyouqi"
android:src="@drawable/obu_unusual" />
</RelativeLayout>
<!--角激光文字-->
<TextView
android:id="@+id/jiaoJiGuangBottom_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/check_image"
android:layout_marginStart="@dimen/dp_1000"
android:gravity="center"
android:text="角激光"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/check_image" />
<!--OBU文案-->
<TextView
android:id="@+id/obu_top_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/check_image"
android:layout_marginStart="@dimen/check_obu_start"
android:layout_marginTop="@dimen/dp_236"
android:gravity="center"
android:text="OBU"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/error_tip"
android:layout_width="@dimen/dp_42"
android:layout_height="@dimen/dp_42"
android:layout_marginLeft="@dimen/dp_907"
android:layout_marginTop="@dimen/dp_177"
android:background="@drawable/check_little_btn"
android:backgroundTint="@color/check_tip_error_color"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/check_image" />
<TextView
android:id="@+id/unusual_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_24"
android:text="设备故障"
android:textColor="@android:color/white"
app:layout_constraintLeft_toRightOf="@+id/error_tip"
app:layout_constraintTop_toTopOf="@+id/error_tip" />
<ImageView
android:id="@+id/error_tip_green"
android:layout_width="@dimen/dp_42"
android:layout_height="@dimen/dp_42"
android:layout_marginLeft="@dimen/dp_160"
android:layout_marginTop="88dp"
android:background="@drawable/check_little_btn_green"
app:layout_constraintLeft_toRightOf="@id/unusual_title"
app:layout_constraintTop_toBottomOf="@+id/check_image" />
<TextView
android:id="@+id/usual_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_24"
android:text="设备正常"
android:textColor="@android:color/white"
app:layout_constraintLeft_toRightOf="@+id/error_tip_green"
app:layout_constraintTop_toTopOf="@+id/error_tip_green" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,38 +0,0 @@
<?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"
android:layout_width="@dimen/dp_405"
android:layout_height="@dimen/dp_127"
android:layout_gravity="left">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/dp_38"
android:layout_marginRight="@dimen/dp_10"
android:gravity="left"
android:paddingRight="@dimen/dp_25"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/info_check_icon"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_marginRight="@dimen/dp_24"
android:layout_gravity="center" />
<TextView
android:id="@+id/info_result_tx"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="left"
android:maxLines="2"
android:textColor="#fff"
android:textSize="@dimen/dp_38"
app:layout_constraintLeft_toRightOf="@+id/info_check_icon" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,78 +0,0 @@
<?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:layout_width="1900dp"
android:layout_height="1140dp"
android:layout_gravity="center"
android:background="@drawable/check_dialog_back">
<ImageView
android:id="@+id/cancel_info_list_button"
android:layout_width="@dimen/dp_106"
android:layout_height="@dimen/dp_106"
android:layout_marginLeft="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_30"
android:src="@drawable/dark_clore_close"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/check_info_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_70"
android:gravity="center"
android:text="自检结果"
android:textColor="#fff"
android:textSize="@dimen/dp_42"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include
android:id="@+id/check_title_item"
layout="@layout/check_info_title_item"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_127"
android:layout_marginLeft="@dimen/dp_143"
android:layout_marginTop="@dimen/dp_66"
android:layout_marginRight="@dimen/dp_143"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/check_info_title"></include>
<View
android:id="@+id/line_top"
android:layout_width="3dp"
android:layout_height="@dimen/dp_127"
android:layout_marginTop="@dimen/dp_66"
android:background="@color/check_info_shape_color"
app:layout_constraintBottom_toBottomOf="@+id/check_list_recycler"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/check_info_title"
app:layout_constraintVertical_bias="0.0" />
<com.mogo.eagle.core.function.check.view.CheckInfoRecyclerView
android:id="@+id/check_list_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_143"
android:layout_marginRight="@dimen/dp_143"
android:layout_marginBottom="@dimen/dp_80"
android:background="@drawable/check_recycler_shape"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/check_title_item" />
<View
android:layout_width="3dp"
android:layout_height="0dp"
android:background="@color/check_info_shape_color"
app:layout_constraintBottom_toBottomOf="@+id/check_list_recycler"
app:layout_constraintEnd_toEndOf="@id/check_list_recycler"
app:layout_constraintStart_toStartOf="@id/check_list_recycler"
app:layout_constraintTop_toTopOf="@id/check_list_recycler" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,78 +0,0 @@
<?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"
android:layout_width="@dimen/check_width"
android:layout_height="@dimen/dp_127"
android:background="@drawable/check_top_item_shape"
android:orientation="horizontal">
<TextView
android:id="@+id/title_one"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@drawable/check_top_item_no_line_shape"
android:gravity="left"
android:paddingLeft="@dimen/dp_40"
android:paddingTop="@dimen/dp_42"
android:text="模块名称"
android:textColor="#FFF"
android:textSize="@dimen/dp_38"
android:textStyle="bold"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/title_two"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/title_two"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@drawable/check_top_item_left_shape"
android:paddingLeft="@dimen/dp_40"
android:paddingTop="@dimen/dp_42"
android:text="运行状态"
android:textColor="#FFF"
android:textSize="@dimen/dp_38"
android:textStyle="bold"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@+id/title_one"
app:layout_constraintRight_toLeftOf="@+id/title_thr"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/title_thr"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@drawable/check_top_item_left_shape"
android:paddingLeft="@dimen/dp_40"
android:paddingTop="@dimen/dp_42"
android:text="模块名称"
android:textColor="#FFF"
android:textSize="@dimen/dp_38"
android:textStyle="bold"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@+id/title_two"
app:layout_constraintRight_toLeftOf="@+id/title_for"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/title_for"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@drawable/check_top_item_left_shape"
android:paddingLeft="@dimen/dp_40"
android:paddingTop="@dimen/dp_42"
android:text="运行状态"
android:textColor="#FFF"
android:textSize="@dimen/dp_38"
android:textStyle="bold"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@+id/title_thr"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,116 +0,0 @@
<?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:layout_width="2360dp"
android:layout_height="@dimen/dp_525"
android:layout_marginStart="@dimen/dp_100"
android:layout_marginBottom="@dimen/dp_24"
android:layout_marginEnd="@dimen/dp_100"
android:background="@drawable/check_list_item_back">
<TextView
android:id="@+id/list_item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_80"
android:layout_marginLeft="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_50"
android:text="硬件检测:"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!--自动驾驶应用-->
<LinearLayout
android:id="@+id/auto_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_318"
android:layout_marginBottom="@dimen/dp_70"
android:descendantFocusability="blocksDescendants"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title">
<ImageView
android:id="@+id/icon_auto"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_150"
android:layout_gravity="center"
android:src="@drawable/auto"
android:clickable="true"/>
<TextView
android:id="@+id/icon_auto_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_22"
android:maxLines="2"
android:text="自动驾驶"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42"
app:layout_constraintTop_toBottomOf="@id/icon_auto" />
<TextView
android:id="@+id/auto_risk_state"
android:layout_width="@dimen/dp_260"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_20"
android:gravity="center"
android:text="暂无数据"
android:textColor="@color/check_icon_error_color"
android:textSize="@dimen/dp_36"
app:layout_constraintTop_toTopOf="@+id/icon_auto_title" />
</LinearLayout>
<LinearLayout
android:id="@+id/ying_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_318"
android:layout_marginTop="@dimen/dp_78"
android:layout_marginBottom="@dimen/dp_108"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/auto_layout"
app:layout_constraintTop_toBottomOf="@+id/title">
<ImageView
android:id="@+id/icon_ying"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_150"
android:layout_gravity="center"
android:src="@drawable/yingyan" />
<TextView
android:id="@+id/icon_ying_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_22"
android:text=" 鹰眼\n版本"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_42"
app:layout_constraintTop_toBottomOf="@id/icon_auto" />
<TextView
android:id="@+id/ying_risk_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_56"
android:textColor="@color/check_little_btn_green"
android:textSize="@dimen/dp_36"
app:layout_constraintTop_toTopOf="@+id/icon_auto_title" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_300"
android:background="@color/check_list_item_back">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,32 +0,0 @@
<?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"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_450"
android:layout_marginStart="@dimen/dp_100"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginEnd="@dimen/dp_100"
android:layout_marginBottom="@dimen/dp_15">
<ImageView
android:id="@+id/check_tip_image"
android:layout_width="@dimen/dp_140"
android:layout_height="@dimen/dp_140"
android:layout_marginStart="@dimen/dp_856"
android:layout_marginTop="@dimen/dp_144"
android:src="@drawable/check_wrong"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/check_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_65"
android:layout_marginTop="@dimen/dp_20"
android:text="暂无数据,请关闭重试"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_64"
app:layout_constraintLeft_toRightOf="@+id/check_tip_image"
app:layout_constraintTop_toTopOf="@+id/check_tip_image" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="check_width">1900dp</dimen>
<dimen name="check_height">730dp</dimen>
<dimen name="check_item_space_vr">30dp</dimen>
<dimen name="check_button_text_size">38dp</dimen>
<dimen name="check_button_left">133dp</dimen>
<dimen name="check_image_bottom">50dp</dimen>
<dimen name="check_image_right">50dp</dimen>
<dimen name="check_hard_ware_image_width">1452dp</dimen>
<dimen name="check_hard_ware_image_height">715dp</dimen>
<dimen name="check_little_btn_width">32dp</dimen>
<dimen name="check_luyouqi_start">1078dp</dimen>
<dimen name="check_obu_start">1660dp</dimen>
<dimen name="check_scan_width">1162dp</dimen>
<dimen name="check_scan_height">570dp</dimen>
</resources>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="blue_back_color">#1A1F40</color>
<color name="blue_check_color">#4192FF</color>
<color name="check_tip_error_color">#F03232</color>
<color name="check_little_btn_solid">#99FA1F21</color>
<color name="check_little_btn">#FF1F1F</color>
<color name="check_little_btn_solid_green">#997AFF87</color>
<color name="check_little_btn_green">#7AFF87</color>
<color name="check_list_item_back">#242B59</color>
<color name="check_icon_error_color">#EE3132</color>
<color name="check_info_position_line_color">#666DA5</color>
<color name="check_info_shape_color">#767FCD</color>
<color name="check_info_title_back">#1C2149</color>
</resources>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<dimen name="check_width">1900dp</dimen>
<dimen name="check_height">730dp</dimen>
<dimen name="check_item_space_vr">30dp</dimen>
<dimen name="check_button_text_size">38dp</dimen>
<dimen name="check_button_left">133dp</dimen>
<dimen name="check_image_bottom">50dp</dimen>
<dimen name="check_image_right">50dp</dimen>
<dimen name="check_hard_ware_image_width">1452dp</dimen>
<dimen name="check_hard_ware_image_height">715dp</dimen>
<dimen name="check_little_btn_width">32dp</dimen>
<dimen name="check_luyouqi_start">1078dp</dimen>
<dimen name="check_obu_start">1660dp</dimen>
<dimen name="check_scan_width">1162dp</dimen>
<dimen name="check_scan_height">570dp</dimen>
</resources>

View File

@@ -1 +0,0 @@
<resources></resources>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="check_progressBar_scale" parent="@android:style/Widget.ProgressBar.Horizontal">
<item name="android:indeterminateDrawable">
@android:drawable/progress_indeterminate_horizontal
</item>
<item name="android:progressDrawable">@drawable/check_progress</item>
<item name="android:listDivider">@drawable/check_item_left_shape</item>
</style>
<style name="CheckInfoDialogStyle" parent="@android:style/Theme.Dialog">
<item name="android:windowIsFloating">true</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:backgroundDimAmount">0.6</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:fullBright">@android:color/transparent</item>
<item name="android:fullDark">@android:color/transparent</item>
<item name="android:topBright">@android:color/transparent</item>
<item name="android:topDark">@android:color/transparent</item>
<item name="android:borderlessButtonStyle">@android:color/transparent</item>
</style>
</resources>

View File

@@ -17,6 +17,7 @@ import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigImpl
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
import com.zhjt.mogo_core_function_devatools.mofang.MoFangManager
import com.zhjt.mogo_core_function_devatools.monitor.MonitorManager
import com.zhjt.mogo_core_function_devatools.report.IPCReportManager
import com.zhjt.mogo_core_function_devatools.scene.SceneManager.Companion.sceneManager
import com.zhjt.mogo_core_function_devatools.status.*
import com.zhjt.mogo_core_function_devatools.trace.TraceManager.Companion.traceManager
@@ -42,6 +43,8 @@ class DevaToolsProvider : IDevaToolsProvider {
traceManager.init(mContext!!)
bizConfigCenter.init(mContext!!)
FuncConfigImpl.init()
//开启工控机监控节点上报服务
IPCReportManager.INSTANCE.initServer()
MogoLogCatchManager.init(mContext!!)
MoFangManager.INSTANCE.init(mContext!!)
}

View File

@@ -1,14 +0,0 @@
package com.zhjt.mogo_core_function_devatools.feedback.biz
import com.zhjt.mogo_core_function_devatools.badcase.repository.net.api.entity.UploadResult
import com.zhjt.mogo_core_function_devatools.feedback.biz.bean.Feedback
internal interface IFeedbackPresenter {
suspend fun loadFeedBacks(): List<Feedback>
suspend fun getBadCaseTaskId(): Int
suspend fun upload(params: Map<String, String>): UploadResult?
}

View File

@@ -1,28 +0,0 @@
package com.zhjt.mogo_core_function_devatools.feedback.biz.bean
import com.zhjt.mogo_core_function_devatools.badcase.repository.net.api.entity.BadCaseResponse.Reason
internal sealed class Feedback {
class BadCase(var remark: Remark, var reasons: List<Reason>): Feedback() {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as BadCase
if (reasons != other.reasons) return false
return true
}
override fun hashCode(): Int {
return reasons.hashCode()
}
}
}
/**
* 记录文本编辑框的状态
* @param text: 文件编辑框中输入的文字
* @param cursorPos: 光标位置
*/
data class Remark(var text: CharSequence = "", var cursorPos: Int = 0)

View File

@@ -1,25 +0,0 @@
package com.zhjt.mogo_core_function_devatools.feedback.biz.diff
import androidx.recyclerview.widget.DiffUtil
import com.zhjt.mogo_core_function_devatools.feedback.biz.bean.Feedback
import com.zhjt.mogo_core_function_devatools.feedback.biz.bean.Feedback.BadCase
internal class FeedbackDiffCallback<T: Feedback>(private val oldData: List<T>?, private val newData: List<T>?): DiffUtil.Callback() {
override fun getOldListSize(): Int {
return oldData?.size ?: 0
}
override fun getNewListSize(): Int = newData?.size ?: 0
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean = oldData?.takeIf { it.size > oldItemPosition }?.equals(newData?.takeIf { it.size > newItemPosition }) ?: false
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
val oldItem = oldData?.get(oldItemPosition)
val newItem = newData?.get(newItemPosition)
if (oldItem == null || newItem == null) {
return false
}
return oldItem == newItem
}
}

View File

@@ -1,28 +0,0 @@
package com.zhjt.mogo_core_function_devatools.feedback.biz.impl
import com.zhjt.mogo_core_function_devatools.badcase.biz.BadCasePresenter
import com.zhjt.mogo_core_function_devatools.badcase.repository.net.api.entity.UploadResult
import com.zhjt.mogo_core_function_devatools.feedback.biz.IFeedbackPresenter
import com.zhjt.mogo_core_function_devatools.feedback.biz.bean.Feedback
import com.zhjt.mogo_core_function_devatools.feedback.biz.bean.Feedback.BadCase
import com.zhjt.mogo_core_function_devatools.feedback.biz.bean.Remark
internal class FeedbackPresenter: IFeedbackPresenter {
private val badCase by lazy {
BadCasePresenter()
}
override suspend fun loadFeedBacks(): List<Feedback> = mutableListOf<Feedback>().also {
//添加BadCase数据
it += BadCase(Remark(), badCase.loadBadCases(false))
}
override suspend fun getBadCaseTaskId(): Int {
return badCase.getTaskId()
}
override suspend fun upload(params: Map<String, String>): UploadResult? {
return badCase.upload(params)
}
}

View File

@@ -1,28 +0,0 @@
package com.zhjt.mogo_core_function_devatools.feedback.callback
import android.view.View
import android.widget.TextView
import com.zhjt.mogo_core_function_devatools.badcase.repository.net.api.entity.BadCaseResponse.Reason
internal interface IFeedbackCallback {
/**
* 点击关闭弹窗按钮时回调
*/
fun onClose(v: View)
/**
* BadCase某一条目被点击了
*/
fun onBadCaseItemClicked(reason: Reason)
/**
* 点击开始录制
*/
fun onStartBadCaseRecord(record: TextView)
/**
* 点击停止录制
*/
fun onStopBadCaseRecord(record: TextView)
}

View File

@@ -1,4 +1,4 @@
package com.mogo.eagle.core.function.report
package com.zhjt.mogo_core_function_devatools.report
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.msgbox.MsgBoxBean

View File

@@ -81,10 +81,8 @@ dependencies {
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
api rootProject.ext.dependencies.mogoaicloudservicesdk
api rootProject.ext.dependencies.mogocommons
api rootProject.ext.dependencies.mogoservice
api rootProject.ext.dependencies.mogomap
api rootProject.ext.dependencies.crashreportupgrade
// api rootProject.ext.dependencies.crashreportbugly
api rootProject.ext.dependencies.mogo_core_res
api rootProject.ext.dependencies.mogo_core_data
@@ -94,7 +92,6 @@ dependencies {
api rootProject.ext.dependencies.mogo_core_function_notice
api rootProject.ext.dependencies.mogo_core_function_bindingcar
api rootProject.ext.dependencies.mogo_core_function_autopilot
api rootProject.ext.dependencies.mogo_core_function_check
api rootProject.ext.dependencies.mogo_core_function_map
api rootProject.ext.dependencies.mogo_core_function_v2x
api rootProject.ext.dependencies.mogo_core_function_monitoring
@@ -104,12 +101,10 @@ dependencies {
api rootProject.ext.dependencies.mogo_core_function_msgbox
implementation project(':libraries:map-usbcamera')
implementation project(':libraries:mogo-adas-other')
} else {
api project(':foudations:mogo-aicloud-services-sdk')
api project(':foudations:mogo-commons')
api project(':test:crashreport-upgrade')
// api project(':test:crashreport-bugly')
api project(':test:crashreport-apmbyte')
api project(':core:mogo-core-res')
@@ -117,13 +112,11 @@ dependencies {
api project(':core:mogo-core-utils')
api project(':core:function-impl:mogo-core-function-obu-mogo')
api project(':core:function-impl:mogo-core-function-autopilot')
api project(':core:function-impl:mogo-core-function-check')
api project(':core:function-impl:mogo-core-function-map')
api project(':core:function-impl:mogo-core-function-notice')
api project(':core:function-impl:mogo-core-function-v2x')
api project(':core:function-impl:mogo-core-function-monitoring')
api project(':core:function-impl:mogo-core-function-devatools')
api project(':core:function-impl:mogo-core-function-carcorder')
api project(':core:function-impl:mogo-core-function-dispatch')
api project(':core:function-impl:mogo-core-function-chat')
api project(':core:function-impl:mogo-core-function-bindingcar')

View File

@@ -58,7 +58,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
import com.mogo.eagle.core.function.call.check.CallerCheckManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.*
@@ -504,12 +503,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
if (toolsView == null) {
toolsView = AutoPilotAndCheckView(it)
toolsView!!.setClickListener(object : AutoPilotAndCheckView.ClickListener {
override fun go2CheckPage() {
// 启动检测页面
CallerCheckManager.startCheckActivity(context)
dismissToolsFloatView()
}
override fun onClose(v: View) {
dismissToolsFloatView()
}

View File

@@ -22,7 +22,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
@@ -100,9 +99,6 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
sopLayout.setOnClickListener {
clickListener?.showSOPSettingView()
}
viewCheckStatus.setOnClickListener {
clickListener?.go2CheckPage()
}
ivDebugPanel.setOnClickListener {
clickListener?.showDebugPanelView()
@@ -221,7 +217,6 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
}
interface ClickListener {
fun go2CheckPage()
fun onClose(v: View)
fun showDebugPanelView()
fun showFeedbackView()

View File

@@ -1,63 +0,0 @@
package com.mogo.eagle.core.function.hmi.ui.widget
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.function.api.check.IMogoCheckListener
import com.mogo.eagle.core.function.call.check.CallerCheckManager
import com.mogo.eagle.core.function.hmi.R
import kotlinx.android.synthetic.main.view_check_status.view.*
/**
*@author xiaoyuzhou
*@date 2021/8/6 12:25 下午
*/
class CheckStatusView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMogoCheckListener {
private val TAG = "CheckStatusView"
init {
LayoutInflater.from(context).inflate(R.layout.view_check_status, this, true)
}
private fun showErrorIcon() {
errorTipImage.visibility = View.VISIBLE
}
private fun dismissErrorIcon() {
errorTipImage.visibility = View.GONE
}
override fun updateMonitoringStatus(state: Int?) {
if (state == 1) {
dismissErrorIcon()
} else {
showErrorIcon()
}
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
//车辆监控
if (isInEditMode) {
return
}
CallerCheckManager.registerVehicleMonitoringListener(TAG, this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
//车辆监控
if (isInEditMode) {
return
}
CallerCheckManager.unregisterListener(TAG)
}
}

View File

@@ -244,8 +244,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_AI_DISPATCH, "IDispatchProvider"));
// V2X 模块
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider"));
// 自动驾驶系统检测模块
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_CHECK, "CheckProvider"));
// 绑定车辆
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_BINDING_CAR, "IMoGoBindingcarProvider"));

View File

@@ -47,29 +47,6 @@
app:layout_constraintStart_toStartOf="@+id/tv_check_title"
app:layout_constraintTop_toBottomOf="@+id/v_second_group">
<RelativeLayout
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone">
<com.mogo.eagle.core.function.hmi.ui.widget.CheckStatusView
android:id="@+id/viewCheckStatus"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_centerHorizontal="true" />
<TextView
android:id="@+id/tvCheck"
android:layout_width="wrap_content"
android:layout_height="42dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="@string/check_vehicle_detection"
android:textColor="@color/color_FFA7B6F0"
android:textSize="32dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/debug"
android:layout_width="wrap_content"

View File

@@ -5,21 +5,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--车辆检测入口-->
<!-- <TextView-->
<!-- android:id="@+id/moduleHmiCheck"-->
<!-- android:layout_width="@dimen/module_hmi_check_size"-->
<!-- android:layout_height="@dimen/module_hmi_check_size"-->
<!-- android:background="@drawable/module_ext_check"-->
<!-- android:gravity="center"-->
<!-- android:text="检测"-->
<!-- android:textColor="#fff"-->
<!-- android:textSize="@dimen/module_switch_text_size"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- android:visibility="gone"-->
<!-- />-->
<ImageView
android:id="@+id/ivCheckIcon"
android:layout_width="150dp"