[Change]
迁移mogo-module-extensions到MoGoEagleEye.core.function-impl.mogo-core-function-monitoring Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -2,8 +2,6 @@ package com.mogo.module.common;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -24,22 +22,6 @@ public class MogoModulePaths {
|
||||
|
||||
private static final List<MogoModule> mModuleFunctionServers = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 地图模块 fragment 路径
|
||||
*/
|
||||
public static final String PATH_MODULE_MAP = "/map/ui";
|
||||
|
||||
/**
|
||||
* app列表模块实例化路径
|
||||
*/
|
||||
@Keep
|
||||
public static final String PATH_MODULE_APPS = "/appslist/ui";
|
||||
|
||||
/**
|
||||
* 快捷操作入口:定位、
|
||||
*/
|
||||
public static final String PATH_ENTRANCE = "/extension/entrance";
|
||||
|
||||
/**
|
||||
* 添加卡片模块
|
||||
*
|
||||
|
||||
1
modules/mogo-module-extensions/.gitignore
vendored
1
modules/mogo-module-extensions/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -1,9 +0,0 @@
|
||||
# launcher头部模块
|
||||
|
||||
## 通知
|
||||
|
||||
## 天气
|
||||
|
||||
## 时间
|
||||
|
||||
## 入口按钮,高德SDK导航控制
|
||||
@@ -1,91 +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 {
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility 1.8
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
res.srcDirs = ['src/main/res', 'src/main/res-light']
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.androidxcardview
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
implementation rootProject.ext.dependencies.rxjava
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.livesdk
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
api rootProject.ext.dependencies.mogomapapi
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
api rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.moduleservice
|
||||
|
||||
api rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
} else {
|
||||
api project(":libraries:mogo-map-api")
|
||||
api project(":foudations:mogo-commons")
|
||||
api project(':services:mogo-service-api')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':modules:mogo-module-service')
|
||||
|
||||
api project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-res')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -1,7 +0,0 @@
|
||||
#-----ExtensionModule-----
|
||||
-keep class com.mogo.module.extensions.live.CameraLiveGSYVideoView{*;}
|
||||
-keep class com.mogo.module.extensions.live.PushCameraLiveWindow{*;}
|
||||
-keep class com.mogo.module.extensions.navi.*{*;}
|
||||
-keep class com.mogo.module.extensions.userinfo.*{*;}
|
||||
-keep class com.mogo.module.extensions.view.*{*;}
|
||||
-keep class com.mogo.module.extensions.bean.*{*;}
|
||||
@@ -1,3 +0,0 @@
|
||||
GROUP=com.mogo.module
|
||||
POM_ARTIFACT_ID=module-extensions
|
||||
VERSION_CODE=1
|
||||
@@ -1,28 +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
|
||||
|
||||
#-----ExtensionModule-----
|
||||
-keep class com.mogo.module.extensions.userinfo.**{*;}
|
||||
-keep class com.mogo.module.extensions.weather.Phenomena
|
||||
-keep class com.mogo.module.extensions.utils.TopViewAnimHelper
|
||||
-keep class com.mogo.module.extensions.ExtensionsView
|
||||
-keep class com.mogo.module.extensions.ExtensionsModuleConst
|
||||
@@ -1,2 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.module.extensions" />
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.mogo.module.extensions;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-05
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class ExtensionsModuleConst {
|
||||
|
||||
public static final String TYPE_ENTRANCE = "entrance";
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.mogo.module.extensions;
|
||||
|
||||
import com.mogo.commons.mvp.IView;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-05
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public interface ExtensionsView extends IView {
|
||||
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.mogo.module.extensions.bean;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/9/22
|
||||
*/
|
||||
public class CommonConfig {
|
||||
|
||||
public Active active;//活动配置
|
||||
public Auth auth; //授权配置
|
||||
public Speech speech; //语音播报次数
|
||||
public ReportStrategy reportStrategy; //被动上报策略开关
|
||||
|
||||
public CommonConfig(Active active, Auth auth, Speech speech, ReportStrategy reportStrategy) {
|
||||
this.active = active;
|
||||
this.auth = auth;
|
||||
this.speech = speech;
|
||||
this.reportStrategy = reportStrategy;
|
||||
}
|
||||
|
||||
public class Active{
|
||||
public String imageUrl;
|
||||
public String webUrl;
|
||||
public int status;
|
||||
|
||||
Active(String imageUrl, String webUrl, int status) {
|
||||
this.imageUrl = imageUrl;
|
||||
this.webUrl = webUrl;
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class Speech{
|
||||
public int count;
|
||||
|
||||
Speech(int count) {
|
||||
this.count = count;
|
||||
}
|
||||
}
|
||||
|
||||
public class Auth{
|
||||
int isNeedAuth;
|
||||
|
||||
Auth(int isNeedAuth) {
|
||||
this.isNeedAuth = isNeedAuth;
|
||||
}
|
||||
}
|
||||
|
||||
public class ReportStrategy {
|
||||
public boolean open;
|
||||
ReportStrategy(boolean open) {
|
||||
this.open = open;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.mogo.module.extensions.bean;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/9/22
|
||||
*/
|
||||
public class CommonConfigResponse extends BaseData {
|
||||
|
||||
public CommonConfig result;
|
||||
}
|
||||
@@ -1,262 +0,0 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import static com.mogo.module.extensions.ExtensionsModuleConst.TYPE_ENTRANCE;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.listener.MogoMapListenerHandler;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.utils.CameraLiveNoticeHelper;
|
||||
import com.mogo.module.extensions.utils.NoMapTopViewShaderHelper;
|
||||
import com.mogo.module.extensions.utils.TopViewAnimHelper;
|
||||
import com.mogo.module.extensions.utils.TopViewNoLinkageAnimHelper;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresenter>
|
||||
implements EntranceView,
|
||||
IMogoNaviListener,
|
||||
IMogoMapListener,
|
||||
IMogoStatusChangedListener,
|
||||
IMogoIntentListener {
|
||||
|
||||
private static final String TAG = "EntranceFragment";
|
||||
|
||||
private IMogoServiceApis mApis;
|
||||
|
||||
private IMogoRegisterCenter mMogoRegisterCenter;
|
||||
private EntrancePresenter mEntrancePresenter;
|
||||
private IMogoStatusManager mStatusManager;
|
||||
|
||||
public static boolean isClickShare;
|
||||
|
||||
private final Runnable mLockCarRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!mStatusManager.isDisplayOverview()) {
|
||||
return;
|
||||
}
|
||||
mStatusManager.setDisplayOverview(TAG, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private final CameraLiveNoticeHelper mCameraLiveNoticeHelper = new CameraLiveNoticeHelper();
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.module_ext_layout_entrance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTagName() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
mApis = MogoApisHandler.getInstance().getApis();
|
||||
|
||||
mCameraLiveNoticeHelper.init(getContext());
|
||||
|
||||
mEntrancePresenter = new EntrancePresenter(getContext(), this);
|
||||
|
||||
mStatusManager = mApis.getStatusManagerApi();
|
||||
|
||||
ConstraintLayout rootView = findViewById(R.id.module_entrance_id_top_motion_layout);
|
||||
if (rootView != null) {
|
||||
TopViewAnimHelper.getInstance().init(rootView);
|
||||
TopViewNoLinkageAnimHelper.getInstance().init(rootView);
|
||||
}
|
||||
|
||||
mApis.getIntentManagerApi().registerIntentListener(AUTONAVI_STANDARD_BROADCAST_RECV, this);
|
||||
|
||||
listenSeekNumber();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 地图移动和缩放回调
|
||||
*
|
||||
* @param latLng 中点的经纬度
|
||||
* @param zoom 缩放大小
|
||||
* @param tilt 倾斜度
|
||||
* @param bearing 旋转角度
|
||||
*/
|
||||
@Override
|
||||
public void onMapChanged(MogoLatLng latLng, float zoom, float tilt, float bearing) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onTouch(MotionEvent motionEvent) {
|
||||
switch (motionEvent.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
UiThreadHandler.removeCallbacks(mLockCarRunnable);
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static final String AUTONAVI_STANDARD_BROADCAST_RECV =
|
||||
"AUTONAVI_STANDARD_BROADCAST_RECV";
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected EntrancePresenter createPresenter() {
|
||||
return mEntrancePresenter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
mMogoRegisterCenter = mApis.getRegisterCenterApi();
|
||||
|
||||
mMogoRegisterCenter.registerMogoNaviListener(TYPE_ENTRANCE, this);
|
||||
mMogoRegisterCenter.registerMogoMapListener(TYPE_ENTRANCE, this);
|
||||
|
||||
mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.UPLOADING, this);
|
||||
mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.DISPLAY_OVERVIEW, this);
|
||||
mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, this);
|
||||
|
||||
//TODO 因为衡阳6.30交付没有2D模式,临时方案,进入vr模式,不可缩放地图
|
||||
// 进入鹰眼模式,设置手势缩放地图失效
|
||||
Logger.d(TAG, "进入vr模式");
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode(TAG, true);
|
||||
MogoMapListenerHandler.getInstance().onMapModeChanged(EnumMapUI.Type_VR);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (mStatusManager.isTopContainerReady()) {
|
||||
return;
|
||||
}
|
||||
mStatusManager.setTopContainerReady(TAG, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
mCameraLiveNoticeHelper.release();
|
||||
super.onDestroyView();
|
||||
isClickShare = false;
|
||||
mStatusManager.setTopContainerReady(TAG, false);
|
||||
TopViewAnimHelper.getInstance().removeAllView();
|
||||
TopViewAnimHelper.getInstance().clear();
|
||||
TopViewNoLinkageAnimHelper.getInstance().removeAllView();
|
||||
TopViewNoLinkageAnimHelper.getInstance().clear();
|
||||
NoMapTopViewShaderHelper.getInstance().release();
|
||||
mCameraLiveNoticeHelper.release();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onIntentReceived(String intentStr, Intent intent) {
|
||||
int key_type = intent.getIntExtra("KEY_TYPE", 0);
|
||||
if (key_type == 10021) {
|
||||
try {
|
||||
onStopNavi();
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e, "onIntentReceived -> 10021");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onStartNavi() {
|
||||
if (!DebugConfig.isMapBased()) {
|
||||
return;
|
||||
}
|
||||
TopViewAnimHelper.getInstance().showNaviView();
|
||||
mApis.getAnalyticsApi().track("Navigation_begin", new HashMap<>());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopNavi() {
|
||||
if (!DebugConfig.isMapBased()) {
|
||||
return;
|
||||
}
|
||||
TopViewAnimHelper.getInstance().hideNaviView();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onLockMap(boolean isLock) {
|
||||
if (isLock) {
|
||||
if (mStatusManager.isDisplayOverview()) {
|
||||
mStatusManager.setDisplayOverview(TAG, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
||||
Logger.d(TAG, "descriptor=" + descriptor + " isTrue=" + isTrue);
|
||||
}
|
||||
|
||||
private void listenSeekNumber() {
|
||||
mStatusManager.registerStatusChangedListener(TAG, StatusDescriptor.SEEK_HELPING, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (mMogoRegisterCenter != null) {
|
||||
mMogoRegisterCenter.unregisterMogoNaviListener(TYPE_ENTRANCE);
|
||||
mMogoRegisterCenter.unregisterMogoMapListener(TYPE_ENTRANCE);
|
||||
}
|
||||
if (mStatusManager != null) {
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.UPLOADING, this);
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.DISPLAY_OVERVIEW
|
||||
, this);
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.SEEK_HELPING, this);
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, this);
|
||||
}
|
||||
if (mApis != null) {
|
||||
if (mApis.getIntentManagerApi() != null) {
|
||||
mApis.getIntentManagerApi().unregisterIntentListener(AUTONAVI_STANDARD_BROADCAST_RECV, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.constants.HostConst;
|
||||
import com.mogo.module.extensions.bean.CommonConfig;
|
||||
import com.mogo.module.extensions.bean.CommonConfigResponse;
|
||||
import com.mogo.module.extensions.net.GetConfigApiServices;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class EntrancePresenter extends Presenter<EntranceView> {
|
||||
private static final String TAG = "EntrancePresenter";
|
||||
|
||||
private IMogoNetwork mNetWork;
|
||||
|
||||
public EntrancePresenter(Context context, EntranceView view) {
|
||||
super(view);
|
||||
mNetWork = MogoApisHandler.getInstance().getApis().getNetworkApi();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(@NonNull LifecycleOwner owner) {
|
||||
super.onResume(owner);
|
||||
getCommonConfig();
|
||||
}
|
||||
|
||||
public void getCommonConfig() {
|
||||
Map<String, Object> params = new ArrayMap<>();
|
||||
params.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
mNetWork.create(GetConfigApiServices.class, HostConst.DATA_SERVICE_HOST)
|
||||
.getConfig(params)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SingleObserver<CommonConfigResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(CommonConfigResponse config) {
|
||||
Logger.d(TAG, "getCommonConfig onSuccess -----> ");
|
||||
if (config != null && config.result != null) {
|
||||
CommonConfig.ReportStrategy strategy = config.result.reportStrategy;
|
||||
if (strategy != null) {
|
||||
Logger.d(TAG,
|
||||
"getCommonConfig onSuccess strategy.open = " + strategy.open);
|
||||
SharedPrefsMgr.getInstance(getContext()).putBoolean(
|
||||
"KEY_SERVER_REPORTSTRATEGY_SWITCH", strategy.open);
|
||||
} else {
|
||||
Logger.e(TAG, "getCommonConfig onSuccess strategy == null ");
|
||||
}
|
||||
} else {
|
||||
Logger.e(TAG, "getCommonConfig onSuccess config == null");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
e.printStackTrace();
|
||||
Logger.e(TAG, "getCommonConfig onError ---> e = " + e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.extensions.live.ExtensionServiceManager;
|
||||
import com.mogo.service.module.IMogoModuleLifecycle;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = MogoModulePaths.PATH_ENTRANCE )
|
||||
public class EntranceProvider implements IMogoModuleProvider {
|
||||
|
||||
@Override
|
||||
public Fragment createFragment( Context context, Bundle data ) {
|
||||
EntranceFragment mFragment = new EntranceFragment();
|
||||
mFragment.setArguments( data );
|
||||
ExtensionServiceManager.init( context );
|
||||
return mFragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createView( Context context ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoModuleLifecycle getCardLifecycle() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMapListener getMapListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return ModuleType.TYPE_ENTRANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoNaviListener getNaviListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoLocationListener getLocationListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
ExtensionServiceManager.init( context );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMarkerClickListener getMarkerClickListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAppPackage() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAppName() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import com.mogo.module.extensions.ExtensionsView;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public interface EntranceView extends ExtensionsView {
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
package com.mogo.module.extensions.live;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.widget.LiveRoundLayout;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.tencent.rtmp.ITXLivePlayListener;
|
||||
import com.tencent.rtmp.TXLiveConstants;
|
||||
import com.tencent.rtmp.TXLivePlayConfig;
|
||||
import com.tencent.rtmp.TXLivePlayer;
|
||||
import com.tencent.rtmp.ui.TXCloudVideoView;
|
||||
|
||||
/**
|
||||
* V2XLiveGSYVideoView
|
||||
*/
|
||||
public class CameraLiveGSYVideoView extends LiveRoundLayout {
|
||||
private static final String TAG = "CameraLiveGSYVideoView";
|
||||
private TXCloudVideoView mTxcVideoView;
|
||||
private ProgressBar mLoading;
|
||||
private TXLivePlayer mLivePlayer;
|
||||
private ConstraintLayout mClLoadError;
|
||||
private TextView mTvRefreshButton;
|
||||
|
||||
private String mLiveUrl;
|
||||
|
||||
|
||||
public CameraLiveGSYVideoView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public CameraLiveGSYVideoView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public CameraLiveGSYVideoView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
initView(context);
|
||||
|
||||
}
|
||||
|
||||
private void initView(Context context) {
|
||||
LayoutInflater.from(context)
|
||||
.inflate(R.layout.camera_view_video_layout_normal, this);
|
||||
//mPlayerView 即 step1 中添加的界面 view
|
||||
mTxcVideoView = findViewById(R.id.txcVideoView);
|
||||
//创建 player 对象
|
||||
mLivePlayer = new TXLivePlayer(context);
|
||||
//关键 player 对象与界面 view
|
||||
mLivePlayer.setPlayerView(mTxcVideoView);
|
||||
mLivePlayer.setMute(true);
|
||||
|
||||
TXLivePlayConfig txLivePlayConfig = new TXLivePlayConfig();
|
||||
// 增加重试次数
|
||||
txLivePlayConfig.setConnectRetryCount(30);
|
||||
mLivePlayer.setConfig(txLivePlayConfig);
|
||||
|
||||
mLivePlayer.enableHardwareDecode(true);
|
||||
|
||||
mLoading = findViewById(R.id.loading);
|
||||
mLoading.getIndeterminateDrawable().setColorFilter(ContextCompat.getColor(context, R.color.module_live_video_progress_bar_loading_color), PorterDuff.Mode.MULTIPLY);
|
||||
|
||||
mClLoadError = findViewById(R.id.clLoadError);
|
||||
mTvRefreshButton = findViewById(R.id.tvRefreshButton);
|
||||
mTvRefreshButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mLoading.setVisibility(VISIBLE);
|
||||
mClLoadError.setVisibility(GONE);
|
||||
if (mLiveUrl != null) {
|
||||
startLive(mLiveUrl);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始直播
|
||||
*
|
||||
* @param liveUrl 要直播的车机,如果没有直播的地址需要重新获取最新的直播地址
|
||||
*/
|
||||
public void startLive(String liveUrl) {
|
||||
// 进行直播播放
|
||||
if (mLivePlayer != null) {
|
||||
if (!TextUtils.isEmpty(liveUrl)) {
|
||||
mLiveUrl = liveUrl;
|
||||
playLiveVideo(liveUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放直播流,且开始心跳
|
||||
*/
|
||||
private void playLiveVideo(String liveUrl) {
|
||||
try {
|
||||
if (mLivePlayer != null) {
|
||||
mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_RTMP);
|
||||
mLivePlayer.setPlayListener(new ITXLivePlayListener() {
|
||||
@Override
|
||||
public void onPlayEvent(int event, Bundle bundle) {
|
||||
Logger.w(TAG,
|
||||
"直播信息= " +
|
||||
"\n播放器:onPlayEvent==" + event +
|
||||
"\nbundle===" + bundle);
|
||||
Logger.d(TAG, "liveUrl = " + liveUrl);
|
||||
if (event == TXLiveConstants.PLAY_EVT_PLAY_LOADING) {
|
||||
mLoading.setVisibility(VISIBLE);
|
||||
mClLoadError.setVisibility(GONE);
|
||||
} else if (event == TXLiveConstants.PLAY_EVT_PLAY_BEGIN) {
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(GONE);
|
||||
} else if (event < 0) {
|
||||
stopLive(mLiveUrl);
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNetStatus(Bundle bundle) {
|
||||
Logger.w(TAG, "播放器:onNetStatus===bundle===" + bundle);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.w(TAG, "播放器:onNetStatus e = " + e);
|
||||
mLoading.setVisibility(GONE);
|
||||
mClLoadError.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void stopLive(String liveUrl) {
|
||||
try {
|
||||
Logger.w(TAG, "心跳:关闭直播...");
|
||||
// 暂停
|
||||
mLivePlayer.pause();
|
||||
// true 代表清除最后一帧画面
|
||||
mLivePlayer.stopPlay(true);
|
||||
mTxcVideoView.onDestroy();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
if (mLiveUrl != null) {
|
||||
startLive(mLiveUrl);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
stopLive(mLiveUrl);
|
||||
mLoading.setVisibility(VISIBLE);
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
package com.mogo.module.extensions.live;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.live.impl.AbsCameraScenario;
|
||||
import com.mogo.service.windowview.IMogoTopViewStatusListener;
|
||||
|
||||
/**
|
||||
* 路边摄像头直播控制 V2XPushLiveCarScenario
|
||||
*/
|
||||
public class CameraLiveManager extends AbsCameraScenario<SocketDownData.CloudRoadDataProto> implements IMogoTopViewStatusListener {
|
||||
private static final String TAG = "CameraLiveManager";
|
||||
private static CameraLiveManager mCameraLiveManager;
|
||||
private boolean isShowWindow;
|
||||
|
||||
private CameraLiveManager() {
|
||||
}
|
||||
|
||||
public static CameraLiveManager getInstance() {
|
||||
if (mCameraLiveManager == null) {
|
||||
synchronized (CameraLiveManager.class) {
|
||||
if (mCameraLiveManager == null) {
|
||||
mCameraLiveManager = new CameraLiveManager();
|
||||
mCameraLiveManager.setV2XWindow(new PushCameraLiveWindow());
|
||||
}
|
||||
}
|
||||
}
|
||||
return mCameraLiveManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(@Nullable SocketDownData.CloudRoadDataProto cloudRoadData) {
|
||||
Log.d(TAG, "CameraLiveManager init -----> isShowWindow = " + isShowWindow);
|
||||
if (isShowWindow) {
|
||||
close();
|
||||
}
|
||||
|
||||
setmCloudRoadData(cloudRoadData);
|
||||
show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
showWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWindow() {
|
||||
Log.d(TAG, "CameraLiveManager showWindow getV2XWindow = " + getV2XWindow());
|
||||
if (getV2XWindow() != null) {
|
||||
ViewGroup.LayoutParams layoutParams =
|
||||
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) AbsMogoApplication.getApp().getResources()
|
||||
.getDimension(R.dimen.module_video_window_height_content));
|
||||
|
||||
MogoApisHandler.getInstance().getApis().getTopViewManager()
|
||||
.addViewNoLinkage(getV2XWindow().getView(), layoutParams, this);
|
||||
getV2XWindow().show(getmCloudRoadData());
|
||||
isShowWindow = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeWindow() {
|
||||
if (getV2XWindow() != null) {
|
||||
getV2XWindow().close();
|
||||
}
|
||||
isShowWindow = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showButton() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeButton() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPOI() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPOI() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewAdded(View view) {
|
||||
Logger.d(TAG, "展示 Window 动画结束");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewRemoved(View view) {
|
||||
Logger.d(TAG, "关闭 Window 动画结束");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeViewAddAnim(View view) {
|
||||
Logger.d(TAG, "展示 Window 开始");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeViewRemoveAnim(View view) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.mogo.module.extensions.live;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.map.marker.IMogoInfoWindowAdapter;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.drawer.marker.MapCameraInfoView;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @since 2020/12/16
|
||||
* 描述
|
||||
*/
|
||||
public class CameraWindow3DAdapter implements IMogoInfoWindowAdapter {
|
||||
private Context mContext;
|
||||
private MogoMarkerOptions mOptions;
|
||||
|
||||
public CameraWindow3DAdapter(Context context, MogoMarkerOptions options) {
|
||||
this.mContext = context;
|
||||
this.mOptions = options;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getInfoWindow(IMogoMarker marker) {
|
||||
return new MapCameraInfoView(mContext, mOptions);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.mogo.module.extensions.live;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
||||
public class ExtensionServiceManager {
|
||||
private static boolean isInit;
|
||||
private static Context mContext;
|
||||
|
||||
private ExtensionServiceManager() {
|
||||
|
||||
}
|
||||
|
||||
public static void init(final Context context) {
|
||||
if (!isInit) {
|
||||
isInit = true;
|
||||
mContext = context;
|
||||
}
|
||||
}
|
||||
|
||||
public static Context getContext() {
|
||||
return mContext;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
package com.mogo.module.extensions.live;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.live.impl.ICameraWindow;
|
||||
import com.mogo.service.imageloader.MogoImageView;
|
||||
|
||||
|
||||
/**
|
||||
* 点击摄像头 marker
|
||||
* vr路边摄像头弹窗 V2XPushLiveCarWindow
|
||||
*/
|
||||
public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindow<SocketDownData.CloudRoadDataProto> {
|
||||
private static final String TAG = "PushCameraLiveWindow";
|
||||
private CameraLiveGSYVideoView mLiveGSYVideoView;
|
||||
private MogoImageView mIvReportHead;
|
||||
private ImageView pushVideoClose;
|
||||
|
||||
// 直播30秒自动关闭
|
||||
private static final Handler handlerV2XEvent = new Handler();
|
||||
private static Runnable runnableV2XEvent;
|
||||
|
||||
public PushCameraLiveWindow() {
|
||||
this(ExtensionServiceManager.getContext(), null);
|
||||
}
|
||||
|
||||
public PushCameraLiveWindow(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public PushCameraLiveWindow(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public PushCameraLiveWindow(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
initView(context);
|
||||
}
|
||||
|
||||
public void initView(Context context) {
|
||||
Logger.w(TAG, "initView 。。。。。");
|
||||
LayoutInflater.from(context).inflate(R.layout.camera_push_live_video, this);
|
||||
// 详情列表
|
||||
mLiveGSYVideoView = findViewById(R.id.videoPlayer);
|
||||
mIvReportHead = findViewById(R.id.ivReportHead);
|
||||
pushVideoClose = findViewById(R.id.pushVideoClose);
|
||||
pushVideoClose.setOnClickListener(v -> {
|
||||
//移除窗体
|
||||
MogoApisHandler.getInstance().getApis().getTopViewManager().removeViewNoLinkage(this);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示直播Windows
|
||||
*/
|
||||
@Override
|
||||
public void show(SocketDownData.CloudRoadDataProto entity) {
|
||||
if (entity != null) {
|
||||
Logger.w(TAG, "更新直播信息 show entity = " + entity);
|
||||
if (!TextUtils.isEmpty(entity.getRtmpUrl())) {
|
||||
Logger.w(TAG, "entity.getRtmpUrl() = " + entity.getRtmpUrl());
|
||||
mIvReportHead.setVisibility(INVISIBLE);
|
||||
MogoApisHandler.getInstance().getApis().getImageLoaderApi().displayImage(entity.getRtmpUrl(),
|
||||
mIvReportHead);
|
||||
mLiveGSYVideoView.startLive(entity.getRtmpUrl());
|
||||
}
|
||||
|
||||
countDownV2XEvent();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
// 停止倒计时
|
||||
if (runnableV2XEvent != null) {
|
||||
handlerV2XEvent.removeCallbacks(runnableV2XEvent);
|
||||
runnableV2XEvent = null;
|
||||
}
|
||||
//移除窗体
|
||||
MogoApisHandler.getInstance().getApis().getTopViewManager().removeViewNoLinkage(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 窗体倒计时
|
||||
*/
|
||||
public void countDownV2XEvent() {
|
||||
// 倒计时
|
||||
if (runnableV2XEvent == null) {
|
||||
runnableV2XEvent = () -> {
|
||||
//Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。");
|
||||
//移除窗体
|
||||
MogoApisHandler.getInstance().getApis().getTopViewManager().removeViewNoLinkage(this);
|
||||
};
|
||||
} else {
|
||||
handlerV2XEvent.removeCallbacks(runnableV2XEvent);
|
||||
}
|
||||
|
||||
Logger.d(TAG, "V2X=== Window 展示开始倒计时:" );
|
||||
handlerV2XEvent.postDelayed(runnableV2XEvent, 20000);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.mogo.module.extensions.live;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/12/13
|
||||
*/
|
||||
public class PushDataType {
|
||||
/**
|
||||
* Push 摄像头事件场景 VR
|
||||
*/
|
||||
public static final String TYPE_PUSH_CAMERA_DATA = "TYPE_PUSH_CAMERA_DATA";
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.mogo.module.extensions.live.impl;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
|
||||
|
||||
public abstract class AbsCameraScenario<T> implements ICameraScenario {
|
||||
protected String TAG = "AbsCameraScenario";
|
||||
private ICameraWindow mV2XWindow;
|
||||
private SocketDownData.CloudRoadDataProto mCloudRoadData;
|
||||
|
||||
public abstract void init(@Nullable SocketDownData.CloudRoadDataProto cloudRoadData);
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
closeButton();
|
||||
closeWindow();
|
||||
clearPOI();
|
||||
}
|
||||
|
||||
public ICameraWindow getV2XWindow() {
|
||||
return mV2XWindow;
|
||||
}
|
||||
|
||||
public void setV2XWindow(@Nullable ICameraWindow mV2XWindow) {
|
||||
this.mV2XWindow = mV2XWindow;
|
||||
}
|
||||
|
||||
public SocketDownData.CloudRoadDataProto getmCloudRoadData() {
|
||||
return mCloudRoadData;
|
||||
}
|
||||
|
||||
public void setmCloudRoadData(SocketDownData.CloudRoadDataProto mCloudRoadData) {
|
||||
this.mCloudRoadData = mCloudRoadData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.mogo.module.extensions.live.impl;
|
||||
|
||||
|
||||
public interface ICameraScenario {
|
||||
|
||||
/**
|
||||
* 展示场景
|
||||
*/
|
||||
void show();
|
||||
|
||||
/**
|
||||
* 关闭场景
|
||||
*/
|
||||
void close();
|
||||
|
||||
/**
|
||||
* 展示Window
|
||||
*/
|
||||
void showWindow();
|
||||
|
||||
/**
|
||||
* 关闭Window
|
||||
*/
|
||||
void closeWindow();
|
||||
|
||||
/**
|
||||
* 展示按钮
|
||||
*/
|
||||
void showButton();
|
||||
|
||||
/**
|
||||
* 关闭按钮
|
||||
*/
|
||||
void closeButton();
|
||||
|
||||
/**
|
||||
* 绘制POI
|
||||
*/
|
||||
void drawPOI();
|
||||
|
||||
/**
|
||||
* 清除POI
|
||||
*/
|
||||
void clearPOI();
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.mogo.module.extensions.live.impl;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface ICameraWindow<T> {
|
||||
|
||||
/**
|
||||
* 展示1/2窗口
|
||||
*/
|
||||
void show(T entity);
|
||||
|
||||
/**
|
||||
* 关闭1/2窗口
|
||||
*/
|
||||
void close();
|
||||
|
||||
/**
|
||||
* 返回窗体
|
||||
*
|
||||
* @return 当前窗体
|
||||
*/
|
||||
View getView();
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
package com.mogo.module.extensions.navi;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* 顶部view封装,用于处理手指滑动
|
||||
*/
|
||||
public class TopView extends FrameLayout {
|
||||
public TopView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public TopView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public TopView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
private OnTopViewSlideListener slideListener;
|
||||
private OnChildAddedListener childAddedListener;
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
// 简单处理,只要手指抬起的位置在按下的位置上面(就是手指上划),就触发外面的动画
|
||||
if (event.getY() < originY) {
|
||||
if (slideListener != null) {
|
||||
slideListener.onSlideUp();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
|
||||
private float originX,originY;
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
originY = ev.getY();
|
||||
originX = ev.getY();
|
||||
} else if (ev.getAction() == MotionEvent.ACTION_MOVE) {
|
||||
// 垂直滑动,事件拦截
|
||||
return Math.abs(originY - ev.getY()) > ViewConfiguration.get(getContext()).getScaledTouchSlop();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setSlideListener(OnTopViewSlideListener slideListener) {
|
||||
this.slideListener = slideListener;
|
||||
}
|
||||
|
||||
public void setChildAddedListener(OnChildAddedListener childAddedListener) {
|
||||
this.childAddedListener = childAddedListener;
|
||||
}
|
||||
|
||||
public interface OnTopViewSlideListener {
|
||||
/**
|
||||
* 监听到view上滑
|
||||
*/
|
||||
void onSlideUp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewAdded(View child) {
|
||||
super.onViewAdded(child);
|
||||
Logger.d("TopView", "onViewAdded==" + child);
|
||||
child.post(() -> {
|
||||
if (childAddedListener != null) {
|
||||
childAddedListener.onChildAdded(child);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewRemoved(View child) {
|
||||
super.onViewRemoved(child);
|
||||
Logger.d("TopView", "onViewRemoved: " + child);
|
||||
}
|
||||
|
||||
public interface OnChildAddedListener {
|
||||
/**
|
||||
* 子view添加完成,但是并不确定已经绘制完成
|
||||
*
|
||||
* @param child
|
||||
*/
|
||||
void onChildAdded(View child);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.module.extensions.net;
|
||||
|
||||
import com.mogo.module.extensions.bean.CommonConfigResponse;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.Single;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
/**
|
||||
* 获取配置信息
|
||||
*/
|
||||
public interface GetConfigApiServices {
|
||||
|
||||
@GET("dataSave/car/customConfig/no/getAll/v1")
|
||||
Single<CommonConfigResponse> getConfig(@QueryMap Map<String, Object> parameters);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,185 +0,0 @@
|
||||
package com.mogo.module.extensions.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.live.CameraLiveManager;
|
||||
import com.mogo.module.extensions.live.CameraWindow3DAdapter;
|
||||
import com.mogo.module.extensions.live.PushDataType;
|
||||
import com.mogo.realtime.api.MoGoAiCloudRealTime;
|
||||
import com.mogo.realtime.socket.IMogoCloudOnMsgListener;
|
||||
|
||||
|
||||
/**
|
||||
* vr模式下,摄像头消息 CameraLiveNoticeHelper
|
||||
*/
|
||||
public class CameraLiveNoticeHelper implements IMogoCloudOnMsgListener {
|
||||
private static final String TAG = "CameraLiveNoticeHelper";
|
||||
private Context mContext;
|
||||
private static IMogoMarker mMogoMarker;
|
||||
private SocketDownData.CloudRoadDataProto mCloudRoadData;
|
||||
private volatile boolean isVrMode;
|
||||
private volatile boolean isVrModeMarker;
|
||||
private volatile String mCurrentUuid;
|
||||
|
||||
|
||||
public void init(Context context) {
|
||||
Logger.d(TAG, "init ======= ");
|
||||
mContext = context;
|
||||
|
||||
MoGoAiCloudRealTime.registerOnMsgListener(this);
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().registerMogoMarkerClickListener(PushDataType.TYPE_PUSH_CAMERA_DATA, new IMogoMarkerClickListener() {
|
||||
@Override
|
||||
public boolean onMarkerClicked(IMogoMarker marker) {
|
||||
//点击的marker的具体数据
|
||||
if (mCloudRoadData != null && !TextUtils.isEmpty(mCloudRoadData.getRtmpUrl())) {
|
||||
CameraLiveManager.getInstance().init(mCloudRoadData);
|
||||
} else {
|
||||
Logger.e(TAG, " onMarkerClicked mCloudRoadData == null ");
|
||||
TipToast.shortTip("直播流地址为空");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void release() {
|
||||
MoGoAiCloudRealTime.unRegisterOnMsgListener(this);
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().unregisterMogoMarkerClickListener(PushDataType.TYPE_PUSH_CAMERA_DATA);
|
||||
mCloudRoadData = null;
|
||||
mContext = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* PushRoadConditionDrawer
|
||||
* vr模式
|
||||
*
|
||||
* @param roadData 道路数据
|
||||
*/
|
||||
private void addVrCameraMarker(SocketDownData.CloudRoadDataProto roadData) {
|
||||
Log.e(TAG, "addVrCameraMarker --lat = " + roadData.getLat() + "--lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
|
||||
if (!TextUtils.isEmpty(roadData.getRtmpUrl())) {
|
||||
removeCameraMarker();
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.data(roadData)
|
||||
.latitude(roadData.getLat())
|
||||
.longitude(roadData.getLon());
|
||||
options.anchor(0.5f, 0.5f);
|
||||
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.icon_space, null);
|
||||
options.icon(bitmap);
|
||||
mMogoMarker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext)
|
||||
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
|
||||
if (mMogoMarker != null) {
|
||||
mMogoMarker.setInfoWindowAdapter(new CameraWindow3DAdapter(AbsMogoApplication.getApp(), options));
|
||||
mMogoMarker.showInfoWindow();
|
||||
mMogoMarker.setOwner(PushDataType.TYPE_PUSH_CAMERA_DATA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通模式
|
||||
*
|
||||
* @param roadData 道路数据
|
||||
*/
|
||||
private void addNormalCameraMarker(SocketDownData.CloudRoadDataProto roadData) {
|
||||
Log.e(TAG, "addNormalCameraMarker --lat = " + roadData.getLat() + " --lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
|
||||
if (!TextUtils.isEmpty(roadData.getRtmpUrl())) {
|
||||
removeCameraMarker();
|
||||
if (mMogoMarker != null) {
|
||||
mMogoMarker.hideInfoWindow();
|
||||
}
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.data(roadData)
|
||||
.latitude(roadData.getLat())
|
||||
.longitude(roadData.getLon());
|
||||
options.anchor(0.5f, 0.5f);
|
||||
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.module_camera_normal_traffic, null);
|
||||
options.icon(bitmap);
|
||||
mMogoMarker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext)
|
||||
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
|
||||
if (mMogoMarker != null) {
|
||||
mMogoMarker.setOwner(PushDataType.TYPE_PUSH_CAMERA_DATA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void removeCameraMarker() {
|
||||
if (mMogoMarker != null) {
|
||||
mMogoMarker.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void renderMarker(SocketDownData.LauncherSnapshotProto obj) {
|
||||
if (obj != null) {
|
||||
if (obj.getCamera() != null && !TextUtils.isEmpty(obj.getCamera().getRtmpUrl())) {
|
||||
mCloudRoadData = obj.getCamera();
|
||||
Log.d(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl() + "--- isVrMode = " + isVrMode + " ---isVrModeMarker = " + isVrModeMarker + ">>>>mCurrentUuid = " + mCurrentUuid + ">>>mCloudRoadData.getUuid() = " + mCloudRoadData.getUuid());
|
||||
if (TextUtils.equals(mCurrentUuid, mCloudRoadData.getUuid())) {
|
||||
if (isVrMode == isVrModeMarker) {
|
||||
// do nothing.
|
||||
Log.d(TAG, "-------------1------------");
|
||||
} else {
|
||||
if (isVrMode) {
|
||||
Log.d(TAG, "-------------2------------");
|
||||
addVrCameraMarker(mCloudRoadData);
|
||||
isVrModeMarker = true;
|
||||
} else {
|
||||
Log.d(TAG, "-------------3------------");
|
||||
addNormalCameraMarker(mCloudRoadData);
|
||||
isVrModeMarker = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mCurrentUuid = mCloudRoadData.getUuid();
|
||||
// 是否需要延迟
|
||||
if (isVrMode) {
|
||||
Log.d(TAG, "-------------4------------");
|
||||
addVrCameraMarker(mCloudRoadData);
|
||||
isVrModeMarker = true;
|
||||
} else {
|
||||
Log.d(TAG, "-------------5------------");
|
||||
addNormalCameraMarker(mCloudRoadData);
|
||||
isVrModeMarker = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//删除marker
|
||||
if (obj.getCamera() != null) {
|
||||
Log.e(TAG, "onMsgReceived RtmpUrl() = " + obj.getCamera().getRtmpUrl());
|
||||
} else {
|
||||
Log.e(TAG, "obj.getCamera() == null ----------- ");
|
||||
}
|
||||
removeCameraMarker();
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "onMsgReceived obj == null ");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgSend(long id) {
|
||||
//Logger.d(TAG, "onMsgSend id : " + id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgReceived(SocketDownData.LauncherSnapshotProto mogoSnapshotSetData) {
|
||||
renderMarker(mogoSnapshotSetData);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.mogo.module.extensions.utils;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
/**
|
||||
* 没有地图场景下,topView底层蒙版帮助类,因为有两个地方涉及到蒙版的显示隐藏{@link TopViewAnimHelper}和{@link TopViewNoLinkageAnimHelper}
|
||||
* 为了不冲突,采用显示计数的方式进行兼容
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class NoMapTopViewShaderHelper {
|
||||
private static final String TAG = "NoMapTopViewShaderHelper";
|
||||
private static final NoMapTopViewShaderHelper ourInstance = new NoMapTopViewShaderHelper();
|
||||
|
||||
public static NoMapTopViewShaderHelper getInstance() {
|
||||
return ourInstance;
|
||||
}
|
||||
|
||||
private NoMapTopViewShaderHelper() {
|
||||
}
|
||||
|
||||
private View shader;
|
||||
private int showCount = 0;
|
||||
|
||||
public void initShaderView(View shader) {
|
||||
this.shader = shader;
|
||||
}
|
||||
|
||||
public void showShader(){
|
||||
if (this.shader == null) {
|
||||
Logger.e(TAG, "shader view is null!");
|
||||
return;
|
||||
}
|
||||
if (DebugConfig.isMapBased()) {
|
||||
Logger.d(TAG, "基于地图版本不加shader");
|
||||
return;
|
||||
}
|
||||
if (showCount == 0) {
|
||||
shader.setVisibility(View.VISIBLE);
|
||||
}
|
||||
showCount++;
|
||||
}
|
||||
|
||||
public void hideShader(){
|
||||
if (this.shader == null) {
|
||||
Logger.e(TAG, "shader view is null!");
|
||||
return;
|
||||
}
|
||||
if (DebugConfig.isMapBased()) {
|
||||
Logger.d(TAG, "基于地图版本不加shader");
|
||||
return;
|
||||
}
|
||||
if (showCount == 1) {
|
||||
shader.setVisibility(View.GONE);
|
||||
}
|
||||
showCount--;
|
||||
}
|
||||
|
||||
public void release(){
|
||||
shader = null;
|
||||
}
|
||||
}
|
||||
@@ -1,522 +0,0 @@
|
||||
package com.mogo.module.extensions.utils;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.util.ArrayMap;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.map.Scene;
|
||||
import com.mogo.module.extensions.ExtensionsModuleConst;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.navi.TopView;
|
||||
import com.mogo.service.windowview.IMogoTopViewStatusListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 顶部动画帮助类
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class TopViewAnimHelper {
|
||||
private static final String TAG = "TopViewAnimHelper";
|
||||
|
||||
private ConstraintLayout topMotionLayout;
|
||||
private TopView topContainer;
|
||||
|
||||
private float topHeight = 0f;
|
||||
|
||||
private TopViewAnimHelper() {
|
||||
}
|
||||
|
||||
private volatile static TopViewAnimHelper instance = null;
|
||||
|
||||
public static TopViewAnimHelper getInstance() {
|
||||
if (instance == null) {
|
||||
synchronized (TopViewAnimHelper.class) {
|
||||
if (instance == null) {
|
||||
instance = new TopViewAnimHelper();
|
||||
}
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
public void init(ConstraintLayout rootView) {
|
||||
init(rootView, null);
|
||||
}
|
||||
|
||||
public void init(ConstraintLayout rootView, OnTopViewAnimSimpleListener listener) {
|
||||
topMotionLayout = rootView;
|
||||
topContainer = rootView.findViewById(R.id.module_entrance_id_top_container);
|
||||
topContainer.getLayoutParams().width = (int) getDimen(R.dimen.module_ext_top_view_width);
|
||||
topContainer.setSlideListener(this::startLatestTopOutAnim);
|
||||
// 初始化默认隐藏导航
|
||||
hideNaviView();
|
||||
showStickView();
|
||||
}
|
||||
|
||||
private volatile boolean isTopViewOut = true;
|
||||
private List<View> viewCaches = new ArrayList<>();
|
||||
private Map<View, IMogoTopViewStatusListener> statusListenerMap = new ArrayMap<>();
|
||||
|
||||
private View currentAnimatingView = null;
|
||||
|
||||
public void addSubView(View subView, ViewGroup.LayoutParams params,
|
||||
IMogoTopViewStatusListener statusListener) {
|
||||
if (isTopViewOut || topContainer.getChildCount() == 0) {
|
||||
throw new IllegalStateException("no base view in top view");
|
||||
}
|
||||
if (subView == null) {
|
||||
throw new IllegalArgumentException("method addTopView params view is null");
|
||||
}
|
||||
if (params == null) {
|
||||
throw new IllegalArgumentException("method addTopView params LayoutParams is null");
|
||||
}
|
||||
|
||||
// 是在已经添加过view之后,才能添加sub view,所以直接走增加小view的逻辑就行
|
||||
if (!viewCaches.contains(subView)) {
|
||||
viewCaches.add(subView);
|
||||
statusListenerMap.put(subView, statusListener);
|
||||
subView.setTranslationY(0);
|
||||
subView.setTranslationY(-(params.height));
|
||||
topContainer.addView(subView, params);
|
||||
Logger.d(TAG, "添加subView: " + subView.getTranslationY() + " height:" +
|
||||
" " + subView.getHeight() + " paramsHeight: " + params.height);
|
||||
if (statusListenerMap.get(subView) != null) {
|
||||
statusListenerMap.get(subView).beforeViewAddAnim(subView);
|
||||
}
|
||||
subView.animate().translationY(0).setDuration(500).setListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
IMogoTopViewStatusListener listener = statusListenerMap.get(subView);
|
||||
if (listener != null) {
|
||||
listener.onViewAdded(subView);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void removeSubView(View subView) {
|
||||
if (topContainer.getChildCount() < 2) {
|
||||
throw new IllegalStateException("view count not enough");
|
||||
}
|
||||
Logger.d(TAG,
|
||||
"小view退出: " + subView.getTranslationY() + " height: " + subView.getHeight());
|
||||
if (statusListenerMap.get(subView) != null) {
|
||||
statusListenerMap.get(subView).beforeViewRemoveAnim(subView);
|
||||
}
|
||||
subView.animate().translationY(-(subView.getHeight())).setDuration(500).setListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
Logger.d(TAG, "onAnimationEnd: " + subView);
|
||||
viewCaches.remove(subView);
|
||||
topContainer.removeView(subView);
|
||||
IMogoTopViewStatusListener listener = statusListenerMap.remove(subView);
|
||||
if (listener != null) {
|
||||
listener.onViewRemoved(subView);
|
||||
} else {
|
||||
Logger.d(TAG, "listener is null");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
viewCaches.remove(subView);
|
||||
topContainer.removeView(subView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
private final List<MotionViewCache> stickViewCache = new ArrayList<>();
|
||||
|
||||
private void showStickView() {
|
||||
if (stickViewCache.isEmpty()) {
|
||||
return;
|
||||
} else if (stickViewCache.size() == 1) {
|
||||
MotionViewCache stickView = stickViewCache.remove(0);
|
||||
startTopInAnim(stickView.view, stickView.params, stickView.statusListener);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < stickViewCache.size() - 2; i++) {
|
||||
MotionViewCache stickView = stickViewCache.get(i);
|
||||
stickView.statusListener.beforeViewRemoveAnim(stickView.view);
|
||||
stickView.statusListener.onViewRemoved(stickView.view);
|
||||
}
|
||||
MotionViewCache stickView = stickViewCache.get(stickViewCache.size() - 1);
|
||||
stickViewCache.clear();
|
||||
startTopInAnim(stickView.view, stickView.params, stickView.statusListener);
|
||||
}
|
||||
|
||||
public void startTopInAnim(View view, ViewGroup.LayoutParams params,
|
||||
IMogoTopViewStatusListener statusListener) {
|
||||
|
||||
if (topMotionLayout == null) {
|
||||
// 增加黏性事件
|
||||
stickViewCache.add(new MotionViewCache(view, params, statusListener));
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d(TAG, "startTopInAnim=====" + isTopViewOut);
|
||||
if (view == null) {
|
||||
throw new IllegalArgumentException("method addTopView params view is null");
|
||||
}
|
||||
if (params == null) {
|
||||
throw new IllegalArgumentException("method addTopView params LayoutParams is null");
|
||||
}
|
||||
|
||||
if (isOuting) {
|
||||
if (motionViewCache != null) {
|
||||
motionViewCache.statusListener.beforeViewRemoveAnim(motionViewCache.view);
|
||||
motionViewCache.statusListener.onViewRemoved(motionViewCache.view);
|
||||
}
|
||||
motionViewCache = new MotionViewCache(view, params, statusListener);
|
||||
// return;
|
||||
}
|
||||
|
||||
if (!viewCaches.contains(view)) {
|
||||
// 判断此view是否已经增加到了顶部view,如果增加过就不增加了
|
||||
currentAnimatingView = view;
|
||||
view.setTranslationY(0);
|
||||
statusListenerMap.put(view, statusListener);
|
||||
Logger.d(TAG, "开始执行");
|
||||
isTopViewOut = false;
|
||||
if (topContainer.getChildCount() > 0) {
|
||||
// 顶部view已经有了内容,新增内容无需整体布局变化,只是新增布局加个动画
|
||||
viewCaches.add(view);
|
||||
|
||||
// 生硬的删掉之前的view
|
||||
int lastCount = topContainer.getChildCount();
|
||||
Logger.d(TAG, "进入动画,lastCount: " + lastCount);
|
||||
for (int i = 0; i < lastCount; i++) {
|
||||
View lastView = topContainer.getChildAt(i);
|
||||
if (statusListenerMap.get(lastView) != null) {
|
||||
statusListenerMap.get(lastView).beforeViewRemoveAnim(lastView);
|
||||
}
|
||||
viewCaches.remove(lastView);
|
||||
if (statusListenerMap.get(lastView) != null) {
|
||||
statusListenerMap.remove(lastView).onViewRemoved(lastView);
|
||||
}
|
||||
}
|
||||
Logger.d(TAG, "生硬的删掉了之前的view: " + viewCaches.size());
|
||||
topContainer.removeAllViews();
|
||||
// 同时设置一下隐藏状态
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setTopViewShow(ExtensionsModuleConst.TYPE_ENTRANCE, false);
|
||||
|
||||
// 如果高度变化,生硬的变化一下高度
|
||||
Logger.d(TAG, "container.height: " + topContainer.getHeight());
|
||||
if (topContainer.getHeight() != params.height) {
|
||||
// 改变topContainer的translationY
|
||||
topContainer.setTranslationY(params.height);
|
||||
LayoutParams p = topContainer.getLayoutParams();
|
||||
p.height = params.height;
|
||||
topContainer.setLayoutParams(p);
|
||||
Logger.d(TAG, "改变container的高度===");
|
||||
}
|
||||
|
||||
view.setTranslationY(-(params.height));
|
||||
topContainer.addView(view, params);
|
||||
Logger.d(TAG, "顶部view已经有布局了,增加新增view滑入动画: " + view.getTranslationY() + " height:" +
|
||||
" " + view.getHeight() + " paramsHeight: " + params.height);
|
||||
if (statusListenerMap.get(view) != null) {
|
||||
statusListenerMap.get(view).beforeViewAddAnim(view);
|
||||
}
|
||||
view.animate().translationY(0).setDuration(500).setListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
IMogoTopViewStatusListener listener = statusListenerMap.get(view);
|
||||
if (listener != null) {
|
||||
listener.onViewAdded(view);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
// 顶部view还没有内容,需要整体下移
|
||||
viewCaches.add(view);
|
||||
topContainer.addView(view, params);
|
||||
LayoutParams p = topContainer.getLayoutParams();
|
||||
p.height = params.height;
|
||||
topContainer.setLayoutParams(p);
|
||||
Logger.d(TAG, "整体进入==== view.visibility: " + view.getVisibility() + " view" +
|
||||
".position: (" + view.getX() + ", " + view.getY() + ") params.width: " + params.width + " params.height: " + params.height);
|
||||
if (statusListenerMap.get(view) != null) {
|
||||
statusListenerMap.get(view).beforeViewAddAnim(view);
|
||||
}
|
||||
topContainer.setChildAddedListener(child -> {
|
||||
try {
|
||||
topContainer.setChildAddedListener(null);
|
||||
|
||||
NoMapTopViewShaderHelper.getInstance().showShader();
|
||||
checkCameraModePosition(false);
|
||||
int scene = 0;
|
||||
scene = Scene.AIMLESS_WITH_ROAD_EVENT;
|
||||
topContainer.animate().translationY(params.height).setListener(mainAnimListener).start();
|
||||
Logger.d(TAG, "show top setMapCenterPointByScene: " + scene);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e, "添加view异常");
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setTopViewShow(ExtensionsModuleConst.TYPE_ENTRANCE, true);
|
||||
// vr模式下与TopView互斥
|
||||
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
|
||||
TopViewNoLinkageAnimHelper.getInstance().removeAllView();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出最新的(也就是最上面的)view
|
||||
*/
|
||||
private void startLatestTopOutAnim() {
|
||||
if (topContainer.getChildCount() > 1) {
|
||||
removeSubView(topContainer.getChildAt(topContainer.getChildCount() - 1));
|
||||
} else if (topContainer.getChildCount() > 0) {
|
||||
startTopOutAnim(topContainer.getChildAt(topContainer.getChildCount() - 1));
|
||||
}
|
||||
}
|
||||
|
||||
public void startTopOutAnim(View view) {
|
||||
|
||||
if (topMotionLayout == null) {
|
||||
return;
|
||||
}
|
||||
Logger.d("TopViewAnimHelper", "startTopOutAnim=====");
|
||||
if (!isTopViewOut && viewCaches.contains(view)) {
|
||||
isOuting = true;
|
||||
// 顶部view仅剩一个view,需要整体上移
|
||||
if (statusListenerMap.get(view) != null) {
|
||||
statusListenerMap.get(view).beforeViewRemoveAnim(view);
|
||||
}
|
||||
isTopViewOut = true;
|
||||
|
||||
NoMapTopViewShaderHelper.getInstance().hideShader();
|
||||
|
||||
topContainer.animate().translationY(0).setListener(mainAnimListener).start();
|
||||
|
||||
checkCameraModePosition(false);
|
||||
|
||||
int scene = 0;
|
||||
scene = Scene.AIMLESS;
|
||||
Logger.d(TAG, "hide top setMapCenterPointByScene: " + scene);
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setTopViewShow(ExtensionsModuleConst.TYPE_ENTRANCE, false);
|
||||
}
|
||||
}
|
||||
|
||||
public void showNaviView() {
|
||||
if (topMotionLayout == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d("TopViewAnimHelper", "showNaviView=====");
|
||||
|
||||
int scene = 0;
|
||||
if (isTopViewOut) {
|
||||
scene = Scene.NAVI_WITH_ROAD_EVENT;
|
||||
} else {
|
||||
scene = Scene.NAVI;
|
||||
}
|
||||
Logger.d(TAG, "navi show setMapCenterPointByScene: " + scene);
|
||||
checkCameraModePosition(true);
|
||||
}
|
||||
|
||||
public void hideNaviView() {
|
||||
if (topMotionLayout == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d("TopViewAnimHelper", "hideNaviView=====");
|
||||
int scene = 0;
|
||||
if (isTopViewOut) {
|
||||
scene = Scene.AIMLESS;
|
||||
} else {
|
||||
scene = Scene.AIMLESS_WITH_ROAD_EVENT;
|
||||
}
|
||||
Logger.d(TAG, "hide navi setMapCenterPointByScene: " + scene);
|
||||
checkCameraModePosition(true);
|
||||
}
|
||||
|
||||
private void checkCameraModePosition(boolean isNeedClone) {
|
||||
}
|
||||
|
||||
private float getDimen(int resId) {
|
||||
return (int) topMotionLayout.getContext().getResources().getDimensionPixelSize(resId);
|
||||
}
|
||||
|
||||
private int computeNaviMarginTop(int height) {
|
||||
int result = (int) (height - (getDimen(R.dimen.module_ext_top_over_navi_height)) - getDimen(R.dimen.module_common_shadow_width_pos));
|
||||
Logger.d(TAG, "computeNaviMarginTop: " + height + " result: " + result);
|
||||
return result;
|
||||
}
|
||||
|
||||
interface OnTopViewAnimSimpleListener {
|
||||
void onAnimStart();
|
||||
|
||||
void onAnimEnd();
|
||||
}
|
||||
|
||||
public boolean isViewAdded(View view) {
|
||||
return viewCaches.contains(view);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于和{@link TopViewNoLinkageAnimHelper}互斥显示
|
||||
* <p>
|
||||
* 网约车新增与网约车界面互斥
|
||||
*/
|
||||
public void removeAllViewExceptVrNav() {
|
||||
Logger.d(TAG, "remove all view except vr nav");
|
||||
isTopViewOut = true;
|
||||
if(topContainer != null) {
|
||||
int lastCount = topContainer.getChildCount();
|
||||
for (int i = 0; i < lastCount; i++) {
|
||||
View child = topContainer.getChildAt(i);
|
||||
viewCaches.remove(child);
|
||||
IMogoTopViewStatusListener listener = statusListenerMap.remove(child);
|
||||
if (listener != null) {
|
||||
listener.beforeViewRemoveAnim(child);
|
||||
listener.onViewRemoved(child);
|
||||
}
|
||||
}
|
||||
topContainer.setTranslationY(0);
|
||||
topContainer.removeAllViews();
|
||||
}
|
||||
hideNaviView();
|
||||
}
|
||||
|
||||
public void removeAllView() {
|
||||
Logger.d(TAG, "remove all view");
|
||||
removeAllViewExceptVrNav();
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
topMotionLayout = null;
|
||||
topContainer = null;
|
||||
}
|
||||
|
||||
public void enterVrMode() {
|
||||
removeAllView();
|
||||
topContainer.getLayoutParams().width = (int) getDimen(R.dimen.module_ext_top_view_width_in_vr_mode);
|
||||
}
|
||||
|
||||
public void exitVrMode() {
|
||||
removeAllView();
|
||||
topContainer.getLayoutParams().width = (int) getDimen(R.dimen.module_ext_top_view_width);
|
||||
}
|
||||
|
||||
private final Animator.AnimatorListener mainAnimListener = new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
Logger.d(TAG, "onMainAnimEnd: " + currentAnimatingView);
|
||||
IMogoTopViewStatusListener listener;
|
||||
if (isTopViewOut) {
|
||||
int lastCount = topContainer.getChildCount();
|
||||
for (int i = 0; i < lastCount; i++) {
|
||||
View child = topContainer.getChildAt(i);
|
||||
viewCaches.remove(child);
|
||||
listener = statusListenerMap.remove(child);
|
||||
if (listener != null) {
|
||||
listener.onViewRemoved(child);
|
||||
}
|
||||
}
|
||||
topContainer.removeAllViews();
|
||||
currentAnimatingView = null;
|
||||
isOuting = false;
|
||||
} else {
|
||||
listener = statusListenerMap.get(currentAnimatingView);
|
||||
if (listener != null) {
|
||||
listener.onViewAdded(currentAnimatingView);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private MotionViewCache motionViewCache = null;
|
||||
private boolean isOuting = false;
|
||||
|
||||
private static class MotionViewCache {
|
||||
private final View view;
|
||||
private final LayoutParams params;
|
||||
private final IMogoTopViewStatusListener statusListener;
|
||||
|
||||
public MotionViewCache(View view, LayoutParams params, IMogoTopViewStatusListener statusListener) {
|
||||
this.view = view;
|
||||
this.params = params;
|
||||
this.statusListener = statusListener;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,146 +0,0 @@
|
||||
package com.mogo.module.extensions.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.service.windowview.IMogoTopViewManager;
|
||||
import com.mogo.service.windowview.IMogoTopViewStatusListener;
|
||||
|
||||
/**
|
||||
* 顶部1/2界面管理
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_EXTENSIONS_TOP_VIEW_MANAGER)
|
||||
public class TopViewManager implements IMogoTopViewManager {
|
||||
|
||||
private Context context;
|
||||
private LayoutParams parentParams;
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addView(View view) {
|
||||
addView(view, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) context.getResources().getDimension(R.dimen.dp_350)), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addView(View view, IMogoTopViewStatusListener statusListener) {
|
||||
addView(view, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) context.getResources().getDimension(R.dimen.dp_350)), statusListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addView(View view, ViewGroup.LayoutParams params) {
|
||||
addView(view, params, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addView(View view, ViewGroup.LayoutParams params,
|
||||
IMogoTopViewStatusListener statusListener) {
|
||||
parentParams = params;
|
||||
try {
|
||||
TopViewAnimHelper.getInstance().startTopInAnim(view, params, statusListener);
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewNoLinkage(View view) {
|
||||
addViewNoLinkage(view, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) context.getResources().getDimension(R.dimen.dp_350)), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewNoLinkage(View view, IMogoTopViewStatusListener statusListener) {
|
||||
addViewNoLinkage(view, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) context.getResources().getDimension(R.dimen.dp_350)), statusListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewNoLinkage(View view, ViewGroup.LayoutParams params) {
|
||||
addViewNoLinkage(view, params, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewNoLinkage(View view, ViewGroup.LayoutParams params,
|
||||
IMogoTopViewStatusListener statusListener) {
|
||||
parentParams = params;
|
||||
try {
|
||||
TopViewNoLinkageAnimHelper.getInstance().startTopInAnim(view, params, statusListener);
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSubView(View view) {
|
||||
addSubView(view, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSubView(View view, IMogoTopViewStatusListener statusListener) {
|
||||
try {
|
||||
TopViewAnimHelper.getInstance().addSubView(view, parentParams, statusListener);
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeView(View view) {
|
||||
try {
|
||||
TopViewAnimHelper.getInstance().startTopOutAnim(view);
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeViewNoLinkage(View view) {
|
||||
try {
|
||||
TopViewNoLinkageAnimHelper.getInstance().startTopOutAnim(view);
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSubView(View view) {
|
||||
try {
|
||||
TopViewAnimHelper.getInstance().removeSubView(view);
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isViewAdded(View view) {
|
||||
try {
|
||||
return TopViewAnimHelper.getInstance().isViewAdded(view);
|
||||
} catch ( Exception e ){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAllViewInVrMode() {
|
||||
try {
|
||||
TopViewAnimHelper.getInstance().removeAllViewExceptVrNav();
|
||||
TopViewNoLinkageAnimHelper.getInstance().removeAllView();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,207 +0,0 @@
|
||||
package com.mogo.module.extensions.utils;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.util.ArrayMap;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.map.Scene;
|
||||
import com.mogo.module.extensions.ExtensionsModuleConst;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.navi.TopView;
|
||||
import com.mogo.service.windowview.IMogoTopViewStatusListener;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 顶部动画帮助类,与其他控件无关练
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class TopViewNoLinkageAnimHelper {
|
||||
private static final String TAG = "TopViewNoLinkageAnimHelper";
|
||||
|
||||
private ConstraintLayout topMotionLayout;
|
||||
private TopView topContainerNoLinkage;
|
||||
|
||||
private volatile boolean isTopViewOut = true;
|
||||
private final Map<View, IMogoTopViewStatusListener> statusListenerMap = new ArrayMap<>();
|
||||
|
||||
private View currentAnimatingView = null;
|
||||
|
||||
private IMogoMapUIController mogoMapUIController;
|
||||
private volatile static TopViewNoLinkageAnimHelper instance = null;
|
||||
|
||||
private TopViewNoLinkageAnimHelper() {
|
||||
}
|
||||
|
||||
public static TopViewNoLinkageAnimHelper getInstance() {
|
||||
if (instance == null) {
|
||||
synchronized (TopViewNoLinkageAnimHelper.class) {
|
||||
if (instance == null) {
|
||||
instance = new TopViewNoLinkageAnimHelper();
|
||||
}
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void setIMogoMapUIController(IMogoMapUIController mogoMapUIController) {
|
||||
this.mogoMapUIController = mogoMapUIController;
|
||||
}
|
||||
|
||||
public void init(ConstraintLayout rootView) {
|
||||
topMotionLayout = rootView;
|
||||
topContainerNoLinkage = rootView.findViewById(R.id.module_entrance_id_top_container_no_linkage);
|
||||
|
||||
topContainerNoLinkage.setSlideListener(this::startLatestTopOutAnim);
|
||||
}
|
||||
|
||||
public void startTopInAnim(View view, LayoutParams params,
|
||||
IMogoTopViewStatusListener statusListener) {
|
||||
|
||||
if (topMotionLayout == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.d(TAG, "startTopInAnim=====" + isTopViewOut);
|
||||
if (view == null) {
|
||||
throw new IllegalArgumentException("method addTopView params view is null");
|
||||
}
|
||||
if (params == null) {
|
||||
throw new IllegalArgumentException("method addTopView params LayoutParams is null");
|
||||
}
|
||||
|
||||
// 判断此view是否已经增加到了顶部view,如果增加过就不增加了
|
||||
view.setTranslationY(0);
|
||||
statusListenerMap.put(view, statusListener);
|
||||
Logger.d(TAG, "开始执行");
|
||||
isTopViewOut = false;
|
||||
|
||||
// 顶部view还没有内容,需要整体下移
|
||||
currentAnimatingView = view;
|
||||
topContainerNoLinkage.addView(view, params);
|
||||
Logger.d(TAG, "整体进入==== view.visibility: " + view.getVisibility() + " view" +
|
||||
".position: (" + view.getX() + ", " + view.getY() + ") params.width: " + params.width + " params.height: " + params.height);
|
||||
if (statusListenerMap.get(view) != null) {
|
||||
statusListenerMap.get(view).beforeViewAddAnim(view);
|
||||
}
|
||||
topContainerNoLinkage.setChildAddedListener(child -> {
|
||||
topContainerNoLinkage.setChildAddedListener(null);
|
||||
NoMapTopViewShaderHelper.getInstance().showShader();
|
||||
topContainerNoLinkage.animate().translationY(child.getHeight()).setListener(mainAnimListener).start();
|
||||
int scene = Scene.AIMLESS_WITH_ROAD_EVENT;
|
||||
Logger.d(TAG, "show top setMapCenterPointByScene: " + scene);
|
||||
});
|
||||
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setTopViewShow(ExtensionsModuleConst.TYPE_ENTRANCE, true);
|
||||
|
||||
// vr模式下与TopView互斥
|
||||
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
|
||||
TopViewAnimHelper.getInstance().removeAllViewExceptVrNav();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出最新的(也就是最上面的)view
|
||||
*/
|
||||
private void startLatestTopOutAnim() {
|
||||
Logger.d(TAG, "startLatestTopOutAnim=====");
|
||||
|
||||
if (topContainerNoLinkage.getChildCount() > 0) {
|
||||
startTopOutAnim(topContainerNoLinkage.getChildAt(topContainerNoLinkage.getChildCount() - 1));
|
||||
}
|
||||
}
|
||||
|
||||
public void startTopOutAnim(View view) {
|
||||
if (topMotionLayout == null) {
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "startTopOutAnim=====");
|
||||
if (!isTopViewOut) {
|
||||
// 顶部view仅剩一个view,需要整体上移
|
||||
if (statusListenerMap.get(view) != null) {
|
||||
statusListenerMap.get(view).beforeViewRemoveAnim(view);
|
||||
}
|
||||
isTopViewOut = true;
|
||||
NoMapTopViewShaderHelper.getInstance().hideShader();
|
||||
topContainerNoLinkage.animate().translationY(-topContainerNoLinkage.getTranslationY()).setListener(mainAnimListener).start();
|
||||
int scene = Scene.AIMLESS;
|
||||
Logger.d(TAG, "hide top setMapCenterPointByScene: " + scene);
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setTopViewShow(ExtensionsModuleConst.TYPE_ENTRANCE, false);
|
||||
}
|
||||
}
|
||||
|
||||
private float getDimen(int resId) {
|
||||
return (int) topMotionLayout.getContext().getResources().getDimensionPixelSize(resId);
|
||||
}
|
||||
|
||||
public void removeAllView() {
|
||||
Logger.d(TAG, "remove all view");
|
||||
isTopViewOut = true;
|
||||
if (topContainerNoLinkage != null) {
|
||||
int lastCount = topContainerNoLinkage.getChildCount();
|
||||
for (int i = 0; i < lastCount; i++) {
|
||||
View child = topContainerNoLinkage.getChildAt(i);
|
||||
IMogoTopViewStatusListener listener = statusListenerMap.remove(child);
|
||||
if (listener != null) {
|
||||
listener.beforeViewRemoveAnim(child);
|
||||
listener.onViewRemoved(child);
|
||||
}
|
||||
}
|
||||
topContainerNoLinkage.removeAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
topMotionLayout = null;
|
||||
topContainerNoLinkage = null;
|
||||
}
|
||||
|
||||
private final Animator.AnimatorListener mainAnimListener = new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
Logger.d(TAG, "isTopViewOut: " + isTopViewOut);
|
||||
IMogoTopViewStatusListener listener;
|
||||
if (isTopViewOut) {
|
||||
int lastCount = topContainerNoLinkage.getChildCount();
|
||||
for (int i = 0; i < lastCount; i++) {
|
||||
View child = topContainerNoLinkage.getChildAt(i);
|
||||
listener = statusListenerMap.remove(child);
|
||||
if (listener != null) {
|
||||
listener.onViewRemoved(child);
|
||||
}
|
||||
}
|
||||
topContainerNoLinkage.removeAllViews();
|
||||
currentAnimatingView = null;
|
||||
} else {
|
||||
listener = statusListenerMap.get(currentAnimatingView);
|
||||
if (listener != null) {
|
||||
listener.onViewAdded(currentAnimatingView);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 163 B |
Binary file not shown.
|
Before Width: | Height: | Size: 163 B |
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 163 B |
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB |
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"
|
||||
>
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#3E7FFC"
|
||||
android:startColor="#5CC1FF" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_20"
|
||||
/>
|
||||
</shape>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#50526E"
|
||||
android:startColor="#333F4057" />
|
||||
<corners android:bottomRightRadius="@dimen/dp_20"/>
|
||||
|
||||
</shape>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="#50526E"
|
||||
android:startColor="#3F4057" />
|
||||
<corners android:radius="@dimen/module_ext_common_corner" />
|
||||
|
||||
</shape>
|
||||
|
||||
@@ -1,7 +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_20" />
|
||||
<solid android:color="#3F4057" />
|
||||
</shape>
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 边 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<padding
|
||||
android:bottom="2dp"
|
||||
android:left="2dp"
|
||||
android:right="2dp"
|
||||
android:top="3dp" />
|
||||
<solid android:color="#00000000" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<padding
|
||||
android:bottom="2dp"
|
||||
android:left="2dp"
|
||||
android:right="2dp"
|
||||
android:top="2dp" />
|
||||
<solid android:color="#00000000" />
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 中心背景 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_26" />
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:endColor="#3F4057"
|
||||
android:startColor="#5E6079"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="328dp" android:height="98dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="360" android:endColor="#ff616381" android:startColor="#ff48495e" />
|
||||
<corners android:radius="@dimen/dp_20" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -1,36 +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="wrap_content"
|
||||
android:background="@drawable/v2x_alert_window_bg"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<com.mogo.module.extensions.live.CameraLiveGSYVideoView
|
||||
android:id="@+id/videoPlayer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/module_video_window_height_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:roundLayoutRadius="@dimen/dp_30" />
|
||||
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
android:id="@+id/ivReportHead"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginEnd="@dimen/dp_31"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/videoPlayer"
|
||||
app:layout_constraintEnd_toEndOf="@+id/videoPlayer"
|
||||
app:miv_borderColor="#4cffffff"
|
||||
app:miv_failureHolder="@drawable/icon_default_user_head"
|
||||
app:miv_overlayImageId="@drawable/icon_default_user_head"
|
||||
app:miv_placeHolder="@drawable/icon_default_user_head"
|
||||
app:miv_shape="circle"
|
||||
app:miv_shapeBorderWidth="@dimen/dp_4"
|
||||
tools:visibility="invisible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/rlRoadEventDetail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/module_video_window_height_content"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<include
|
||||
android:id="@+id/liveVideo"
|
||||
layout="@layout/camera_item_v2x_live_video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pushVideoClose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:src="@drawable/module_common_close_selector" />
|
||||
</RelativeLayout>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.LiveRoundLayout 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">
|
||||
|
||||
<com.tencent.rtmp.ui.TXCloudVideoView
|
||||
android:id="@+id/txcVideoView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center" />
|
||||
|
||||
<androidx.core.widget.ContentLoadingProgressBar
|
||||
android:id="@+id/loading"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clLoadError"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivErrorIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_live_load_error"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvErrorContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:text="直播获取失败"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/module_event_live_error_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivErrorIcon"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivErrorIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivErrorIcon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRefreshButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:background="@drawable/v2x_refresh_button_bg"
|
||||
android:paddingStart="@dimen/dp_135"
|
||||
android:paddingTop="@dimen/dp_25"
|
||||
android:paddingEnd="@dimen/dp_135"
|
||||
android:paddingBottom="@dimen/dp_25"
|
||||
android:text="重试"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/module_event_live_error_text_size"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivErrorIcon" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.mogo.eagle.core.widget.LiveRoundLayout>
|
||||
@@ -1,48 +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_790"
|
||||
android:layout_height="@dimen/dp_440"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_marginTop="@dimen/dp_134"
|
||||
android:text="是否退出导航?"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="@dimen/sp_40"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dialog_ok"
|
||||
android:layout_width="@dimen/dp_395"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:background="@drawable/shape_react_blue_grident"
|
||||
android:gravity="center"
|
||||
android:text="确认"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dialog_cancel"
|
||||
android:layout_width="@dimen/dp_395"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:background="@drawable/shape_react_gray_grident"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -1,31 +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:id="@+id/module_entrance_id_top_motion_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<!--关联别的控件的头部容器-->
|
||||
<com.mogo.module.extensions.navi.TopView
|
||||
android:id="@+id/module_entrance_id_top_container"
|
||||
style="@style/NaviViewStyle"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintBottom_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<!--没有关联别的控件的头部弹窗容器-->
|
||||
<com.mogo.module.extensions.navi.TopView
|
||||
android:id="@+id/module_entrance_id_top_container_no_linkage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintBottom_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_common_shadow_width_pos">2px</dimen>
|
||||
<dimen name="module_common_btn_bottom">0px</dimen>
|
||||
<dimen name="module_entrance_id_button_marginLeft">-6px</dimen>
|
||||
<dimen name="module_event_live_error_text_size">20px</dimen>
|
||||
<dimen name="module_video_window_height_content">300px</dimen>
|
||||
<dimen name="module_video_window_width_content">400px</dimen>
|
||||
</resources>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="NaviViewStyle">
|
||||
<item name="android:layout_width">@dimen/module_ext_navi_width</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="NaviViewStyle">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,142 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- module_ext_layout_entrance.xml-->
|
||||
<dimen name="module_ext_search_height">90px</dimen>
|
||||
<dimen name="module_ext_search_marginLeft">32px</dimen>
|
||||
<dimen name="module_ext_search_marginTop">2px</dimen>
|
||||
<dimen name="module_ext_search_drawablePadding">16px</dimen>
|
||||
<dimen name="module_ext_search_paddingLeft">26px</dimen>
|
||||
<dimen name="module_ext_search_paddingRight">26px</dimen>
|
||||
<dimen name="module_ext_search_textSize">32px</dimen>
|
||||
|
||||
<dimen name="module_ext_common_address_height">90px</dimen>
|
||||
<dimen name="module_ext_common_address_marginLeft">32px</dimen>
|
||||
<dimen name="module_ext_common_address_marginTop">2px</dimen>
|
||||
<dimen name="module_ext_common_address_home_width">100px</dimen>
|
||||
<dimen name="module_ext_common_address_home_height">90px</dimen>
|
||||
<dimen name="module_ext_common_address_divider_width">2px</dimen>
|
||||
<dimen name="module_ext_common_address_divider_height">54px</dimen>
|
||||
<dimen name="module_ext_common_address_company_width">100px</dimen>
|
||||
<dimen name="module_ext_common_address_company_height">90px</dimen>
|
||||
<dimen name="module_ext_weather_space_between_icon_and_tem">8px</dimen>
|
||||
|
||||
<dimen name="module_ext_speed_limit_width">180px</dimen>
|
||||
<dimen name="module_ext_speed_limit_height">180px</dimen>
|
||||
<dimen name="module_ext_speed_limit_marginTop">2px</dimen>
|
||||
<dimen name="module_ext_speed_limit_marginRight">60px</dimen>
|
||||
<dimen name="module_ext_speed_limit_value_textSize">60px</dimen>
|
||||
<dimen name="module_ext_speed_limit_unit_textSize">28px</dimen>
|
||||
|
||||
<dimen name="module_ext_navi_panel_marginLeft">32px</dimen>
|
||||
<dimen name="module_ext_navi_panel_marginTop">2px</dimen>
|
||||
|
||||
<dimen name="module_ext_operation_panel_width">140px</dimen>
|
||||
<dimen name="module_ext_operation_panel_marginRight">32px</dimen>
|
||||
<dimen name="module_ext_operation_panel_marginBottom">60px</dimen>
|
||||
<dimen name="module_ext_operation_panel_vr_height">92px</dimen>
|
||||
<dimen name="module_ext_operation_panel_vr_textSize">24px</dimen>
|
||||
<dimen name="module_ext_operation_panel_divider_width">48px</dimen>
|
||||
<dimen name="module_ext_operation_panel_divider_height">2px</dimen>
|
||||
<dimen name="module_ext_operation_panel_move2_height">140px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_width">140px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_height">120px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_marginBottom">20px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_textSize">30px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_goneMarginBottom">32px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_goneMarginRight">32px</dimen>
|
||||
|
||||
<dimen name="module_ext_navi_exit_width">120px</dimen>
|
||||
<dimen name="module_ext_navi_exit_height">120px</dimen>
|
||||
<dimen name="module_ext_navi_exit_marginLeft">32px</dimen>
|
||||
<dimen name="module_ext_navi_exit_marginBottom">60px</dimen>
|
||||
<dimen name="module_ext_button_container_marginLeft">32px</dimen>
|
||||
<dimen name="module_ext_button_container_marginBottom">60px</dimen>
|
||||
<dimen name="module_ext_navi_exit_textSize">32px</dimen>
|
||||
<dimen name="v2x_cancel_help_text_size">30px</dimen>
|
||||
<dimen name="module_entrance_id_button_marginTop">20px</dimen>
|
||||
|
||||
<dimen name="module_ext_voice_textSize">32px</dimen>
|
||||
<dimen name="module_ext_time_textSize">48px</dimen>
|
||||
<dimen name="module_ext_date_marginRight">80px</dimen>
|
||||
<dimen name="module_ext_date_textSize">28px</dimen>
|
||||
<dimen name="module_ext_weather_marginRight">26px</dimen>
|
||||
<dimen name="module_ext_weather_icon_width">44px</dimen>
|
||||
<dimen name="module_ext_weather_icon_height">44px</dimen>
|
||||
<dimen name="module_ext_weather_temp_marginRight">18px</dimen>
|
||||
<dimen name="module_ext_weather_temp_textSize">34px</dimen>
|
||||
<dimen name="module_ext_weather_temp_desc_marginRight">26px</dimen>
|
||||
<dimen name="module_ext_weather_temp_desc_textSize">28px</dimen>
|
||||
<dimen name="module_ext_msg_marginRight">30px</dimen>
|
||||
<dimen name="module_ext_msg_counter_width">30px</dimen>
|
||||
<dimen name="module_ext_msg_counter_height">30px</dimen>
|
||||
<dimen name="module_ext_msg_counter_textSize">20px</dimen>
|
||||
|
||||
<dimen name="module_ext_user_img_width">103px</dimen>
|
||||
<dimen name="module_ext_user_img_height">103px</dimen>
|
||||
|
||||
|
||||
<dimen name="module_ext_voice_msg_padding_top">17px</dimen>
|
||||
<dimen name="module_ext_voice_msg_padding_bottom">17px</dimen>
|
||||
<dimen name="module_ext_voice_msg_padding_left">36px</dimen>
|
||||
<dimen name="module_ext_voice_msg_padding_right">36px</dimen>
|
||||
<dimen name="module_ext_voice_msg_icon_margin_left">-2px</dimen>
|
||||
<dimen name="module_ext_navi_extra_info_margin_right">95px</dimen>
|
||||
|
||||
<dimen name="module_ext_weather_bkg_corner">30px</dimen>
|
||||
<dimen name="module_ext_weather_container_paddingLeft">40px</dimen>
|
||||
<dimen name="module_ext_weather_container_paddingRight">40px</dimen>
|
||||
<dimen name="module_ext_msg_dot_marginLeft">15px</dimen>
|
||||
<dimen name="module_ext_msg_dot_marginRight">15px</dimen>
|
||||
<dimen name="module_ext_navi_next_info_road_marginTop">5px</dimen>
|
||||
<dimen name="module_ext_remaining_info_marginRight">50px</dimen>
|
||||
<dimen name="module_ext_remaining_distance_textSize">56px</dimen>
|
||||
<dimen name="module_ext_remaining_distance_unit_textSize">30px</dimen>
|
||||
<dimen name="module_ext_remaining_time_textSize">56px</dimen>
|
||||
<dimen name="module_ext_remaining_time_unit_textSize">30px</dimen>
|
||||
<dimen name="module_ext_arrive_time_textSize">56px</dimen>
|
||||
<dimen name="module_ext_arrive_time_unit_textSize">30px</dimen>
|
||||
<dimen name="module_map_navi_next_info_road_turn_marginLeft">15px</dimen>
|
||||
<dimen name="module_map_navi_next_info_road_turn_marginRight">15px</dimen>
|
||||
|
||||
<!-- 导航查看全程显示范围-->
|
||||
<dimen name="module_map_display_overview_left_margin">1000px</dimen>
|
||||
<dimen name="module_map_display_overview_top_margin">390px</dimen>
|
||||
<dimen name="module_map_display_overview_bottom_margin">200px</dimen>
|
||||
<dimen name="module_map_display_overview_right_margin">200px</dimen>
|
||||
<dimen name="module_ext_north_goneMarginTop">240px</dimen>
|
||||
<dimen name="module_ext_common_corner">30px</dimen>
|
||||
<dimen name="module_ext_button_width">120px</dimen>
|
||||
<dimen name="module_ext_button_height">120px</dimen>
|
||||
<dimen name="module_ext_camera_button_marginTop">10px</dimen>
|
||||
<dimen name="module_ext_display_overview_textSize">22px</dimen>
|
||||
<dimen name="module_ext_display_overview_textSize_large">28px</dimen>
|
||||
<dimen name="module_ext_north_textSize">28px</dimen>
|
||||
<dimen name="module_ext_navi_info_panel_next_info_distance_next_step_textSize">30px</dimen>
|
||||
<dimen name="module_entrance_id_uploading_width">90px</dimen>
|
||||
<dimen name="module_entrance_id_uploading_height">90px</dimen>
|
||||
<dimen name="module_map_id_navi_next_info_distance_marginTop">6dp</dimen>
|
||||
<dimen name="module_map_id_navi_next_info_road_marginBottom">15px</dimen>
|
||||
<dimen name="module_map_id_navi_next_info_road_marginBottom_small">4px</dimen>
|
||||
<dimen name="module_map_id_navi_next_info_distance_marginStart">10px</dimen>
|
||||
<dimen name="module_ext_display_overview_icon_marginTop">20px</dimen>
|
||||
|
||||
<dimen name="module_ext_top_over_navi_height">40px</dimen>
|
||||
<dimen name="module_ext_msg_counter_margin">45px</dimen>
|
||||
<dimen name="module_ext_user_avator_size">100px</dimen>
|
||||
<dimen name="module_ext_user_avator_board_size">134px</dimen>
|
||||
<dimen name="module_ext_layout_padding">30px</dimen>
|
||||
<dimen name="module_ext_layout_paddingRight">20px</dimen>
|
||||
<dimen name="module_ext_layout_paddingBottom">20px</dimen>
|
||||
<dimen name="module_ext_destination_online_car_drawablePadding">8px</dimen>
|
||||
<dimen name="module_ext_destination_online_car_paddingLeft">21px</dimen>
|
||||
<dimen name="module_ext_destination_online_car_paddingRight">31px</dimen>
|
||||
<dimen name="module_ext_top_view_max_width">1920px</dimen>
|
||||
|
||||
<dimen name="module_ext_navi_width">-1</dimen>
|
||||
<dimen name="module_ext_bottom_btn_margin_bottom">0px</dimen>
|
||||
|
||||
<dimen name="module_event_live_error_text_size">36px</dimen>
|
||||
<dimen name="module_video_window_height_content">393px</dimen>
|
||||
<dimen name="module_video_window_width_content">700px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="NaviViewStyle">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_ext_top_view_width_in_vr_mode">1100px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="NaviViewStyle">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<declare-styleable name="VerticalTrafficLightView" >
|
||||
<attr name="iconRes" format="enum">
|
||||
<enum name="turnAround" value="0" />
|
||||
<enum name="turnLeft" value="1" />
|
||||
<enum name="straight" value="2" />
|
||||
<enum name="turnRight" value="3" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_ext_weather_bkg_color">#BF30334C</color>
|
||||
<color name="module_ext_weather_text_color">#fff</color>
|
||||
<color name="module_ext_vr_mode_left_notice_content_text_color">#f1f1f1</color>
|
||||
|
||||
<color name="module_ext_vr_mode_left_traffic_light_green">#7DE261</color>
|
||||
<color name="module_ext_vr_mode_left_traffic_light_red">#FF2B2B</color>
|
||||
<color name="module_ext_vr_mode_left_traffic_light_yellow">#E3BC59</color>
|
||||
<color name="module_ext_vr_mode_left_traffic_light_white">#FFF</color>
|
||||
<color name="module_live_video_progress_bar_loading_color">#256BFF</color>
|
||||
<color name="v2x_FFF_333">#FFFFFF</color>
|
||||
|
||||
<color name="arc_speeding">#DB3137</color>
|
||||
<color name="arc_speed">#3E77F6</color>
|
||||
<color name="module_switch_map_bg">#323C6F</color>
|
||||
</resources>
|
||||
@@ -1,217 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- module_ext_layout_entrance.xml-->
|
||||
<dimen name="module_ext_search_height">58px</dimen>
|
||||
<dimen name="module_ext_search_marginLeft">18px</dimen>
|
||||
<dimen name="module_ext_search_marginTop">1px</dimen>
|
||||
<dimen name="module_ext_search_drawablePadding">11.2px</dimen>
|
||||
<dimen name="module_ext_search_paddingLeft">10.8px</dimen>
|
||||
<dimen name="module_ext_search_paddingRight">17px</dimen>
|
||||
<dimen name="module_ext_search_textSize">20px</dimen>
|
||||
|
||||
<dimen name="module_ext_common_address_height">58px</dimen>
|
||||
<dimen name="module_ext_common_address_marginLeft">19px</dimen>
|
||||
<dimen name="module_ext_common_address_marginTop">1px</dimen>
|
||||
<dimen name="module_ext_common_address_home_width">64.2px</dimen>
|
||||
<dimen name="module_ext_common_address_home_height">58px</dimen>
|
||||
<dimen name="module_ext_common_address_divider_width">1px</dimen>
|
||||
<dimen name="module_ext_common_address_divider_height">33.4px</dimen>
|
||||
<dimen name="module_ext_common_address_company_width">64.2px</dimen>
|
||||
<dimen name="module_ext_common_address_company_height">58px</dimen>
|
||||
|
||||
|
||||
<dimen name="module_ext_speed_limit_width">96px</dimen>
|
||||
<dimen name="module_ext_speed_limit_height">96px</dimen>
|
||||
<dimen name="module_ext_speed_limit_marginTop">1px</dimen>
|
||||
<dimen name="module_ext_speed_limit_marginRight">32px</dimen>
|
||||
<dimen name="module_ext_speed_limit_value_textSize">32px</dimen>
|
||||
<dimen name="module_ext_speed_limit_unit_textSize">15px</dimen>
|
||||
|
||||
<dimen name="module_ext_navi_panel_marginLeft">20px</dimen>
|
||||
<dimen name="module_ext_navi_panel_marginTop">1px</dimen>
|
||||
|
||||
<dimen name="module_ext_operation_panel_width">82px</dimen>
|
||||
<dimen name="module_ext_operation_panel_marginRight">20px</dimen>
|
||||
<dimen name="module_ext_operation_panel_marginBottom">34.5px</dimen>
|
||||
<dimen name="module_ext_operation_panel_vr_height">58px</dimen>
|
||||
<dimen name="module_ext_operation_panel_vr_textSize">17px</dimen>
|
||||
<dimen name="module_ext_operation_panel_divider_width">31.4px</dimen>
|
||||
<dimen name="module_ext_operation_panel_divider_height">1.2px</dimen>
|
||||
<dimen name="module_ext_operation_panel_move2_height">82px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_width">66px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_height">66px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_no_map_width">120px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_no_map_height">120px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_marginBottom">8px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_textSize">16px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_goneMarginBottom">34.5px</dimen>
|
||||
<dimen name="module_ext_operation_panel_share_goneMarginRight">20px</dimen>
|
||||
|
||||
|
||||
<dimen name="module_ext_navi_exit_width">66px</dimen>
|
||||
<dimen name="module_ext_navi_exit_height">66px</dimen>
|
||||
<dimen name="module_ext_navi_exit_marginLeft">20px</dimen>
|
||||
<dimen name="module_ext_navi_exit_marginBottom">32px</dimen>
|
||||
<dimen name="module_ext_button_container_marginLeft">20px</dimen>
|
||||
<dimen name="module_ext_button_container_marginBottom">30px</dimen>
|
||||
<dimen name="module_ext_navi_exit_textSize">16px</dimen>
|
||||
<dimen name="v2x_cancel_help_text_size">14px</dimen>
|
||||
<dimen name="module_entrance_id_button_marginTop">8px</dimen>
|
||||
|
||||
<dimen name="module_ext_notice_margin_start">0px</dimen>
|
||||
|
||||
<dimen name="module_ext_voice_textSize">22px</dimen>
|
||||
<dimen name="module_ext_time_textSize">28px</dimen>
|
||||
<dimen name="module_ext_date_marginRight">22px</dimen>
|
||||
<dimen name="module_ext_date_textSize">22px</dimen>
|
||||
<dimen name="module_ext_weather_marginRight">16px</dimen>
|
||||
<dimen name="module_ext_weather_icon_width">24px</dimen>
|
||||
<dimen name="module_ext_weather_icon_height">24px</dimen>
|
||||
<dimen name="module_ext_weather_temp_marginRight">18px</dimen>
|
||||
<dimen name="module_ext_weather_temp_textSize">18.48px</dimen>
|
||||
<dimen name="module_ext_weather_space_between_icon_and_tem">5px</dimen>
|
||||
<dimen name="module_ext_weather_temp_desc_marginRight">16px</dimen>
|
||||
<dimen name="module_ext_weather_temp_desc_textSize">22px</dimen>
|
||||
<dimen name="module_ext_msg_marginRight">16px</dimen>
|
||||
<dimen name="module_ext_msg_counter_width">15px</dimen>
|
||||
<dimen name="module_ext_msg_counter_height">15px</dimen>
|
||||
<dimen name="module_ext_msg_counter_textSize">11.73px</dimen>
|
||||
|
||||
<dimen name="module_ext_user_img_width">56px</dimen>
|
||||
<dimen name="module_ext_user_img_height">56px</dimen>
|
||||
|
||||
<dimen name="module_ext_top_view_width">1058px</dimen>
|
||||
<dimen name="module_ext_top_view_width_in_vr_mode">822px</dimen>
|
||||
|
||||
<dimen name="module_ext_voice_msg_padding_top">9px</dimen>
|
||||
<dimen name="module_ext_voice_msg_padding_bottom">9px</dimen>
|
||||
<dimen name="module_ext_voice_msg_padding_left">18px</dimen>
|
||||
<dimen name="module_ext_voice_msg_padding_right">18px</dimen>
|
||||
<dimen name="module_ext_voice_msg_icon_margin_left">-1</dimen>
|
||||
|
||||
<dimen name="module_ext_weather_bkg_corner">30px</dimen>
|
||||
<dimen name="module_ext_weather_container_paddingLeft">23px</dimen>
|
||||
<dimen name="module_ext_weather_container_paddingRight">23px</dimen>
|
||||
<dimen name="module_ext_msg_dot_marginLeft">15px</dimen>
|
||||
<dimen name="module_ext_msg_dot_marginRight">15px</dimen>
|
||||
<dimen name="module_ext_navi_next_info_road_marginTop">5px</dimen>
|
||||
<dimen name="module_ext_remaining_distance_textSize">20px</dimen>
|
||||
<dimen name="module_ext_remaining_distance_unit_textSize">14px</dimen>
|
||||
<dimen name="module_ext_remaining_time_textSize">20px</dimen>
|
||||
<dimen name="module_ext_remaining_time_unit_textSize">14px</dimen>
|
||||
<dimen name="module_ext_arrive_time_textSize">20px</dimen>
|
||||
<dimen name="module_ext_arrive_time_unit_textSize">14px</dimen>
|
||||
<dimen name="module_ext_remaining_info_marginRight">34px</dimen>
|
||||
<dimen name="module_map_navi_next_info_road_turn_marginLeft">8px</dimen>
|
||||
<dimen name="module_map_navi_next_info_road_turn_marginRight">8px</dimen>
|
||||
|
||||
<!-- 导航查看全程显示范围-->
|
||||
<dimen name="module_map_display_overview_left_margin">550px</dimen>
|
||||
<dimen name="module_map_display_overview_top_margin">208px</dimen>
|
||||
<dimen name="module_map_display_overview_bottom_margin">100px</dimen>
|
||||
<dimen name="module_map_display_overview_right_margin">100px</dimen>
|
||||
<dimen name="module_ext_common_corner">16px</dimen>
|
||||
<dimen name="module_ext_north_goneMarginTop">142px</dimen>
|
||||
<dimen name="module_ext_button_width">66px</dimen>
|
||||
<dimen name="module_ext_button_height">66px</dimen>
|
||||
<dimen name="module_ext_button_height_small">44px</dimen>
|
||||
<dimen name="module_ext_camera_button_marginTop">10px</dimen>
|
||||
<dimen name="module_ext_display_overview_textSize">12px</dimen>
|
||||
<dimen name="module_ext_display_overview_textSize_large">14px</dimen>
|
||||
<dimen name="module_ext_north_textSize">14px</dimen>
|
||||
<dimen name="module_ext_navi_info_panel_next_info_distance_next_step_textSize">18px</dimen>
|
||||
<dimen name="module_entrance_id_uploading_width">58px</dimen>
|
||||
<dimen name="module_entrance_id_uploading_height">58px</dimen>
|
||||
<dimen name="module_map_id_navi_next_info_distance_marginTop">3dp</dimen>
|
||||
<dimen name="module_map_id_navi_next_info_road_marginBottom">10px</dimen>
|
||||
<dimen name="module_map_id_navi_next_info_road_marginBottom_small">6px</dimen>
|
||||
<dimen name="module_map_id_navi_next_info_distance_marginStart">6px</dimen>
|
||||
<dimen name="module_ext_display_overview_icon_marginTop">10px</dimen>
|
||||
|
||||
<dimen name="module_ext_top_over_navi_height">19px</dimen>
|
||||
<dimen name="module_ext_weather_margin_start">0px</dimen>
|
||||
<dimen name="module_ext_msg_counter_margin">26px</dimen>
|
||||
<dimen name="module_ext_user_avator_size">56px</dimen>
|
||||
<dimen name="module_ext_user_avator_board_size">80px</dimen>
|
||||
<dimen name="module_ext_layout_padding">10px</dimen>
|
||||
<dimen name="module_ext_layout_paddingRight">2px</dimen>
|
||||
<dimen name="module_ext_layout_paddingBottom">2px</dimen>
|
||||
<dimen name="module_ext_destination_online_car_drawablePadding">4px</dimen>
|
||||
<dimen name="module_ext_destination_online_car_paddingLeft">14px</dimen>
|
||||
<dimen name="module_ext_destination_online_car_paddingRight">14px</dimen>
|
||||
|
||||
<dimen name="module_common_shadow_width_pos">8px</dimen>
|
||||
|
||||
<dimen name="module_ext_seek_help_notice_icon_width">25px</dimen>
|
||||
<dimen name="module_ext_seek_help_notice_bg_width">25px</dimen>
|
||||
<dimen name="module_ext_seek_help_notice_bg_corner">16px</dimen>
|
||||
<dimen name="module_ext_seek_help_notice_bg_height">56px</dimen>
|
||||
<dimen name="module_ext_seek_help_notice_text_size">18px</dimen>
|
||||
<dimen name="module_ext_seek_help_notice_text_margin_start">10px</dimen>
|
||||
<dimen name="module_ext_seek_help_notice_number_text_size">22px</dimen>
|
||||
<dimen name="module_ext_seek_help_notice_bg_margin_top">16px</dimen>
|
||||
|
||||
|
||||
<dimen name="module_ext_navi_small_corner">11px</dimen>
|
||||
<dimen name="module_ext_navi_small_margin_bottom">11px</dimen>
|
||||
<dimen name="module_ext_navi_small_margin_right">10px</dimen>
|
||||
|
||||
<dimen name="module_ext_navi_width">-1</dimen>
|
||||
<dimen name="module_ext_bottom_btn_margin_bottom">0px</dimen>
|
||||
<dimen name="module_common_btn_bottom">0px</dimen>
|
||||
<dimen name="module_entrance_id_button_marginLeft">0px</dimen>
|
||||
|
||||
<dimen name="module_ext_enter_vr_mode_text_size">44px</dimen>
|
||||
<dimen name="module_ext_exit_vr_mode_text_size">30px</dimen>
|
||||
<dimen name="module_ext_exit_vr_mode_width">120px</dimen>
|
||||
<dimen name="module_ext_enter_vr_mode_margin_bottom">170px</dimen>
|
||||
|
||||
<dimen name="module_ext_vr_mode_left_notice_width">460px</dimen>
|
||||
<dimen name="module_ext_vr_mode_left_notice_icon_width">120px</dimen>
|
||||
<dimen name="module_ext_vr_mode_left_notice_height">120px</dimen>
|
||||
|
||||
<dimen name="module_ext_vr_mode_left_notice_content_text_size">40px</dimen>
|
||||
<dimen name="module_ext_vr_mode_left_notice_content_padding_top">32px</dimen>
|
||||
<dimen name="module_ext_vr_mode_left_notice_content_padding_left">40px</dimen>
|
||||
<dimen name="module_ext_vr_mode_left_feature_margin_left">50px</dimen>
|
||||
|
||||
<dimen name="module_ext_vr_mode_traffic_light_text_size">32px</dimen>
|
||||
<dimen name="module_ext_vr_mode_self_speed_margin_end">15px</dimen>
|
||||
<dimen name="module_ext_vr_mode_self_speed_margin_start">30px</dimen>
|
||||
<dimen name="module_ext_vr_mode_self_speed_gonemargin_start">689px</dimen>
|
||||
<dimen name="module_ext_vr_mode_self_speed_margin_bottom">86px</dimen>
|
||||
|
||||
<!-- 仅在vr模式下有此内容,仅增加了xhdpi对应的大小 -->
|
||||
<dimen name="module_ext_navi_in_vr_width">530px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_height">380px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_margin_start">40px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_margin_top">28px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_navi_icon_size">100px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_next_info_txt_size">60px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_next_info_unit_size">48px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_next_info_road_txt_size">26px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_bg_width">458px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_bg_height">298px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_bg_height">140px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_bg_margin_bottom">60px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_text_size">100px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_unit_size">30px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_unit_margin_start">15px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_margin_start">70px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_margin_top">22px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_size">78px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_margin_end">66px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_nav_common_margin_top">23px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_margin_top">30px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_margin_start">20px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_text_size">40px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_bg_corner">20px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_light_margin_top">17px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_light_left_time_txt_size">36px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_light_left_time_margin_top">60px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_light_left_time_unit_size">21px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_light_no_time_margin_top">11px</dimen>
|
||||
<dimen name="module_video_window_width_content">400px</dimen>
|
||||
<dimen name="module_video_window_height_content">300px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<item name="module_ext_enter_check" type="id" />
|
||||
</resources>
|
||||
@@ -1,54 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name">mogo-module-extensions</string>
|
||||
<string name="module_ext_str_voice_msg">你好,蘑菇2.0开启智慧互联新世界</string>
|
||||
<string name="module_ext_str_date_format">%1$d月%2$d日 %3$s</string>
|
||||
<string name="module_ext_str_time_format">%1$d:%2$s</string>
|
||||
<string name="module_ext_str_weather_temp_format">%s° </string>
|
||||
<string-array name="module_ext_str_arr_week">
|
||||
<item>周日</item>
|
||||
<item>周一</item>
|
||||
<item>周二</item>
|
||||
<item>周三</item>
|
||||
<item>周四</item>
|
||||
<item>周五</item>
|
||||
<item>周六</item>
|
||||
</string-array>
|
||||
<string name="module_ext_str_dots">···</string>
|
||||
|
||||
<string name="module_map_str_search_hint">搜索目的地</string>
|
||||
<string name="module_map_str_upload_road_condition">分享</string>
|
||||
<string name="module_ext_str_exit_navi">退出\n导航</string>
|
||||
<string name="module_ext_str_continue_navi">继续\n导航</string>
|
||||
<string name="module_ext_str_exit_path">退出全览</string>
|
||||
<string name="mode_car_up">车头</string>
|
||||
<string name="mode_north_up">正北</string>
|
||||
<string name="module_ext_destination_online_car_text">目的地车友</string>
|
||||
|
||||
<string-array name="module_ext_str_arr_ai_tips">
|
||||
<item>你好小智,播放音乐</item>
|
||||
<item>你好小智,播放赵磊的歌</item>
|
||||
<item>你好小智,我想听成都</item>
|
||||
<item>你好小智,打开导航</item>
|
||||
<item>你好小智,我要回家</item>
|
||||
<item>你好小智,我要去加油站</item>
|
||||
<item>你好小智,导航去西单商场</item>
|
||||
<item>你好小智,打开行车记录仪</item>
|
||||
<item>你好小智,打开收音机</item>
|
||||
<item>你好小智,调频到97.4</item>
|
||||
<item>你好小智,今天天气怎么样</item>
|
||||
<item>你好小智,打开车聊聊</item>
|
||||
<item>你好小智,我想聊天</item>
|
||||
<item>你好小智,中关村堵不堵</item>
|
||||
<item>你好小智,前方路况怎么样</item>
|
||||
<item>你好小智,上报路况</item>
|
||||
<item>你好小智,分享这首歌</item>
|
||||
<item>你好小智,打开辅助驾驶</item>
|
||||
<item>你好小智,查询附近的人</item>
|
||||
<item>你好小智,音量开到百分之三十</item>
|
||||
<item>你好小智,打开全部应用</item>
|
||||
<item>你好小智,返回桌面</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="NaviViewStyle">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
|
||||
<declare-styleable name="RoundLayout">
|
||||
<attr name="roundLayoutRadius" format="dimension" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -265,7 +265,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
}
|
||||
|
||||
protected void loadContainerModules() {
|
||||
MogoModulesManager.getInstance().loadEntrancesModule(R.id.module_main_id_entrance_fragment_container);
|
||||
//MogoModulesManager.getInstance().loadEventPanelModule(R.id.module_main_id_event_panel_fragment_container);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,14 +23,6 @@ public interface MogoModulesHandler {
|
||||
*/
|
||||
void loadFunctionModulesServer();
|
||||
|
||||
|
||||
/**
|
||||
* 加载快捷操作
|
||||
*
|
||||
* @param containerId
|
||||
*/
|
||||
void loadEntrancesModule(int containerId);
|
||||
|
||||
/**
|
||||
* 加载基本服务模块,需要不启动页面就能运行
|
||||
* <p>
|
||||
|
||||
@@ -128,15 +128,6 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void loadEntrancesModule( int containerId ) {
|
||||
IMogoModuleProvider provider = ( IMogoModuleProvider ) ARouter.getInstance()
|
||||
.build( MogoModulePaths.PATH_ENTRANCE )
|
||||
.navigation( getContext() );
|
||||
addFragment( provider, containerId );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadBaseModule() {
|
||||
List< MogoModule > baseModules = MogoModulePaths.getBaseModules();
|
||||
|
||||
Reference in New Issue
Block a user