Merge branch 'dev' into demo/shunyi_v2v_merge
This commit is contained in:
@@ -110,6 +110,20 @@ android {
|
||||
// 是否使用高德sdk自定义导航
|
||||
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
|
||||
}
|
||||
// f系列-分体机
|
||||
f80x {
|
||||
applicationId rootProject.ext.android.fLauncherApplicationId
|
||||
dimension "product"
|
||||
// 使用思必驰语音
|
||||
buildConfigField 'int', 'AIType', '2'
|
||||
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
|
||||
// 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
|
||||
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue]
|
||||
// 是否使用高德sdk自定义导航
|
||||
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
|
||||
}
|
||||
// e系列,采用Launcher方案
|
||||
e8xx {
|
||||
applicationId rootProject.ext.android.launcherApplicationId
|
||||
@@ -180,6 +194,20 @@ android {
|
||||
// 是否使用高德sdk自定义导航
|
||||
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
|
||||
}
|
||||
// d系列 2 + 32
|
||||
d80x {
|
||||
applicationId rootProject.ext.android.independentApplicationId
|
||||
dimension "product"
|
||||
// 使用同行者语音
|
||||
buildConfigField 'int', 'AIType', '1'
|
||||
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
|
||||
// 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0
|
||||
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
|
||||
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'false'
|
||||
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.commonIndependentAmapApiValue]
|
||||
// 是否使用高德sdk自定义导航
|
||||
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
|
||||
}
|
||||
// d系列 1+16 版本
|
||||
d82x {
|
||||
applicationId rootProject.ext.android.independentApplicationId
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
afterEvaluate {
|
||||
|
||||
def independent = ["em3", "em1", "d8xx", "d82x", "bydauto"]
|
||||
def launcher = ["f8xx", "em4"]
|
||||
def independent = ["em3", "em1", "d80x", "d82x", "bydauto"]
|
||||
def launcher = ["f80x", "em4"]
|
||||
|
||||
it.getTasks().iterator().forEachRemaining {
|
||||
def task = it
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
android:label="@string/app_shell_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
android:resizeableActivity="false"
|
||||
tools:replace="android:label">
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
@@ -28,6 +29,8 @@
|
||||
|
||||
<activity
|
||||
android:name="com.zhidao.boot.persistent.lib.PersistentAliveActivity"
|
||||
android:screenOrientation="landscape"
|
||||
android:resizeableActivity="false"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
||||
</application>
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addBaseModule( new MogoModule( ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY ) );
|
||||
MogoModulePaths.addBaseModule( new MogoModule( V2XConst.PATH_V2X_UI, V2XConst.MODULE_NAME ) );
|
||||
MogoModulePaths.addBaseModule(new MogoModule( MogoServicePaths.PATH_STRATEGY_SHARE,"StrategyShare"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_MOGO_MONITOR, "MogoMonitor"));
|
||||
MogoModulePaths.addModule( new MogoModule( V2XConst.PATH_EVENT_PANEL, V2XConst.MODULE_NAME_EVENT_PANEL ) );
|
||||
MogoModulePaths.addModule( new MogoModule( PushUIConstants.PATH, PushUIConstants.NAME ) );
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ apply from: "config.gradle"
|
||||
apply from: "javadoc.gradle"
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.61'
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://maven.aliyun.com/nexus/content/groups/public/'
|
||||
@@ -19,7 +18,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71'
|
||||
classpath "com.alibaba:arouter-register:1.0.2"
|
||||
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
ext {
|
||||
time = ""
|
||||
|
||||
kotlin_version = "1.3.71"
|
||||
android = [
|
||||
// applicationId : "com.mogo.launcher",
|
||||
// zhidadoApplicationId: "com.zhidao.launcher",
|
||||
@@ -20,8 +20,8 @@ ext {
|
||||
|
||||
dependencies = [
|
||||
// androidx
|
||||
androidxappcompat : "androidx.appcompat:appcompat:1.0.2",
|
||||
androidxccorektx : "androidx.core:core-ktx:1.2.0",
|
||||
androidxappcompat : "androidx.appcompat:appcompat:1.1.0",
|
||||
androidxccorektx : "androidx.core:core-ktx:1.3.0",
|
||||
androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:1.1.3",
|
||||
boostmultidex : "com.bytedance.boost_multidex:boost_multidex:1.0.1",
|
||||
androidxviewpager2 : "androidx.viewpager2:viewpager2:1.0.0",
|
||||
@@ -141,7 +141,7 @@ ext {
|
||||
accountsdk : "com.zhidao.accountservice:account-sdk:1.0.11",
|
||||
// crash
|
||||
crashSdk : "com.zhidaoauto.crash.log:library:1.0.5",
|
||||
kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7",
|
||||
kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}",
|
||||
|
||||
//探路
|
||||
videoarmv7 : "com.shuyu:gsyVideoPlayer-armv7a:7.1.2",
|
||||
@@ -196,6 +196,8 @@ ext {
|
||||
androidxroomktx : "androidx.room:room-ktx:2.2.3",
|
||||
|
||||
//
|
||||
mogomodulewidgets : "com.mogo.module:module-widgets:${MOGO_MODULE_WIDGETS_VERSION}",
|
||||
mogomodulewidgets : "com.mogo.module:module-widgets:${MOGO_MODULE_WIDGETS_VERSION}",
|
||||
|
||||
kotlingradleplugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
|
||||
]
|
||||
}
|
||||
@@ -39,13 +39,10 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.core:core-ktx:1.3.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation 'com.zhidaoauto.common:service:1.0.4.10'
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.aiassist
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
|
||||
implementation 'com.zhidaoauto.controller:api:1.0.8'
|
||||
@@ -53,6 +50,7 @@ dependencies {
|
||||
implementation 'com.zhidao.video:video-processor:1.0.2.1'
|
||||
implementation 'com.foundation.utils:common-utils:1.0.7'
|
||||
|
||||
implementation rootProject.ext.dependencies.eventbus
|
||||
compileOnly rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.eventbus
|
||||
implementation rootProject.ext.dependencies.coroutinescore
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:enabled="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:resizeableActivity="true"
|
||||
android:resizeableActivity="false"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:stateNotNeeded="true"
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
package com.zhidao.mogo.module.main.independent;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.map.CustomNaviInterrupter;
|
||||
import com.mogo.module.main.MainActivity;
|
||||
import com.mogo.utils.TipToast;
|
||||
|
||||
/**
|
||||
* 针对独立应用形式,做单独定制
|
||||
@@ -47,8 +49,19 @@ public class MainIndependentActivity extends MainActivity {
|
||||
if ( mCoverUpLayout.getVisibility() != View.VISIBLE ) {
|
||||
mServiceApis.getAdasControllerApi().setUseAlgorithm( true );
|
||||
}
|
||||
if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
|
||||
fixInMultiWindowMode();
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi( Build.VERSION_CODES.N )
|
||||
private void fixInMultiWindowMode(){
|
||||
if ( isInMultiWindowMode() ) {
|
||||
TipToast.shortTip( R.string.module_main_un_support_multi_window_mode );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="module_main_un_support_multi_window_mode">应用不支持分屏</string>
|
||||
</resources>
|
||||
@@ -8,7 +8,7 @@
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:enabled="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:resizeableActivity="true"
|
||||
android:resizeableActivity="false"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:stateNotNeeded="true"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
android:name=".AppsListActivity"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:launchMode="singleTask"
|
||||
android:resizeableActivity="true"
|
||||
android:resizeableActivity="false"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:stateNotNeeded="true"
|
||||
|
||||
@@ -175,9 +175,9 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
} );
|
||||
|
||||
// 初始化MonitorModule
|
||||
IMogoMonitorProvider monitorProvider = (IMogoMonitorProvider) ARouter.getInstance().build(MogoServicePaths.PATH_MOGO_MONITOR).navigation(this);
|
||||
monitorProvider.resetActivityContext(this);
|
||||
|
||||
// IMogoMonitorProvider monitorProvider = (IMogoMonitorProvider) ARouter.getInstance().build(MogoServicePaths.PATH_MOGO_MONITOR).navigation(this);
|
||||
// monitorProvider.resetActivityContext(this);
|
||||
mServiceApis.getMogoMonitorApi().resetActivityContext(this);
|
||||
}
|
||||
|
||||
private void startBaseService() {
|
||||
|
||||
@@ -48,9 +48,11 @@ public class MogoMonitorProvider implements IMogoMonitorProvider,
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
this.context = context;
|
||||
IMogoServiceApis apis =
|
||||
(IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context);
|
||||
apis.getSocketManagerApi(context).registerOnMessageListener(MogoMonitorConst.LOG_PUSH_TYPE, this);
|
||||
startRemoteCtrl();
|
||||
}
|
||||
|
||||
private void startRemoteCtrl(){
|
||||
@@ -68,7 +70,6 @@ public class MogoMonitorProvider implements IMogoMonitorProvider,
|
||||
this.context = context;
|
||||
logDebugDialog = new LogDebugDialog(context);
|
||||
logDebugDialog.setDialogListener(this);
|
||||
startRemoteCtrl();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -49,6 +49,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxcardview
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
@@ -66,7 +67,6 @@ dependencies {
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':modules:mogo-module-gps-simulator')
|
||||
}
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation 'com.zhidaoauto.voice.controller:api:1.0.2'
|
||||
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ class LauncherCardRefresher {
|
||||
|
||||
public static final int MSG_REFRESH = 2020;
|
||||
public static final int MSG_TTS_TIP = 2021;
|
||||
public static final long ONE_MINUTE = 60 * 1000L;
|
||||
public static final long HALF_ONE_MINUTE = 30 * 1000L;
|
||||
public static final long ONE_MINUTE = 15 * 1000L;
|
||||
public static final long ONE_DAY = 24 * 60 * ONE_MINUTE;
|
||||
|
||||
private LauncherCardRefresher( Context context ) {
|
||||
mContext = context;
|
||||
@@ -117,7 +117,7 @@ class LauncherCardRefresher {
|
||||
int counter = SharedPrefsMgr.getInstance( mContext ).getInt( KEY_LauncherCardTipCounter, 0 );
|
||||
if ( counter >= 5 ) {
|
||||
long lastTipTime = SharedPrefsMgr.getInstance( mContext ).getLong( KEY_LauncherCardTipLastTipTime, 0L );
|
||||
if ( System.currentTimeMillis() - lastTipTime < /*10 * 24 * 60 **/ ONE_MINUTE ) {
|
||||
if ( System.currentTimeMillis() - lastTipTime < 10 * ONE_DAY ) {
|
||||
stop();
|
||||
return;
|
||||
} else {
|
||||
@@ -223,14 +223,16 @@ class LauncherCardRefresher {
|
||||
if ( response.getResult().getExploreWay() == null || response.getResult().getExploreWay().isEmpty() ) {
|
||||
return false;
|
||||
}
|
||||
speakTTS( String.format( tts, response.getResult().getExploreWay().size(), mRefreshStrategy.getDesc() ) );
|
||||
notifyLauncherCard( String.format( info, response.getResult().getExploreWay().size(), mRefreshStrategy.getDesc() ) );
|
||||
int size = response.getResult().getExploreWay().size();
|
||||
speakTTS( tts = String.format( tts, size, mRefreshStrategy.getDesc() ) );
|
||||
notifyLauncherCard( String.format( info, size, mRefreshStrategy.getDesc() ), size, tts );
|
||||
} else {
|
||||
if ( response.getResult().getOnlineCar() == null || response.getResult().getOnlineCar().isEmpty() ) {
|
||||
return false;
|
||||
}
|
||||
speakTTS( String.format( tts, response.getResult().getOnlineCar().size(), mRefreshStrategy.getDesc() ) );
|
||||
notifyLauncherCard( String.format( info, response.getResult().getOnlineCar().size(), mRefreshStrategy.getDesc() ) );
|
||||
int size = response.getResult().getOnlineCar().size();
|
||||
speakTTS( tts = String.format( tts, size, mRefreshStrategy.getDesc() ) );
|
||||
notifyLauncherCard( String.format( info, size, mRefreshStrategy.getDesc() ), size , tts);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -243,13 +245,15 @@ class LauncherCardRefresher {
|
||||
AIAssist.getInstance( mContext ).speakTTSVoice( msg );
|
||||
}
|
||||
|
||||
private void notifyLauncherCard( String info ) {
|
||||
private void notifyLauncherCard( String info, int amount, String tts ) {
|
||||
Intent intent = new Intent( "com.mogo.launcher.v2x" );
|
||||
intent.putExtra( "v2x_warning_type", 20000 );
|
||||
intent.putExtra( "v2x_warining_timeout", 20 );
|
||||
intent.putExtra( "v2x_warning_tts", "" );
|
||||
intent.putExtra( "v2x_warning_type", "20000" );
|
||||
intent.putExtra( "v2x_warining_timeout", 20 * 1000 );
|
||||
intent.putExtra( "v2x_warning_tts", tts );
|
||||
intent.putExtra( "v2x_warning_eventCount", amount );
|
||||
intent.putExtra( "v2x_warning_info", info );
|
||||
mContext.sendBroadcast( intent );
|
||||
Logger.d( TAG, "发送广播到桌面卡片." );
|
||||
}
|
||||
|
||||
private void playTTS() {
|
||||
|
||||
@@ -42,13 +42,9 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
implementation 'androidx.core:core-ktx:1.3.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
@@ -42,14 +42,6 @@
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".receiver.NetWorkReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
|
||||
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
|
||||
<action android:name="android.net.wifi.STATE_CHANGE" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.mogo.module.tanlu.receiver
|
||||
|
||||
import android.Manifest
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.mogo.module.tanlu.util.NetworkUtil
|
||||
|
||||
/**
|
||||
* @description 网络改变监听
|
||||
*
|
||||
* @author lixiaopeng
|
||||
* @since 2019-10-17
|
||||
*/
|
||||
class NetWorkReceiver : BroadcastReceiver() {
|
||||
private var isConnect = true
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent?) {
|
||||
if (ContextCompat.checkSelfPermission(
|
||||
context,
|
||||
Manifest.permission.ACCESS_NETWORK_STATE
|
||||
) === PackageManager.PERMISSION_GRANTED
|
||||
) {
|
||||
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) {
|
||||
isConnect = NetworkUtil.isConnected(context)
|
||||
} else {
|
||||
isConnect = NetworkUtil.isConnectedV21(context)
|
||||
}
|
||||
}
|
||||
|
||||
// if (!isConnect) {
|
||||
// Toast.makeText(context, "网络已断开,请检查网络", Toast.LENGTH_SHORT).show()
|
||||
// //TODO
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,7 +48,6 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
if (viewType == V2XShareEventItemEnum.ITEM_TYPE_NUM_DES) {
|
||||
View v = shareLayoutInflater.inflate(R.layout.module_v2x_event_share_description, parent,
|
||||
false);
|
||||
v.getBackground().setAlpha((int) 0.7);
|
||||
shareDescriptionViewHolder holder = new shareDescriptionViewHolder(v);
|
||||
return holder;
|
||||
} else if (viewType == V2XShareEventItemEnum.ITEM_TYPE_SHARE_LIST) {
|
||||
|
||||
@@ -108,7 +108,12 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
|
||||
@Override
|
||||
public void onFail(String msg) {
|
||||
if (dataArrayList.size() > 0) {
|
||||
dataArrayList.clear();
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
loadingView.stopWithError(msg, View.VISIBLE);
|
||||
|
||||
loadingView.refresButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -200,7 +205,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
|
||||
@Override
|
||||
public void onFail(String msg) {
|
||||
loadingView.stopWithError(msg, View.INVISIBLE);
|
||||
loadingView.stopWithError("网络异常,点击刷新重试", View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -181,8 +181,8 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
String originStr = String.format(getContext().getResources().getString(R.string.v2x_surrounding_top_brief), exploreWayList.size());
|
||||
SpannableString spannableString = new SpannableString(originStr);
|
||||
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#459DFF")), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
//设置字体大小,true表示前面的字体大小20单位为dip
|
||||
spannableString.setSpan(new AbsoluteSizeSpan(38, true), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
//设置字体大小,true表示前面的字体大小 dip
|
||||
spannableString.setSpan(new AbsoluteSizeSpan(46, true), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
spannableString.setSpan(new StyleSpan(Typeface.NORMAL), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
mTotalTv.setText(spannableString);
|
||||
} else {
|
||||
|
||||
@@ -79,22 +79,20 @@ public class V2XSeekHelpDialog extends ConstraintLayout implements View.OnClickL
|
||||
void onClickRight();
|
||||
}
|
||||
|
||||
private boolean isShown;
|
||||
private WindowManagerView windowManager;
|
||||
|
||||
public void show() {
|
||||
try {
|
||||
Logger.d(TAG, "使用windowManager实现");
|
||||
if (!isShown) {
|
||||
if ( windowManager == null ) {
|
||||
windowManager = new WindowManagerView.Builder(
|
||||
V2XServiceManager.getMogoEntranceButtonController().getButton(ButtonIndex.BUTTON2).getContext()
|
||||
).contentView(this).build();
|
||||
windowManager.show();
|
||||
isShown = true;
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("确定要解除求助状态吗");
|
||||
unRegisterVoiceCmd();
|
||||
registerVoiceCmd();
|
||||
}
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("确定要解除求助状态吗");
|
||||
unRegisterVoiceCmd();
|
||||
registerVoiceCmd();
|
||||
windowManager.show();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -111,10 +109,10 @@ public class V2XSeekHelpDialog extends ConstraintLayout implements View.OnClickL
|
||||
};
|
||||
|
||||
public void dismiss() {
|
||||
if (isShown && windowManager != null) {
|
||||
if (windowManager != null) {
|
||||
windowManager.dismiss();
|
||||
isShown = false;
|
||||
}
|
||||
windowManager = null;
|
||||
}
|
||||
|
||||
//放弃求助
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:layout_marginEnd="@dimen/dp_31"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvFaultHelpEventTime"
|
||||
app:layout_constraintEnd_toEndOf="@+id/rlRoadEventList"
|
||||
app:layout_constraintStart_toStartOf="@+id/tagEventType"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tagEventType"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/tv_brief"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="top"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/white"
|
||||
@@ -48,12 +48,12 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/layout_top"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_root_margin_left"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_root_margin_left"
|
||||
android:layout_marginBottom="@dimen/module_v2x_surrounding_margin_left">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/surrounding_recycleview"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible" />
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20px"
|
||||
android:layout_marginRight="20px"
|
||||
android:layout_marginBottom="16px"
|
||||
android:layout_marginBottom="14px"
|
||||
android:background="@drawable/bg_v2x_event_description"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
@@ -7,9 +7,8 @@
|
||||
<style name="customRatingBarStyle" parent="@style/Widget.AppCompat.RatingBar">
|
||||
<item name="android:minHeight">16px</item>
|
||||
<item name="android:maxHeight">16px</item>
|
||||
<item name="android:maxWidth">19px</item>
|
||||
<item name="android:minWidth">19px</item>
|
||||
<item name="android:spacing">4px</item>
|
||||
<item name="android:maxWidth">20px</item>
|
||||
<item name="android:minWidth">20px</item>
|
||||
<item name="android:numStars">5</item>
|
||||
<item name="android:rating">1</item>
|
||||
<item name="android:stepSize">0.5</item>
|
||||
|
||||
Reference in New Issue
Block a user