Merge branch 'dev_1.1.2' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into dev_1.1.2
# Conflicts: # app/build.gradle # services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java # services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java # services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java # settings.gradle
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -40,6 +40,7 @@
|
||||
<option value="$PROJECT_DIR$/modules/mogo-module-main" />
|
||||
<option value="$PROJECT_DIR$/modules/mogo-module-map" />
|
||||
<option value="$PROJECT_DIR$/modules/mogo-module-media" />
|
||||
<option value="$PROJECT_DIR$/modules/mogo-module-monitor" />
|
||||
<option value="$PROJECT_DIR$/modules/mogo-module-obu" />
|
||||
<option value="$PROJECT_DIR$/modules/mogo-module-push" />
|
||||
<option value="$PROJECT_DIR$/modules/mogo-module-push-base" />
|
||||
|
||||
@@ -276,6 +276,7 @@ dependencies {
|
||||
}
|
||||
implementation rootProject.ext.dependencies.moduletanluapi
|
||||
|
||||
implementation rootProject.ext.dependencies.mogomonitor
|
||||
} else {
|
||||
launcherImplementation project(':main-extensions:mogo-module-main-launcher')
|
||||
independentImplementation project(':main-extensions:mogo-module-main-independent')
|
||||
@@ -291,6 +292,7 @@ dependencies {
|
||||
exclude group: 'com.mogo.module', module: 'module-share'
|
||||
}
|
||||
implementation project(':libraries:mogo-tanlu-api')
|
||||
implementation project(':modules:mogo-module-monitor')
|
||||
}
|
||||
|
||||
apply from: "./functions/baseservices.gradle"
|
||||
|
||||
@@ -177,6 +177,8 @@ targetSdkVersion : 22,
|
||||
mogobaseserviceapk : "com.mogo.base:services-apk:${MOGO_BASE_SERVICES_APK_VERSION}",
|
||||
// loglib
|
||||
mogologlib : "com.mogo.module:module-loglib:${LOGLIB_VERSION}",
|
||||
// monitor
|
||||
mogomonitor : "com.mogo.module:module-monitor:${MOGO_MODULE_MONITOR_VERSION}",
|
||||
|
||||
// google
|
||||
googlezxing : "com.google.zxing:core:3.3.3",
|
||||
|
||||
@@ -443,8 +443,8 @@ public class DateTimeUtils {
|
||||
* @param timestamp 时间戳
|
||||
* @return
|
||||
*/
|
||||
public static String getTimeText( long timestamp) {
|
||||
SimpleDateFormat format = new SimpleDateFormat(yyyy_Nian_MM_Yue_dd_Ri, Locale.US);
|
||||
public static String getTimeText( long timestamp, String dateFormat) {
|
||||
SimpleDateFormat format = new SimpleDateFormat(dateFormat, Locale.US);
|
||||
String strStart = format.format(new Date(timestamp));
|
||||
return strStart;
|
||||
}
|
||||
|
||||
@@ -103,10 +103,12 @@ MOGO_MODULE_SPLASH_VERSION = 1.0.0-SNAPSHOT
|
||||
MOGO_MODULE_SPLASH_NOOP_VERSION = 1.0.0-SNAPSHOT
|
||||
|
||||
# loglib
|
||||
LOGLIB_VERSION = 1.0.0-SNAPSHOT
|
||||
LOGLIB_VERSION = 1.0.1-SNAPSHOT
|
||||
# monitor
|
||||
MOGO_MODULE_MONITOR_VERSION = 1.0.0-SNAPSHOT
|
||||
|
||||
## 产品库必备配置,产品库自动对versionCode和versionName版本进行升级
|
||||
applicationId=com.mogo.launcer
|
||||
applicationName=IntelligentPilot
|
||||
versionCode=80006
|
||||
versionName=8.0.6
|
||||
versionCode=80007
|
||||
versionName=8.0.7
|
||||
@@ -28,9 +28,16 @@ public class MainIndependentActivity extends MainActivity {
|
||||
@Override
|
||||
protected void initViews() {
|
||||
super.initViews();
|
||||
// 控制层
|
||||
FrameLayout.LayoutParams entranceParams = ( ( FrameLayout.LayoutParams ) mEntrance.getLayoutParams() );
|
||||
entranceParams.leftMargin = getResources().getDimensionPixelSize( R.dimen.module_main_entrance_fragment_container_marginLeft );
|
||||
mEntrance.setLayoutParams( entranceParams );
|
||||
|
||||
// 事件面板
|
||||
FrameLayout.LayoutParams eventPanelParams = ( ( FrameLayout.LayoutParams ) mEventPanel.getLayoutParams() );
|
||||
eventPanelParams.leftMargin = getResources().getDimensionPixelSize( R.dimen.module_main_entrance_fragment_container_marginLeft );
|
||||
mEntrance.setLayoutParams( eventPanelParams );
|
||||
|
||||
mLeftShadowFrame.setVisibility(View.VISIBLE);
|
||||
mApps.setVisibility( View.GONE );
|
||||
}
|
||||
|
||||
@@ -13,10 +13,12 @@ import com.mogo.utils.WindowUtils;
|
||||
* 采用windowManager实现接口
|
||||
*/
|
||||
class WindowManagerImpl implements IWindowManagerView {
|
||||
|
||||
private WindowManager mWindowManager;
|
||||
private WindowManager.LayoutParams mLayoutParams;
|
||||
private WindowManagerView.WMViewParams mParams;
|
||||
private boolean isShowing;
|
||||
|
||||
@Override
|
||||
public void init(WindowManagerView.WMViewParams params) {
|
||||
mParams = params;
|
||||
@@ -31,16 +33,11 @@ class WindowManagerImpl implements IWindowManagerView {
|
||||
mLayoutParams.gravity = Gravity.CENTER;
|
||||
mLayoutParams.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||
|
||||
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
|
||||
mLayoutParams.width = 1920;
|
||||
mLayoutParams.height = 1080;
|
||||
} else {
|
||||
mLayoutParams.width = WindowUtils.getScreenWidth( mParams.mContext );
|
||||
mLayoutParams.height = WindowUtils.getScreenHeight( mParams.mContext );
|
||||
}
|
||||
mLayoutParams.width = mParams.mWidth;
|
||||
mLayoutParams.height = mParams.mHeight;
|
||||
mLayoutParams.x = mParams.mX;
|
||||
mLayoutParams.y = mParams.mY;
|
||||
mLayoutParams.dimAmount = 0.5f;
|
||||
mLayoutParams.x = 0;
|
||||
mLayoutParams.y = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,20 +1,12 @@
|
||||
package com.mogo.module.common.wm;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.os.Build;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.LayoutRes;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.utils.WindowUtils;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-05-21
|
||||
@@ -25,56 +17,82 @@ public class WindowManagerView {
|
||||
|
||||
private WMViewParams mParams;
|
||||
|
||||
private IWindowManagerView managerView;
|
||||
private IWindowManagerView mManagerView;
|
||||
|
||||
private WindowManagerView(WMViewParams params) {
|
||||
private WindowManagerView( WMViewParams params, IWindowManagerView view ) {
|
||||
this.mParams = params;
|
||||
managerView = new DialogImpl();
|
||||
managerView.init(params);
|
||||
// init();
|
||||
mManagerView = view;
|
||||
view.init( params );
|
||||
}
|
||||
|
||||
public boolean isShowing() {
|
||||
return managerView.isShowing();
|
||||
return mManagerView.isShowing();
|
||||
}
|
||||
|
||||
public <T extends View> T findViewById(@IdRes int id) {
|
||||
return mParams.mContentView.findViewById(id);
|
||||
public < T extends View > T findViewById( @IdRes int id ) {
|
||||
return mParams.mContentView.findViewById( id );
|
||||
}
|
||||
|
||||
public void show() {
|
||||
managerView.show();
|
||||
mManagerView.show();
|
||||
}
|
||||
|
||||
public void dismiss() {
|
||||
managerView.hide();
|
||||
mManagerView.hide();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private WMViewParams mParams = null;
|
||||
|
||||
public Builder(Context context) {
|
||||
public Builder( Context context ) {
|
||||
mParams = new WMViewParams();
|
||||
mParams.mContext = context;
|
||||
}
|
||||
|
||||
public Builder contentView(View contentView) {
|
||||
public Builder contentView( View contentView ) {
|
||||
mParams.mContentView = contentView;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder contentView(@LayoutRes int contentViewId) {
|
||||
mParams.mContentView = LayoutInflater.from(mParams.mContext).inflate(contentViewId,
|
||||
null);
|
||||
public Builder contentView( @LayoutRes int contentViewId ) {
|
||||
mParams.mContentView = LayoutInflater.from( mParams.mContext ).inflate( contentViewId, null );
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder size( int width, int height ) {
|
||||
mParams.mWidth = width;
|
||||
mParams.mHeight = height;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder position( int x, int y ) {
|
||||
mParams.mX = x;
|
||||
mParams.mY = y;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认dialog实现
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public WindowManagerView build() {
|
||||
if (mParams.mContentView == null) {
|
||||
throw new NullPointerException("WMViewParams#mContentView must not be null.");
|
||||
return showInDialog();
|
||||
}
|
||||
|
||||
public WindowManagerView showInDialog() {
|
||||
if ( mParams.mContentView == null ) {
|
||||
throw new NullPointerException( "WMViewParams#mContentView must not be null." );
|
||||
}
|
||||
return new WindowManagerView(mParams);
|
||||
return new WindowManagerView( mParams, new DialogImpl() );
|
||||
}
|
||||
|
||||
public WindowManagerView showInWindowManager() {
|
||||
if ( mParams.mContentView == null ) {
|
||||
throw new NullPointerException( "WMViewParams#mContentView must not be null." );
|
||||
}
|
||||
return new WindowManagerView( mParams, new WindowManagerImpl() );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -83,5 +101,9 @@ public class WindowManagerView {
|
||||
|
||||
public View mContentView;
|
||||
public Context mContext;
|
||||
public int mWidth;
|
||||
public int mHeight;
|
||||
public int mX;
|
||||
public int mY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,6 +204,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mApis.getSearchManagerApi().goSettings();
|
||||
return true;
|
||||
});
|
||||
|
||||
mUploadRoadCondition.setOnLongClickListener(view->{
|
||||
mApis.getMogoMonitorApi().showLogDebugDialog();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
ConstraintLayout rootView = findViewById(R.id.module_entrance_id_top_motion_layout);
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.monitor.IMogoMonitorProvider;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.autopilot.support.api.AutopilotServiceManage;
|
||||
@@ -59,8 +60,9 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
// protected View mHeader;
|
||||
protected View mApps;
|
||||
protected View mEntrance;
|
||||
protected View mEventPanel;
|
||||
protected FrameLayout mFloatingLayout;
|
||||
protected FrameLayout mCoverUpLayout;
|
||||
protected View mCoverUpLayout;
|
||||
protected FrameLayout mLeftPanelLayout;
|
||||
protected View mLeftShadowFrame;
|
||||
private boolean mIsHomeKeyDown = false;
|
||||
@@ -78,6 +80,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
// mHeader = findViewById( R.id.module_main_id_header_fragment_container );
|
||||
mApps = findViewById( R.id.module_main_id_apps_fragment_container );
|
||||
mEntrance = findViewById( R.id.module_main_id_entrance_fragment_container );
|
||||
mEventPanel = findViewById( R.id.module_main_id_event_panel_fragment_container );
|
||||
mFloatingLayout = findViewById( R.id.module_main_id_floating_view );
|
||||
mLeftShadowFrame = findViewById( R.id.module_main_id_map_left_shadow_frame );
|
||||
mCoverUpLayout = findViewById( R.id.module_main_id_cover_up );
|
||||
@@ -93,6 +96,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
protected void hideLayout() {
|
||||
// mHeader.setVisibility( View.GONE );
|
||||
mEntrance.setVisibility( View.GONE );
|
||||
mEventPanel.setVisibility( View.GONE );
|
||||
mFloatingLayout.setVisibility( View.GONE );
|
||||
}
|
||||
|
||||
@@ -100,6 +104,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
protected void showLayout() {
|
||||
// mHeader.setVisibility( View.VISIBLE );
|
||||
mEntrance.setVisibility( View.VISIBLE );
|
||||
mEventPanel.setVisibility( View.VISIBLE );
|
||||
mFloatingLayout.setVisibility( View.VISIBLE );
|
||||
}
|
||||
|
||||
@@ -170,6 +175,11 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
hideLayout();
|
||||
}
|
||||
} );
|
||||
|
||||
// 初始化MonitorModule
|
||||
IMogoMonitorProvider monitorProvider = (IMogoMonitorProvider) ARouter.getInstance().build(MogoServicePaths.PATH_MOGO_MONITOR).navigation(this);
|
||||
monitorProvider.resetActivityContext(this);
|
||||
|
||||
}
|
||||
|
||||
private void startBaseService() {
|
||||
@@ -257,7 +267,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
// f 系列加上上滑返回桌面后会走 mIsHomeKeyDown = true,但是不会造成页面pause
|
||||
// 独立 app 任何情况下都需要隐藏 adas
|
||||
return !mIsHomeKeyDown
|
||||
|| CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X
|
||||
|| !DebugConfig.isLauncher();
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--黑色矩形 作为背景色-->
|
||||
<item>
|
||||
<shape>
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:centerX="0.6"
|
||||
android:endColor="#0B0F17"
|
||||
android:startColor="#171D2B"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
</item>
|
||||
<!--单独的slogan图片 并且设置下间距-->
|
||||
<!--如果使用svg可以直接 drawable-->
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/mogo_slogan"
|
||||
android:tileMode="disabled" />
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -66,13 +66,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<FrameLayout
|
||||
<ImageView
|
||||
android:id="@+id/module_main_id_cover_up"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/module_main_launcher_bg"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@drawable/main_bitmap_splash_bg"
|
||||
android:visibility="visible"
|
||||
tools:visibility="gone" />
|
||||
/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_splash_container"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<item name="android:windowEnterAnimation">@null</item>
|
||||
<item name="android:windowExitAnimation">@null</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowBackground">@drawable/module_main_launcher_bg</item>
|
||||
<item name="android:windowBackground">@drawable/main_bitmap_splash_bg</item>
|
||||
<item name="android:windowTranslucentNavigation">false</item>
|
||||
<item name="android:windowAnimationStyle">@style/MainAnimation</item>
|
||||
<item name="checkboxStyle">@style/noCheckboxStyle</item>
|
||||
|
||||
@@ -135,7 +135,7 @@ public class VoiceConstants {
|
||||
*/
|
||||
public static final String CMD_MAP_NORTH_UP_MODE = "com.ileja.traffic.north.up";
|
||||
public static final String CMD_MAP_NORTH_UP_MODE_UN_WAKEUP = "CMD_MAP_NORTH_UP_MODE_UN_WAKEUP";
|
||||
public static final String[] CMD_MAP_NORTH_UP_MODE_TRIGGER_WORDS = {"北朝上"};
|
||||
public static final String[] CMD_MAP_NORTH_UP_MODE_TRIGGER_WORDS = {"正北朝上","北朝上"};
|
||||
/**
|
||||
* 简洁模式
|
||||
*/
|
||||
@@ -168,15 +168,15 @@ public class VoiceConstants {
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_OUT_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_OUT_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_2D_UN_WAKEUP, VoiceConstants.CMD_MAP_2D_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_3D_UN_WAKEUP, VoiceConstants.CMD_MAP_3D_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_DAY_TIME_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_DAY_TIME_MODE_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_NIGHT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_NIGHT_MODE_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_TRAFFIC_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_TRAFFIC_MODE_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_DAY_TIME_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_DAY_TIME_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_NIGHT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_NIGHT_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_TRAFFIC_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_TRAFFIC_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE_MODE_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_CAR_UP_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_CAR_UP_MODE_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_NORTH_UP_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_NORTH_UP_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_CAR_UP_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_CAR_UP_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_NORTH_UP_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_NORTH_UP_MODE_TRIGGER_WORDS );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_GO_HOME_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_IN_GO_HOME );
|
||||
//sVoiceCmds.put( VoiceConstants.CMD_MAP_GO_COMPANY_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_IN_GO_COMPANY );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_HISTORY_UN_WAKEUP, VoiceConstants.CMD_MAP_HISTORY_TRIGGER_WORDS );
|
||||
|
||||
1
modules/mogo-module-monitor/.gitignore
vendored
Normal file
1
modules/mogo-module-monitor/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
48
modules/mogo-module-monitor/build.gradle
Normal file
48
modules/mogo-module-monitor/build.gradle
Normal file
@@ -0,0 +1,48 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: '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'
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [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.mogologlib
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
compileOnly rootProject.ext.dependencies.modulecommon
|
||||
} else {
|
||||
compileOnly project(':modules:mogo-module-common')
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
0
modules/mogo-module-monitor/consumer-rules.pro
Normal file
0
modules/mogo-module-monitor/consumer-rules.pro
Normal file
3
modules/mogo-module-monitor/gradle.properties
Normal file
3
modules/mogo-module-monitor/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
GROUP=com.mogo.module
|
||||
POM_ARTIFACT_ID=module-monitor
|
||||
VERSION_CODE=1
|
||||
21
modules/mogo-module-monitor/proguard-rules.pro
vendored
Normal file
21
modules/mogo-module-monitor/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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
|
||||
5
modules/mogo-module-monitor/src/main/AndroidManifest.xml
Normal file
5
modules/mogo-module-monitor/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.zhidao.mogo.module.monitor">
|
||||
|
||||
/
|
||||
</manifest>
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.zhidao.mogo.module.monitor;
|
||||
|
||||
class MogoMonitorConst {
|
||||
public static final String MODULE_NAME = "MogoMonitor";
|
||||
public static final String MODULE_PATH = "/monitor/api";
|
||||
|
||||
public static final int LOG_PUSH_TYPE = 500000;
|
||||
|
||||
public static final int START_CATCH_LOG = 1;
|
||||
public static final int STOP_CATCH_LOG = 2;
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.zhidao.mogo.module.monitor;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
import com.mogo.service.monitor.IMogoMonitorProvider;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.loglib.LogInfoManager;
|
||||
import com.zhidao.loglib.bean.RemoteLogPushContent;
|
||||
import com.zhidao.loglib.dialog.ILogDialogListener;
|
||||
import com.zhidao.loglib.upload.UploadManager;
|
||||
import com.zhidao.loglib.util.LogInfoManagerFactory;
|
||||
import com.zhidao.loglib.util.LoggingNotice;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 应用监控模块provider
|
||||
* @author tongchenfei
|
||||
*/
|
||||
@Route(path = MogoMonitorConst.MODULE_PATH)
|
||||
public class MogoMonitorProvider implements IMogoMonitorProvider, IMogoOnMessageListener<RemoteLogPushContent>, ILogDialogListener {
|
||||
private static final String TAG = MogoMonitorConst.MODULE_NAME;
|
||||
private LogInfoManager manualCatchLog = null;
|
||||
private Map<String, LogInfoManager> managerCache = new ArrayMap<>();
|
||||
private Context context;
|
||||
|
||||
@Override
|
||||
public void showLogDebugDialog() {
|
||||
if (manualCatchLog == null) {
|
||||
manualCatchLog = LogInfoManagerFactory.createManualLogInfoManager(context);
|
||||
}
|
||||
manualCatchLog.showDebugWindow().setDialogListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
IMogoServiceApis apis =
|
||||
(IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context);
|
||||
apis.getSocketManagerApi(context).registerOnMessageListener(MogoMonitorConst.LOG_PUSH_TYPE,this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetActivityContext(Context context) {
|
||||
this.context = context;
|
||||
UploadManager.getInstance().init(context);
|
||||
LoggingNotice.getInstance().init(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<RemoteLogPushContent> target() {
|
||||
return RemoteLogPushContent.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgReceived(RemoteLogPushContent obj) {
|
||||
Logger.d(TAG, "收到push消息: " + obj);
|
||||
switch (obj.getType()){
|
||||
case MogoMonitorConst.START_CATCH_LOG:
|
||||
if (managerCache.containsKey(obj.getPkgName())) {
|
||||
Logger.d(TAG, "这个包名的日志正在抓了: " + obj);
|
||||
return;
|
||||
}
|
||||
openLoggerLevel();
|
||||
LogInfoManager infoManager =
|
||||
LogInfoManagerFactory.createPushLogInfoManager(context, obj);
|
||||
infoManager.start();
|
||||
managerCache.put(obj.getPkgName(), infoManager);
|
||||
break;
|
||||
case MogoMonitorConst.STOP_CATCH_LOG:
|
||||
LogInfoManager stopManager = managerCache.remove(obj.getPkgName());
|
||||
if (stopManager != null) {
|
||||
stopManager.stop();
|
||||
}
|
||||
closeLoggerLevel();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLogStart() {
|
||||
// 这个是通过对话框点击开始的回调
|
||||
isInManualCatchLog = true;
|
||||
openLoggerLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLogStop() {
|
||||
// 这个是通过对话框点击结束的回调
|
||||
isInManualCatchLog = false;
|
||||
closeLoggerLevel();
|
||||
}
|
||||
private boolean isInManualCatchLog = false;
|
||||
|
||||
/**
|
||||
* 放开Logger的限制
|
||||
*/
|
||||
private void openLoggerLevel(){
|
||||
Logger.init(LogLevel.DEBUG);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态收紧Logger的限制
|
||||
*/
|
||||
private void closeLoggerLevel(){
|
||||
if (!isInManualCatchLog && managerCache.size() == 0) {
|
||||
Logger.init( BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -364,7 +364,8 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
int size = getAppropriateSize( maxAmount, exploreWayList );
|
||||
Map< String, IMogoMarker > existCarMap = purgeMarkerData( exploreWayList, ModuleNames.CARD_TYPE_ROAD_CONDITION );
|
||||
Logger.i( TAG, "existCarMap: size = %d", existCarMap.size() );for ( int i = 0; i < size; i++ ) {
|
||||
Logger.i( TAG, "existCarMap: size = %d", existCarMap.size() );
|
||||
for ( int i = 0; i < size; i++ ) {
|
||||
MarkerExploreWay markerExploreWay = exploreWayList.get( i );
|
||||
if ( !markerExploreWay.getCanLive() ) {
|
||||
MarkerLocation markerLocation = markerExploreWay.getLocation();
|
||||
@@ -402,7 +403,10 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
return;
|
||||
}
|
||||
IMogoMarker marker = drawMapMarker( entity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
marker.startScaleAnimationWithAlpha( 0, 1.2f, 0, 1.2f, 0f, 1f,300, new LinearInterpolator(), new OnMarkerAnimationListener() {
|
||||
if ( marker == null ) {
|
||||
return;
|
||||
}
|
||||
marker.startScaleAnimationWithAlpha( 0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
|
||||
@Override
|
||||
public void onAnimStart() {
|
||||
Logger.d( TAG, " onAnimStart ---1----> " );
|
||||
@@ -410,7 +414,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
|
||||
@Override
|
||||
public void onAnimEnd() {
|
||||
if ( marker.isDestroyed() ) {
|
||||
if ( marker == null || marker.isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
marker.startScaleAnimation( 1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null );
|
||||
|
||||
@@ -67,11 +67,7 @@ public class RefreshModel {
|
||||
refreshBody.limit = limit;
|
||||
refreshBody.location = new RefreshBody.LatLon( latLng.lat, latLng.lng );
|
||||
refreshBody.radius = radius;
|
||||
refreshBody.dataType.add( ServiceConst.CARD_TYPE_CARS_CHATTING );
|
||||
refreshBody.dataType.add( ServiceConst.CARD_TYPE_ROAD_CONDITION );
|
||||
refreshBody.dataType.add( ServiceConst.CARD_TYPE_SHARE_MUSIC );
|
||||
// refreshBody.dataType.add(ServiceConst.CARD_TYPE_USER_DATA);
|
||||
refreshBody.dataType.add( ServiceConst.CARD_TYPE_NOVELTY );
|
||||
|
||||
String data = GsonUtil.jsonFromObject( refreshBody );
|
||||
query.put( "data", data );
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.mogo.module.v2x;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 这是LinearLayoutManager设置Item间距的的一个辅助类
|
||||
*
|
||||
* @author donghongyu
|
||||
*/
|
||||
public class SpacesItemDecoration extends RecyclerView.ItemDecoration {
|
||||
private int space;
|
||||
|
||||
public SpacesItemDecoration(int space) {
|
||||
this.space = space;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getItemOffsets(Rect outRect, View view,
|
||||
RecyclerView parent, RecyclerView.State state) {
|
||||
outRect.left = space;
|
||||
outRect.right = space;
|
||||
outRect.bottom = space;
|
||||
|
||||
// Add top margin only for the first item to avoid double space between items
|
||||
if (parent.getChildPosition(view) == 0) {
|
||||
outRect.top = space;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,15 @@ 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.amap.api.maps.model.Text;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerPoiTypeEnum;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -20,13 +21,16 @@ import java.util.List;
|
||||
* @description 周边
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
public class SurroundingEventAdapter extends RecyclerView.Adapter<SurroundingEventViewHolder>{
|
||||
private List<SurroundingResponse.ResultBean.PoiInfosBean> mPoiInfosList;
|
||||
public class SurroundingEventAdapter extends RecyclerView.Adapter<SurroundingEventViewHolder> {
|
||||
private List<MarkerExploreWay> mPoiInfosList;
|
||||
private Context mContext;
|
||||
private TextView mAddressTv;
|
||||
private ImageView mBgImageView;
|
||||
private ImageView mTypeImageView;
|
||||
private TextView mTypeTv;
|
||||
private TextView mTotalTv;
|
||||
|
||||
|
||||
public SurroundingEventAdapter(Context context, List<SurroundingResponse.ResultBean.PoiInfosBean> poiInfosList) {
|
||||
public SurroundingEventAdapter(Context context, List<MarkerExploreWay> poiInfosList) {
|
||||
mContext = context;
|
||||
mPoiInfosList = poiInfosList;
|
||||
}
|
||||
@@ -46,12 +50,31 @@ public class SurroundingEventAdapter extends RecyclerView.Adapter<SurroundingEve
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull SurroundingEventViewHolder holder, int position) {
|
||||
final SurroundingResponse.ResultBean.PoiInfosBean poiInfosBean = mPoiInfosList.get(position);
|
||||
if (poiInfosBean == null) {
|
||||
final MarkerExploreWay exploreWay = mPoiInfosList.get(position);
|
||||
if (exploreWay == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// mAddressTv = holder.itemView.findViewById(R.id.tv_information);
|
||||
mBgImageView = holder.itemView.findViewById(R.id.iv_event_bg);
|
||||
mTypeImageView = holder.itemView.findViewById(R.id.iv_event_type);
|
||||
mTypeTv = holder.itemView.findViewById(R.id.tv_poitype);
|
||||
mTotalTv = holder.itemView.findViewById(R.id.tv_info_total);
|
||||
|
||||
mTypeTv.setText(getTypeName(exploreWay.getPoiType()));
|
||||
|
||||
// mTotalTv.setText(exploreWay.);
|
||||
|
||||
|
||||
//数据绑定 TODO
|
||||
// RequestOptions requestOptions = new RequestOptions()
|
||||
// .placeholder(R.drawable.tanlu_normal_image)
|
||||
// .error(R.drawable.tanlu_normal_image)
|
||||
// .fallback(R.drawable.tanlu_normal_image);
|
||||
// Glide.with(mContext)
|
||||
// .load(imageUrl)
|
||||
// .apply(requestOptions)
|
||||
// .into(mBgImageView);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -59,4 +82,42 @@ public class SurroundingEventAdapter extends RecyclerView.Adapter<SurroundingEve
|
||||
return mPoiInfosList == null ? 0 : mPoiInfosList.size();
|
||||
}
|
||||
|
||||
|
||||
private String getTypeName(String type) {
|
||||
String typeName = "";
|
||||
switch (type) {
|
||||
case MarkerPoiTypeEnum.TRAFFIC_CHECK:
|
||||
typeName = "交通检查";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.ROAD_CLOSED:
|
||||
typeName = "封路";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_ROAD_WORK:
|
||||
typeName = "道路施工";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_BLOCK_UP:
|
||||
typeName = "道路拥堵";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_PONDING:
|
||||
typeName = "道路积水";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_ICE:
|
||||
typeName = "路面结冰";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_FOG:
|
||||
typeName = "出现浓雾";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_ACCIDENT:
|
||||
typeName = "交通事故";
|
||||
break;
|
||||
case MarkerPoiTypeEnum.FOURS_LIVING:
|
||||
typeName = "实时路况";
|
||||
break;
|
||||
default:
|
||||
typeName = "实时路况";
|
||||
break;
|
||||
}
|
||||
return typeName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
if (data != null) {
|
||||
String poitype = data.getPoiType();
|
||||
String address = data.getUploadAddress();
|
||||
String time = DateTimeUtils.getTimeText(data.getUploadTimestamp());
|
||||
String time = DateTimeUtils.getTimeText(data.getUploadTimestamp(),DateTimeUtils.M_Yue_d_Ri);
|
||||
String likeNum = String.valueOf(data.getLikeNum());
|
||||
String notLikeNum = String.valueOf(data.getNotLikeNum());
|
||||
if (poitype != null) {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 构造数据
|
||||
* @since 2020/8/7
|
||||
*/
|
||||
public class SurroundingConstructionData implements Serializable {
|
||||
private String poiType;
|
||||
private List<MarkerExploreWay> construtList;
|
||||
|
||||
public String getPoiType() {
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType(String poiType) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public List<MarkerExploreWay> getConstrutList() {
|
||||
return construtList;
|
||||
}
|
||||
|
||||
public void setConstrutList(List<MarkerExploreWay> construtList) {
|
||||
this.construtList = construtList;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,9 +13,8 @@ import java.util.List;
|
||||
*/
|
||||
public class SurroundingResponse extends BaseData {
|
||||
/**
|
||||
* code : 0
|
||||
* msg : success
|
||||
* result : {"total":1,"poiInfos":[{"coordinates":[116.410712,39.96833],"uploadTimestamp":1596003623000,"timeout":1596090023000,"uploadAddress":"","distance":0,"dbId":"738038266231427072","poiType":"10002","sn":"VN000017","userId":0,"userName":"伤心狼","userHead":"https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000016.jpg","likeNum":1,"uploadType":2,"uploadUser":"","imgUrl":"","content":"封路了","gasStationId":"","gasStationName":"","gasImg":"","gasPrices":"","endDate":"2020-07-30 14:20:23","fabulous":false,"direction":90,"virtualLikeNum":"","status":1,"sourceType":"10002","hitId":"Odo6mXMBEXitzfRvznNL","userType":2,"data":""}]}
|
||||
* msg : null
|
||||
* result : {"exploreWay":[{"infoId":"740635251747942400","type":"CARD_TYPE_ROAD_CONDITION","location":{"lon":116.370207,"lat":39.968394,"angle":180,"address":"测试直播"},"canLive":false,"fileType":1,"addr":"测试直播","generateTime":1596622804859,"cityName":"","distance":717,"userInfo":{"sn":"E841CC2018PZD20408","userId":0,"userName":"零下的雨008","userHead":"http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592473692394.jpeg"},"items":[{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1594952448035.mp4?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1596701407%3B1596708607%26q-key-time%3D1596701407%3B1596708607%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D465089a3c078ed60c395cb65d41f61b28e9a3397","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1594952453342.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1596701407%3B1596708607%26q-key-time%3D1596701407%3B1596708607%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D6f36b4c945197737f8576e42a5c599ed3d150a4a"}],"uploadType":"2","poiType":"10011"}]}
|
||||
*/
|
||||
private ResultBean result;
|
||||
|
||||
@@ -26,322 +27,14 @@ public class SurroundingResponse extends BaseData {
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
/**
|
||||
* total : 1
|
||||
* poiInfos : [{"coordinates":[116.410712,39.96833],"uploadTimestamp":1596003623000,"timeout":1596090023000,"uploadAddress":"","distance":0,"dbId":"738038266231427072","poiType":"10002","sn":"VN000017","userId":0,"userName":"伤心狼","userHead":"https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000016.jpg","likeNum":1,"uploadType":2,"uploadUser":"","imgUrl":"","content":"封路了","gasStationId":"","gasStationName":"","gasImg":"","gasPrices":"","endDate":"2020-07-30 14:20:23","fabulous":false,"direction":90,"virtualLikeNum":"","status":1,"sourceType":"10002","hitId":"Odo6mXMBEXitzfRvznNL","userType":2,"data":""}]
|
||||
*/
|
||||
private int total;
|
||||
private List<PoiInfosBean> poiInfos;
|
||||
private List<MarkerExploreWay> exploreWay;
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
public List<MarkerExploreWay> getExploreWay() {
|
||||
return exploreWay;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public List<PoiInfosBean> getPoiInfos() {
|
||||
return poiInfos;
|
||||
}
|
||||
|
||||
public void setPoiInfos(List<PoiInfosBean> poiInfos) {
|
||||
this.poiInfos = poiInfos;
|
||||
}
|
||||
|
||||
public static class PoiInfosBean {
|
||||
/**
|
||||
* coordinates : [116.410712,39.96833]
|
||||
* uploadTimestamp : 1596003623000
|
||||
* timeout : 1596090023000
|
||||
* uploadAddress :
|
||||
* distance : 0
|
||||
* dbId : 738038266231427072
|
||||
* poiType : 10002
|
||||
* sn : VN000017
|
||||
* userId : 0
|
||||
* userName : 伤心狼
|
||||
* userHead : https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000016.jpg
|
||||
* likeNum : 1
|
||||
* uploadType : 2
|
||||
* uploadUser :
|
||||
* imgUrl :
|
||||
* content : 封路了
|
||||
* gasStationId :
|
||||
* gasStationName :
|
||||
* gasImg :
|
||||
* gasPrices :
|
||||
* endDate : 2020-07-30 14:20:23
|
||||
* fabulous : false
|
||||
* direction : 90
|
||||
* virtualLikeNum :
|
||||
* status : 1
|
||||
* sourceType : 10002
|
||||
* hitId : Odo6mXMBEXitzfRvznNL
|
||||
* userType : 2
|
||||
* data :
|
||||
*/
|
||||
private long uploadTimestamp;
|
||||
private long timeout;
|
||||
private String uploadAddress;
|
||||
private int distance;
|
||||
private String dbId;
|
||||
private String poiType;
|
||||
private String sn;
|
||||
private int userId;
|
||||
private String userName;
|
||||
private String userHead;
|
||||
private int likeNum;
|
||||
private int uploadType;
|
||||
private String uploadUser;
|
||||
private String imgUrl;
|
||||
private String content;
|
||||
private String gasStationId;
|
||||
private String gasStationName;
|
||||
private String gasImg;
|
||||
private String gasPrices;
|
||||
private String endDate;
|
||||
private boolean fabulous;
|
||||
private int direction;
|
||||
private String virtualLikeNum;
|
||||
private int status;
|
||||
private String sourceType;
|
||||
private String hitId;
|
||||
private int userType;
|
||||
private String data;
|
||||
private List<Double> coordinates;
|
||||
|
||||
public long getUploadTimestamp() {
|
||||
return uploadTimestamp;
|
||||
}
|
||||
|
||||
public void setUploadTimestamp(long uploadTimestamp) {
|
||||
this.uploadTimestamp = uploadTimestamp;
|
||||
}
|
||||
|
||||
public long getTimeout() {
|
||||
return timeout;
|
||||
}
|
||||
|
||||
public void setTimeout(long timeout) {
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
public String getUploadAddress() {
|
||||
return uploadAddress;
|
||||
}
|
||||
|
||||
public void setUploadAddress(String uploadAddress) {
|
||||
this.uploadAddress = uploadAddress;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(int distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getDbId() {
|
||||
return dbId;
|
||||
}
|
||||
|
||||
public void setDbId(String dbId) {
|
||||
this.dbId = dbId;
|
||||
}
|
||||
|
||||
public String getPoiType() {
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType(String poiType) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserHead() {
|
||||
return userHead;
|
||||
}
|
||||
|
||||
public void setUserHead(String userHead) {
|
||||
this.userHead = userHead;
|
||||
}
|
||||
|
||||
public int getLikeNum() {
|
||||
return likeNum;
|
||||
}
|
||||
|
||||
public void setLikeNum(int likeNum) {
|
||||
this.likeNum = likeNum;
|
||||
}
|
||||
|
||||
public int getUploadType() {
|
||||
return uploadType;
|
||||
}
|
||||
|
||||
public void setUploadType(int uploadType) {
|
||||
this.uploadType = uploadType;
|
||||
}
|
||||
|
||||
public String getUploadUser() {
|
||||
return uploadUser;
|
||||
}
|
||||
|
||||
public void setUploadUser(String uploadUser) {
|
||||
this.uploadUser = uploadUser;
|
||||
}
|
||||
|
||||
public String getImgUrl() {
|
||||
return imgUrl;
|
||||
}
|
||||
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getGasStationId() {
|
||||
return gasStationId;
|
||||
}
|
||||
|
||||
public void setGasStationId(String gasStationId) {
|
||||
this.gasStationId = gasStationId;
|
||||
}
|
||||
|
||||
public String getGasStationName() {
|
||||
return gasStationName;
|
||||
}
|
||||
|
||||
public void setGasStationName(String gasStationName) {
|
||||
this.gasStationName = gasStationName;
|
||||
}
|
||||
|
||||
public String getGasImg() {
|
||||
return gasImg;
|
||||
}
|
||||
|
||||
public void setGasImg(String gasImg) {
|
||||
this.gasImg = gasImg;
|
||||
}
|
||||
|
||||
public String getGasPrices() {
|
||||
return gasPrices;
|
||||
}
|
||||
|
||||
public void setGasPrices(String gasPrices) {
|
||||
this.gasPrices = gasPrices;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public boolean isFabulous() {
|
||||
return fabulous;
|
||||
}
|
||||
|
||||
public void setFabulous(boolean fabulous) {
|
||||
this.fabulous = fabulous;
|
||||
}
|
||||
|
||||
public int getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(int direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public String getVirtualLikeNum() {
|
||||
return virtualLikeNum;
|
||||
}
|
||||
|
||||
public void setVirtualLikeNum(String virtualLikeNum) {
|
||||
this.virtualLikeNum = virtualLikeNum;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getSourceType() {
|
||||
return sourceType;
|
||||
}
|
||||
|
||||
public void setSourceType(String sourceType) {
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public String getHitId() {
|
||||
return hitId;
|
||||
}
|
||||
|
||||
public void setHitId(String hitId) {
|
||||
this.hitId = hitId;
|
||||
}
|
||||
|
||||
public int getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(int userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public List<Double> getCoordinates() {
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
public void setCoordinates(List<Double> coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
public void setExploreWay(List<MarkerExploreWay> exploreWay) {
|
||||
this.exploreWay = exploreWay;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,31 +11,43 @@ import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkersHandler;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerPoiTypeEnum;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.adapter.SurroundingEventAdapter;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstructionData;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
|
||||
import com.mogo.module.v2x.presenter.SurroundingEventPresenter;
|
||||
import com.mogo.module.v2x.view.SurroundingEventView;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static android.view.View.OVER_SCROLL_NEVER;
|
||||
|
||||
/**
|
||||
* 周边事件
|
||||
*/
|
||||
public class SurroundingEventFragment extends MvpFragment<SurroundingEventView, SurroundingEventPresenter> implements SurroundingEventView {
|
||||
public class SurroundingEventFragment extends MvpFragment<SurroundingEventView, SurroundingEventPresenter> implements SurroundingEventView, View.OnClickListener {
|
||||
private static final String TAG = "SurroundingFragment";
|
||||
private RecyclerView mRecyclerView;
|
||||
private TextView mTotalTv;
|
||||
private RelativeLayout mEmptyLayout;
|
||||
private TextView mShareTv;
|
||||
private TextView mFreshTv;
|
||||
private SurroundingEventAdapter mAdapter;
|
||||
private SurroundingEventPresenter surroundingEventPresenter;
|
||||
private List<SurroundingResponse.ResultBean.PoiInfosBean> poiInfosList = new ArrayList<>();
|
||||
|
||||
private List<MarkerExploreWay> poiInfosList = new ArrayList<>();
|
||||
private IMogoServiceApis mApis;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -44,19 +56,21 @@ public class SurroundingEventFragment extends MvpFragment<SurroundingEventView,
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
Log.d("liyz", "initViews --------> ");
|
||||
Log.d(TAG, "initViews --------> ");
|
||||
mRecyclerView = findViewById(R.id.surrounding_recycleview);
|
||||
mTotalTv = findViewById(R.id.tv_brief);
|
||||
mEmptyLayout = findViewById(R.id.layout_empty_data_show);
|
||||
mShareTv = findViewById(R.id.tv_main_share);
|
||||
mFreshTv = findViewById(R.id.tv_main_refresh);
|
||||
|
||||
mShareTv.setOnClickListener(this);
|
||||
mFreshTv.setOnClickListener(this);
|
||||
|
||||
mRecyclerView.setHasFixedSize(true);
|
||||
mRecyclerView.setOverScrollMode(OVER_SCROLL_NEVER);
|
||||
GridLayoutManager layoutManage = new GridLayoutManager(getContext(), 1);
|
||||
GridLayoutManager layoutManage = new GridLayoutManager(getContext(), 2);
|
||||
mRecyclerView.setLayoutManager(layoutManage);
|
||||
|
||||
mAdapter = new SurroundingEventAdapter(getActivity(), poiInfosList); //TODO
|
||||
mAdapter = new SurroundingEventAdapter(getActivity(), poiInfosList);
|
||||
mRecyclerView.setAdapter(mAdapter);
|
||||
|
||||
initData();
|
||||
@@ -73,8 +87,25 @@ public class SurroundingEventFragment extends MvpFragment<SurroundingEventView,
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
surroundingEventPresenter = new SurroundingEventPresenter(getContext(), this);
|
||||
Log.d("liyz", "onViewCreated ---------");
|
||||
mApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(getContext());
|
||||
|
||||
Log.d(TAG, "onViewCreated ---------");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if (id == R.id.tv_main_share) {
|
||||
//TODO 分享, 弹出框面板消失,出现分享弹框
|
||||
V2XEventPanelFragment fragment = new V2XEventPanelFragment();
|
||||
fragment.hidePanel();
|
||||
if (mApis != null && mApis.getShareManager() != null) {
|
||||
mApis.getShareManager().showShareDialog();
|
||||
}
|
||||
} else if (id == R.id.tv_main_refresh) { //刷新
|
||||
initData();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,29 +116,67 @@ public class SurroundingEventFragment extends MvpFragment<SurroundingEventView,
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示列表数据 TODO
|
||||
* 展示列表数据
|
||||
*/
|
||||
@Override
|
||||
public void showSurroudingData(SurroundingResponse data) {
|
||||
if (data.getResult() != null) {
|
||||
SurroundingResponse.ResultBean resultBean = data.getResult();
|
||||
if (resultBean != null && resultBean.getPoiInfos() != null && resultBean.getPoiInfos().size() > 0) {
|
||||
mRecyclerView.setVisibility(View.VISIBLE);
|
||||
mEmptyLayout.setVisibility(View.GONE);
|
||||
public void showSurroudingData(List<MarkerExploreWay> exploreWayList) {
|
||||
Log.d(TAG, "showSurroudingData -------1--");
|
||||
if (exploreWayList != null && exploreWayList.size() > 0) {
|
||||
Log.d(TAG, "showSurroudingData -----2----");
|
||||
//对数据进行分类
|
||||
handleCategoricalData(exploreWayList);
|
||||
|
||||
poiInfosList.clear();
|
||||
poiInfosList.addAll(resultBean.getPoiInfos());
|
||||
mAdapter.notifyDataSetChanged();
|
||||
} else {
|
||||
mRecyclerView.setVisibility(View.GONE);
|
||||
mEmptyLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
//展示数据
|
||||
mRecyclerView.setVisibility(View.VISIBLE);
|
||||
mEmptyLayout.setVisibility(View.GONE);
|
||||
|
||||
poiInfosList.clear();
|
||||
poiInfosList.addAll(exploreWayList);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
|
||||
//总条数
|
||||
mTotalTv.setText(exploreWayList.size() + "");
|
||||
} else {
|
||||
Log.d(TAG, "showSurroudingData -------3---");
|
||||
mRecyclerView.setVisibility(View.GONE);
|
||||
mEmptyLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private List<SurroundingConstructionData> mConstructionList = new ArrayList<>();
|
||||
|
||||
|
||||
//TODO
|
||||
private List<SurroundingConstructionData> handleCategoricalData(List<MarkerExploreWay> list) {
|
||||
List<SurroundingConstructionData> tempExploreWayList = new ArrayList<>();
|
||||
Log.d(TAG, "handleCategoricalData -------1---");
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
MarkerExploreWay exploreWay = list.get(i);
|
||||
SurroundingConstructionData constructionData = new SurroundingConstructionData();
|
||||
List<MarkerExploreWay> tempConstrutList = new ArrayList<>();
|
||||
if (exploreWay.getPoiType().equals(MarkerPoiTypeEnum.FOURS_LIVING)) { //实时路况
|
||||
tempConstrutList.add(exploreWay);
|
||||
constructionData.setPoiType(MarkerPoiTypeEnum.FOURS_LIVING);
|
||||
constructionData.setConstrutList(tempConstrutList);
|
||||
|
||||
tempExploreWayList.add(constructionData);
|
||||
} else if (exploreWay.getPoiType().equals(MarkerPoiTypeEnum.FOURS_ACCIDENT)) {
|
||||
tempConstrutList.add(exploreWay);
|
||||
constructionData.setPoiType(MarkerPoiTypeEnum.FOURS_ACCIDENT);
|
||||
constructionData.setConstrutList(tempConstrutList);
|
||||
|
||||
tempExploreWayList.add(constructionData);
|
||||
}
|
||||
}
|
||||
|
||||
Log.d(TAG, "handleCategoricalData tempExploreWayList.size() = " + tempExploreWayList.size());
|
||||
return tempExploreWayList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
@@ -4,7 +4,9 @@ import android.content.res.ColorStateList
|
||||
import android.graphics.Typeface
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import androidx.viewpager2.widget.ViewPager2.OnPageChangeCallback
|
||||
@@ -34,11 +36,11 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
|
||||
private var mediator: TabLayoutMediator? = null
|
||||
|
||||
private val activeColor: Int = android.graphics.Color.parseColor("#ff678f")
|
||||
private val normalColor: Int = android.graphics.Color.parseColor("#EE00FF")
|
||||
private val activeColor: Int = android.graphics.Color.parseColor("#FFFFFF")
|
||||
private val normalColor: Int = android.graphics.Color.parseColor("#65FFFFFF")
|
||||
|
||||
private val activeSize = 35
|
||||
private val normalSize = 30
|
||||
private val activeSize = 20
|
||||
private val normalSize = 20
|
||||
|
||||
private var selectPosition = 0
|
||||
|
||||
@@ -66,6 +68,12 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
//viewPager 页面切换监听
|
||||
vpEventPanel.registerOnPageChangeCallback(changeCallback)
|
||||
|
||||
/*TabLayout中间分界线*/
|
||||
val linearLayout: LinearLayout = tabLayout.getChildAt(0) as LinearLayout
|
||||
linearLayout.showDividers = LinearLayout.SHOW_DIVIDER_MIDDLE
|
||||
linearLayout.dividerDrawable = activity?.let { ContextCompat.getDrawable(it, R.drawable.bg_v2x_event_live_show) }
|
||||
linearLayout.dividerPadding = 30
|
||||
|
||||
//这里可以自定义TabView
|
||||
mediator = TabLayoutMediator(tabLayout, vpEventPanel, TabConfigurationStrategy { tab, position ->
|
||||
val tabView = TextView(context)
|
||||
@@ -77,6 +85,7 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
val colorStateList = ColorStateList(states, colors)
|
||||
tabView.text = tabsTitle[position]
|
||||
tabView.textSize = normalSize.toFloat()
|
||||
tabView.typeface = Typeface.DEFAULT_BOLD
|
||||
tabView.setTextColor(colorStateList)
|
||||
tab.customView = tabView
|
||||
})
|
||||
|
||||
@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.SpacesItemDecoration;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.adapter.V2XScenarioHistoryAdapter;
|
||||
import com.mogo.module.v2x.manager.IMoGoV2XStatusChangedListener;
|
||||
@@ -45,6 +46,7 @@ public class V2XScenarioHistoryFragment
|
||||
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
mV2XScenarioHistoryAdapter = new V2XScenarioHistoryAdapter(mV2XHistoryScenarioData);
|
||||
mRecyclerView.setAdapter(mV2XScenarioHistoryAdapter);
|
||||
mRecyclerView.addItemDecoration(new SpacesItemDecoration(14));
|
||||
// 配置列表朝向
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
|
||||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
|
||||
@Override
|
||||
public void drawableLastAllPOI() {
|
||||
//Logger.w(MODULE_NAME, "V2X---绘制上一次的POI,回调给Launcher底层逻辑让其进行绘制");
|
||||
Logger.w(MODULE_NAME, "V2X---绘制上一次的POI,回调给Launcher底层逻辑让其进行绘制");
|
||||
// 清除连接线
|
||||
V2XServiceManager.getMoGoV2XPolylineManager().clearLine();
|
||||
clearAlarmPOI();
|
||||
|
||||
@@ -6,10 +6,10 @@ import android.graphics.Bitmap
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.module.service.utils.ViewUtils
|
||||
import com.mogo.module.v2x.R
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity
|
||||
import com.mogo.module.service.utils.ViewUtils
|
||||
import com.mogo.module.v2x.R
|
||||
import kotlinx.android.synthetic.main.view_marker_event_car.view.*
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ import kotlinx.android.synthetic.main.view_marker_event_car.view.*
|
||||
* version: 1.0
|
||||
*/
|
||||
class V2XMarkerRoadEventView(context: Context, alarmInfo: V2XRoadEventEntity) :
|
||||
ConstraintLayout(context) {
|
||||
ConstraintLayout(context) {
|
||||
val TAG = "V2XMarkerRoadEventView"
|
||||
|
||||
init {
|
||||
@@ -32,13 +32,13 @@ class V2XMarkerRoadEventView(context: Context, alarmInfo: V2XRoadEventEntity) :
|
||||
|
||||
fun initView(context: Context, alarmInfo: V2XRoadEventEntity) {
|
||||
if (alarmInfo.poiType == V2XPoiTypeEnum.ALERT_FRONT_CAR ||
|
||||
alarmInfo.poiType == V2XPoiTypeEnum.ALERT_CAR_TROUBLE_WARNING.toString()
|
||||
alarmInfo.poiType == V2XPoiTypeEnum.ALERT_CAR_TROUBLE_WARNING.toString()
|
||||
) {
|
||||
LayoutInflater.from(context)
|
||||
.inflate(R.layout.view_marker_event_car, this)
|
||||
.inflate(R.layout.view_marker_event_car, this)
|
||||
} else {
|
||||
LayoutInflater.from(context)
|
||||
.inflate(R.layout.view_marker_event_road, this)
|
||||
.inflate(R.layout.view_marker_event_road, this)
|
||||
}
|
||||
updateIcon(alarmInfo)
|
||||
}
|
||||
@@ -82,6 +82,10 @@ class V2XMarkerRoadEventView(context: Context, alarmInfo: V2XRoadEventEntity) :
|
||||
V2XPoiTypeEnum.FOURS_ACCIDENT -> {
|
||||
ivCar.setImageResource(R.drawable.v_to_x_marker_7)
|
||||
}
|
||||
//事故
|
||||
V2XPoiTypeEnum.FOURS_LIVING -> {
|
||||
ivCar.setImageResource(R.drawable.v_to_x_marker_1)
|
||||
}
|
||||
//红绿灯数据
|
||||
V2XPoiTypeEnum.ALERT_TRAFFIC_LIGHT_SUGGEST -> {
|
||||
ivCar.setImageResource(R.drawable.v_to_x_marker_3)
|
||||
|
||||
@@ -131,7 +131,7 @@ public interface V2XApiService {
|
||||
*
|
||||
* */
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@POST("/deva/car/poi/no/queryNovelty/v1")
|
||||
@POST("/deva/car/path/no/getLauncherSnapshotDataResponse/v1")
|
||||
Observable<SurroundingResponse> getSurroundingEventList(@Query("sn") String sn, @Body RequestBody jsonStr);
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,15 +78,16 @@ public class SurroundingEventPresenter extends Presenter<SurroundingEventView> {
|
||||
@Override
|
||||
public void onSuccess(SurroundingResponse data) {
|
||||
super.onSuccess(data);
|
||||
if (data != null) {
|
||||
mView.showSurroudingData(data);
|
||||
Log.e("SurroundingFragment", "onSuccess ------ ");
|
||||
if (data != null && data.getResult() != null) {
|
||||
mView.showSurroudingData(data.getResult().getExploreWay());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
Log.e(TAG, "onError message = " + message + " >>> code = " + code);
|
||||
Log.e("SurroundingFragment", "onError message = " + message + " >>> code = " + code);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -95,6 +95,8 @@ public class V2XIllegalParkMarker implements IV2XMarker<List<MarkerExploreWay>>
|
||||
V2XServiceManager.getMoGoV2XPolylineManager().clearLine();
|
||||
// 移除事件POI
|
||||
V2XServiceManager.getMoGoV2XMarkerManager().clearAlarmPOI();
|
||||
// 绘制上次的数据
|
||||
V2XServiceManager.getMoGoV2XMarkerManager().drawableLastAllPOI();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -127,8 +127,6 @@ public class EventTypeUtils {
|
||||
case V2XPoiTypeEnum.FOURS_FOG://浓雾
|
||||
case V2XPoiTypeEnum.FOURS_ICE://结冰
|
||||
case V2XPoiTypeEnum.FOURS_ACCIDENT://事故
|
||||
case V2XPoiTypeEnum.FOURS_NEALY://身边
|
||||
case V2XPoiTypeEnum.FOURS_LIVING://实时路况
|
||||
isRoadEvent = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.mogo.module.v2x.view;
|
||||
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
@@ -10,5 +13,5 @@ import com.mogo.module.v2x.entity.panel.SurroundingResponse;
|
||||
*/
|
||||
public interface SurroundingEventView extends IView {
|
||||
|
||||
void showSurroudingData(SurroundingResponse data);
|
||||
void showSurroudingData(List<MarkerExploreWay> exploreWayList);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="12px"/>
|
||||
<gradient
|
||||
android:startColor="#5E6079"
|
||||
android:endColor="#3F4057"
|
||||
android:type="linear"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/share_event_item_bg_color"/>
|
||||
<corners android:radius="12px"/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="24px" />
|
||||
<solid android:color="@color/live_video_background_color" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="24px" />
|
||||
|
||||
<gradient
|
||||
android:endColor="#256BFF"
|
||||
android:startColor="#5CC1FF" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tvMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_60"
|
||||
android:paddingTop="@dimen/dp_30"
|
||||
android:paddingEnd="@dimen/dp_60"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:text="今日出行遇到的交通事件"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textStyle="bold" />
|
||||
@@ -2,37 +2,39 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androud="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/clPanelContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/live_video_background_color">
|
||||
android:layout_width="642px"
|
||||
android:layout_height="532px"
|
||||
android:background="@color/surrounding_card_background">
|
||||
|
||||
<!--顶部layout-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp">
|
||||
android:layout_height="60dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brief"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="400px"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20px"
|
||||
android:textSize="18px"
|
||||
android:text="周边5公里,共有23条数据 "
|
||||
android:textColor="#ffffff" />
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_top_refresh"
|
||||
android:layout_width="150px"
|
||||
android:layout_height="50px"
|
||||
android:layout_marginLeft="50px"
|
||||
android:layout_toRightOf="@+id/tv_brief"
|
||||
android:layout_width="90px"
|
||||
android:layout_height="36px"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/bg_v2x_event_live_show"
|
||||
android:layout_marginRight="20px"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="刷新"
|
||||
android:textColor="@color/live_video_background_color"
|
||||
android:textSize="12px"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18px"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -58,54 +60,68 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_1"
|
||||
android:layout_width="match_parent"
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="30px"
|
||||
android:layout_marginTop="59px"
|
||||
android:src="@drawable/icon_default_black_logo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_empty"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="15px"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="周边5公里,暂无交通事件" />
|
||||
android:text="周边5公里,暂无交通事件"
|
||||
android:textColor="@color/transparent_white_30"
|
||||
android:textSize="18px"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_main_empty_1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="30px"
|
||||
android:layout_marginTop="2px"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="你可以试着分享一个事件给其他车主" />
|
||||
android:text="你可以试着分享一个事件给其他车主"
|
||||
android:textColor="@color/transparent_white_30"
|
||||
android:textSize="18px"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_share"
|
||||
android:layout_width="150px"
|
||||
android:layout_height="50px"
|
||||
android:layout_height="48px"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_marginLeft="300px"
|
||||
android:layout_marginTop="60px"
|
||||
android:background="@drawable/bg_v2x_event_live_show"
|
||||
android:layout_marginLeft="110px"
|
||||
android:layout_marginTop="33px"
|
||||
android:background="@drawable/bg_v2x_go_to_share"
|
||||
android:gravity="center"
|
||||
android:text="去分享"
|
||||
android:textColor="@color/live_video_background_color"
|
||||
android:textSize="12px"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18px"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_refresh"
|
||||
android:layout_width="150px"
|
||||
android:layout_height="50px"
|
||||
android:layout_height="48px"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_marginLeft="200px"
|
||||
android:layout_marginTop="60px"
|
||||
android:layout_toRightOf="@+id/tv_main_share"
|
||||
android:background="@drawable/bg_v2x_event_live_show"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="33px"
|
||||
android:layout_marginRight="110px"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="刷新"
|
||||
android:textColor="@color/live_video_background_color"
|
||||
android:textSize="12px"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18px"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -1,30 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="291px"
|
||||
android:layout_height="173px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:paddingLeft="5px"
|
||||
android:paddingTop="5px"
|
||||
android:background="@color/white"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="30px"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="40dp"
|
||||
android:textColor="#ffffff"
|
||||
android:text="hello" />
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/ivEventImg"
|
||||
android:layout_width="@dimen/module_v2x_event_image_width"
|
||||
android:layout_height="@dimen/module_v2x_event_image_height"
|
||||
<ImageView
|
||||
android:id="@+id/iv_event_bg"
|
||||
android:layout_width="291px"
|
||||
android:layout_height="130px"
|
||||
android:scaleType="center"
|
||||
app:miv_failureHolder="@drawable/icon_default_black_logo"
|
||||
app:miv_overlayImageId="@drawable/icon_default_black_logo"
|
||||
app:miv_placeHolder="@drawable/icon_default_black_logo" />
|
||||
android:src="@drawable/icon_default_black_logo" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_below="@+id/iv_event_bg"
|
||||
android:background="#000000"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="43px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_event_type"
|
||||
android:layout_width="22px"
|
||||
android:layout_height="16px"
|
||||
android:layout_marginLeft="15px"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/icon_default_black_logo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_poitype"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_toRightOf="@+id/iv_event_type"
|
||||
android:layout_marginLeft="8px"
|
||||
android:textSize="20px"
|
||||
android:textColor="@color/white"
|
||||
android:text="求助" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_info_total"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="16px"
|
||||
android:textColor="@color/transparent_white_30"
|
||||
android:text="23条" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -5,28 +5,28 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.mogo.module.v2x.view.RoundConstraintLayout
|
||||
android:id="@+id/clPanelContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/cardview_dark_background"
|
||||
android:background="#10121E"
|
||||
android:visibility="gone"
|
||||
app:roundLayoutRadius="@dimen/dp_40"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_150"
|
||||
android:layout_height="@dimen/dp_130"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tabGravity="fill"
|
||||
app:tabIndicatorColor="#ff678f"
|
||||
app:tabIndicatorFullWidth="false"
|
||||
app:tabIndicatorHeight="2dp"
|
||||
app:tabMode="fixed"
|
||||
app:tabSelectedTextColor="#ff678f"
|
||||
app:tabTextColor="#EE00FF"
|
||||
app:tabMode="scrollable"
|
||||
app:tabSelectedTextColor="#FFFFFF"
|
||||
app:tabTextColor="#65FFFFFF"
|
||||
app:tabUnboundedRipple="true" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
@@ -38,7 +38,20 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tabLayout" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnHidePanels"
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_height="@dimen/dp_88"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:background="@drawable/v2x_icon_event_live_close"
|
||||
android:textColor="#000"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tabLayout"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tabLayout" />
|
||||
|
||||
</com.mogo.module.v2x.view.RoundConstraintLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnShowOrHidePanels"
|
||||
|
||||
@@ -1,8 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FFF"
|
||||
tools:listitem="@layout/module_v2x_event_share_item" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#00000000">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_60"
|
||||
android:paddingTop="@dimen/dp_30"
|
||||
android:paddingEnd="@dimen/dp_60"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:text="今日出行遇到的交通事件"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textStyle="bold"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
android:paddingStart="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_40"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:listitem="@layout/item_v2x_illegal_parking" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -3,91 +3,94 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_v2x_event_description"
|
||||
android:layout_marginLeft="20px"
|
||||
android:layout_marginRight="20px"
|
||||
android:layout_marginBottom="12px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_event_guide_des"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_height="45dp"
|
||||
android:paddingLeft="20px"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:text="小窍门:分享路况,点赞其他车友,有助于提高热心指数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp">
|
||||
android:textSize="16px">
|
||||
|
||||
</TextView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_num"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal|bottom"
|
||||
android:text="0"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="25sp" />
|
||||
android:textSize="36px" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/shre_num_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:text="分享次数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
android:textSize="16px" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_width="0.5px"
|
||||
android:layout_height="46px"
|
||||
android:background="#FFFFFF" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_approve"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:gravity="center_horizontal|bottom"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="25sp" />
|
||||
android:textSize="36px" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_approve_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:text="车友认同次数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
android:textSize="16px" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_width="0.5px"
|
||||
android:layout_height="46px"
|
||||
android:background="#FFFFFF" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -96,19 +99,17 @@
|
||||
style="@style/customRatingBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:isIndicator="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_index_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="0dp"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:text="热心指数"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
android:textSize="16px" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -3,7 +3,11 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/road_case_liset_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/share_event_item_bg_color"
|
||||
android:layout_marginLeft="20px"
|
||||
android:layout_marginRight="20px"
|
||||
android:layout_marginBottom="16px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_style"
|
||||
@@ -12,50 +16,67 @@
|
||||
android:layout_marginLeft="20dp"
|
||||
android:background="#1E90FF"
|
||||
android:gravity="center"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_marginTop="12px"
|
||||
android:text="道路类型"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="14px"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_remain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12px"
|
||||
android:background="#1E90FF"
|
||||
android:gravity="center"
|
||||
android:layout_alignTop="@id/road_case_style"
|
||||
android:layout_toRightOf="@id/road_case_style"
|
||||
android:text="评价状态"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14px" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_useless_num"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:paddingRight="20px"
|
||||
android:gravity="center"
|
||||
android:text="10"
|
||||
android:text="100"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="18px" />
|
||||
|
||||
|
||||
<Button
|
||||
<ImageView
|
||||
android:id="@+id/road_case_useless"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="44px"
|
||||
android:layout_height="44px"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toLeftOf="@id/road_case_useless_num"
|
||||
android:background="@drawable/amap_bus"
|
||||
android:paddingRight="5px"
|
||||
android:src="@drawable/amap_bus"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_useful_num"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toLeftOf="@id/road_case_useless"
|
||||
android:paddingRight="26px"
|
||||
android:gravity="center"
|
||||
android:text="5"
|
||||
android:text="100"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="18px" />
|
||||
|
||||
<TextView
|
||||
<ImageView
|
||||
android:id="@+id/road_case_uselful"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="44px"
|
||||
android:layout_height="44px"
|
||||
android:layout_centerInParent="true"
|
||||
android:paddingRight="5px"
|
||||
android:layout_toLeftOf="@id/road_case_useful_num"
|
||||
android:background="@drawable/amap_ride" />
|
||||
android:src="@drawable/amap_ride" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_address"
|
||||
@@ -69,7 +90,7 @@
|
||||
android:lines="1"
|
||||
android:text="东城区北三环附近维多欧美"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp" />
|
||||
android:textSize="18px" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_case_share_time"
|
||||
@@ -80,6 +101,8 @@
|
||||
android:gravity="left"
|
||||
android:text="时间:"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="13sp" />
|
||||
android:alpha="0.5"
|
||||
android:textSize="16px"
|
||||
android:layout_marginBottom="11px"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -2,5 +2,10 @@
|
||||
<resources>
|
||||
<color name="live_video_progress_bar_loading_color">#256BFF</color>
|
||||
<color name="live_video_background_color">#3F4057</color>
|
||||
<color name="surrounding_card_background">#10121E</color>
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="transparent_white_30">#4DFFFFFF</color>
|
||||
<color name="share_event_item_bg_color">#1F2131</color>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -23,6 +23,7 @@ import com.mogo.service.module.IMogoMarkerService;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.module.IMogoSearchManager;
|
||||
import com.mogo.service.module.IMogoSettingManager;
|
||||
import com.mogo.service.monitor.IMogoMonitorProvider;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.obu.IMogoObuManager;
|
||||
import com.mogo.service.passport.IMogoPassportManager;
|
||||
@@ -250,4 +251,10 @@ public interface IMogoServiceApis extends IProvider {
|
||||
* @return
|
||||
*/
|
||||
IMogoTanluProvider getTanluApi();
|
||||
|
||||
/**
|
||||
* 获取Monitor相关api
|
||||
* @return
|
||||
*/
|
||||
IMogoMonitorProvider getMogoMonitorApi();
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ public class MogoServicePaths {
|
||||
* 日志上传
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String PATH_LOG_LIB = "/loglib/api";
|
||||
public static final String PATH_MOGO_MONITOR = "/monitor/api";
|
||||
|
||||
/**
|
||||
* 探路api
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.mogo.service.monitor;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
/**
|
||||
* monitor接口
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public interface IMogoMonitorProvider extends IProvider {
|
||||
/**
|
||||
* 显示日志抓取窗口
|
||||
*/
|
||||
void showLogDebugDialog();
|
||||
|
||||
/**
|
||||
* 重置context,设置成activity的context
|
||||
* @param context activity的context
|
||||
*/
|
||||
void resetActivityContext(Context context);
|
||||
}
|
||||
@@ -31,6 +31,7 @@ import com.mogo.service.module.IMogoMarkerService;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.module.IMogoSearchManager;
|
||||
import com.mogo.service.module.IMogoSettingManager;
|
||||
import com.mogo.service.monitor.IMogoMonitorProvider;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.obu.IMogoObuManager;
|
||||
import com.mogo.service.passport.IMogoPassportManager;
|
||||
@@ -212,6 +213,11 @@ public class MogoServiceApis implements IMogoServiceApis {
|
||||
return getApiInstance(IMogoTanluProvider.class, MogoServicePaths.PATH_TANLU_API);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMonitorProvider getMogoMonitorApi() {
|
||||
return getApiInstance(IMogoMonitorProvider.class,MogoServicePaths.PATH_MOGO_MONITOR);
|
||||
}
|
||||
|
||||
private static < T extends IProvider > T getApiInstance(Class< T > clazz, String path ) {
|
||||
T inst = SingletonsHolder.get( clazz );
|
||||
if ( inst == null ) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
include ':modules:mogo-module-monitor'
|
||||
include ':libraries:mogo-tanlu-api'
|
||||
include ':foudations:mogo-base-services-apk'
|
||||
include ':foudations:mogo-base-services-sdk'
|
||||
|
||||
Reference in New Issue
Block a user