Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -214,9 +214,9 @@ android {
|
||||
// 是否支持换肤
|
||||
buildConfigField 'boolean', 'IS_SKIN_SUPPORTED', 'true'
|
||||
// 是否支持查询导航目的地车友
|
||||
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'true'
|
||||
buildConfigField 'boolean', 'IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST', 'false'
|
||||
// 是否支持桌面卡片刷新
|
||||
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'true'
|
||||
buildConfigField 'boolean', 'IS_SUPPORT_LAUNCHER_CARD_REFRESH_STRATEGY', 'false'
|
||||
// 是否基于地图
|
||||
buildConfigField 'boolean', 'IS_MAP_BASED', 'false'
|
||||
}
|
||||
@@ -363,7 +363,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.moduleshare
|
||||
implementation rootProject.ext.dependencies.tanluupload
|
||||
implementation rootProject.ext.dependencies.mogomonitor
|
||||
implementation rootProject.ext.dependencies.mogomoduleback
|
||||
implementation rootProject.ext.dependencies.guideshow
|
||||
implementation rootProject.ext.dependencies.moduleextensions
|
||||
implementation rootProject.ext.dependencies.modulemap
|
||||
@@ -380,7 +379,6 @@ dependencies {
|
||||
implementation project(':modules:mogo-module-share')
|
||||
implementation project(':libraries:tanlulib')
|
||||
implementation project(':modules:mogo-module-monitor')
|
||||
implementation project(':modules:mogo-module-back')
|
||||
implementation project(':modules:mogo-module-guide')
|
||||
implementation project(':modules:mogo-module-extensions')
|
||||
implementation project(':modules:mogo-module-map')
|
||||
@@ -395,6 +393,7 @@ dependencies {
|
||||
apply from: "./functions/crashreport.gradle"
|
||||
apply from: "./functions/widgets.gradle"
|
||||
apply from: "./functions/tts.gradle"
|
||||
apply from: "./functions/backwidget.gradle"
|
||||
|
||||
// implementation group: "com.tencent.matrix", name: "matrix-android-lib", version: '0.6.6', changing: true
|
||||
// implementation group: "com.tencent.matrix", name: "matrix-android-commons", version: '0.6.6', changing: true
|
||||
|
||||
9
app/functions/backwidget.gradle
Normal file
9
app/functions/backwidget.gradle
Normal file
@@ -0,0 +1,9 @@
|
||||
// 辅助驾驶占位模块,目前部分车机不上辅助驾驶功能,使用该模块能力代替
|
||||
|
||||
project.dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
launcherImplementation rootProject.ext.dependencies.mogomoduleback
|
||||
} else {
|
||||
launcherImplementation project(':modules:mogo-module-back')
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,6 @@ import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant;
|
||||
import com.mogo.module.back.BackToLauncherConst;
|
||||
import com.mogo.module.carchatting.card.CallChatConstant;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
@@ -68,11 +67,9 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_AGREEMENT, AuthorizeConstant.PATH_AGREEMENT_MODULE_NAME ) );
|
||||
|
||||
if ( DebugConfig.isLauncher() ) {
|
||||
MogoModulePaths.addModule( new MogoModule( BackToLauncherConst.MODULE_PATH, BackToLauncherConst.MODULE_NAME ) );
|
||||
MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_BACK, MogoServicePaths.PATH_BACK ) );
|
||||
MogoModulePaths.addModule( new MogoModule( MediaConstants.TAG, MediaConstants.MODULE_TYPE ) );
|
||||
} else {
|
||||
}
|
||||
// TODO
|
||||
MogoModulePaths.addModule( new MogoModule( ServiceConst.PATH_TTS_CONFIG, ServiceConst.PATH_TTS_CONFIG ) );
|
||||
|
||||
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_WIDGETS, MogoServicePaths.PATH_WIDGETS ) );
|
||||
|
||||
@@ -30,7 +30,7 @@ dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
// 上报位置
|
||||
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.3'
|
||||
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.7'
|
||||
// 长链
|
||||
implementation 'com.zhidao.socket:built-in-socket:1.0.15'
|
||||
// passport
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="path_width">60px</dimen>
|
||||
<dimen name="module_map_amap_my_location_icon_width">44px</dimen>
|
||||
<dimen name="module_map_amap_my_location_icon_height">66px</dimen>
|
||||
<dimen name="module_map_amap_my_location_icon_width">33px</dimen>
|
||||
<dimen name="module_map_amap_my_location_icon_height">50px</dimen>
|
||||
<dimen name="module_map_amap_my_location_bg_size">146px</dimen>
|
||||
</resources>
|
||||
@@ -13,6 +13,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.module.apps.adapter.AppIndicatorAdapter;
|
||||
import com.mogo.module.apps.anim.AnimRes;
|
||||
import com.mogo.module.apps.anim.AnimWrapper;
|
||||
import com.mogo.module.apps.applaunch.AppLauncher;
|
||||
import com.mogo.module.apps.applaunch.BaseAppLauncher;
|
||||
@@ -45,7 +46,7 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
|
||||
private ImageView mAIAssist;
|
||||
private View mAIAssistContainer;
|
||||
private AnimWrapper mAnim = new AnimWrapper();
|
||||
private AnimWrapper mAnim;
|
||||
|
||||
private BaseAppLauncher mLauncher;
|
||||
|
||||
@@ -71,7 +72,13 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
|
||||
mAIAssistContainer = findViewById( R.id.module_apps_id_ai_assist_container );
|
||||
mAIAssist = findViewById( R.id.module_apps_id_ai_assist );
|
||||
mAnim.initAnim( mAIAssist );
|
||||
|
||||
mAnim = new AnimWrapper( mAIAssist );
|
||||
boolean naviStatus = AppServiceHandler.getApis().getMapServiceApi().getNavi( getContext() ).isNaviing();
|
||||
if ( naviStatus ) {
|
||||
setCurrentXiaoZhiEmoji( AnimRes.EmojiType.Navigation );
|
||||
}
|
||||
|
||||
mAIAssist.setOnClickListener( new OnAiAssistClickListener() );
|
||||
mAIAssistContainer.setOnClickListener( view -> {
|
||||
mAIAssist.performClick();
|
||||
@@ -100,6 +107,16 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
mAppIndicatorAdapter.setDatas( NavigatorApps.getApps() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentXiaoZhiEmoji( AnimRes.EmojiType type ) {
|
||||
boolean started = mAnim.isStarted();
|
||||
mAnim.stop();
|
||||
mAnim.setCurrentAnim( type );
|
||||
if ( started ) {
|
||||
mAnim.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
@@ -157,6 +174,9 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
if ( mPresenter != null ) {
|
||||
mPresenter.onDestroy( getViewLifecycleOwner() );
|
||||
}
|
||||
if ( mAnim != null ) {
|
||||
mAnim.release();
|
||||
}
|
||||
AppServiceHandler.getApis().getFragmentManagerApi().removeMainFragmentStackTransactionListener( this );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,11 @@ import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.map.navi.IMogoNaviListener2;
|
||||
import com.mogo.module.apps.anim.AnimRes;
|
||||
import com.mogo.module.apps.model.AppsModel;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.LaunchUtils;
|
||||
import com.mogo.utils.TipToast;
|
||||
|
||||
@@ -26,7 +29,8 @@ import org.json.JSONObject;
|
||||
*/
|
||||
public class AppNavigatorPresenter extends Presenter< AppNavigatorView > implements IMogoIntentListener,
|
||||
IMogoVoiceCmdCallBack,
|
||||
IMogoNaviListener2 {
|
||||
IMogoNaviListener2,
|
||||
IMogoStatusChangedListener {
|
||||
|
||||
private static final String TAG = "AppNavigatorPresenter";
|
||||
|
||||
@@ -42,6 +46,7 @@ public class AppNavigatorPresenter extends Presenter< AppNavigatorView > impleme
|
||||
// 预加载应用列表,空间换时间
|
||||
AppsModel.getInstance( getContext() ).load( null );
|
||||
}
|
||||
AppServiceHandler.getApis().getStatusManagerApi().registerStatusChangedListener( TAG, StatusDescriptor.MEDIA_PLAYER_STATUS, this );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -117,15 +122,38 @@ public class AppNavigatorPresenter extends Presenter< AppNavigatorView > impleme
|
||||
super.onDestroy( owner );
|
||||
AppServiceHandler.getApis().getRegisterCenterApi().unregisterMogoNaviListener( TAG );
|
||||
AppServiceHandler.getApis().getIntentManagerApi().unregisterIntentListener( AppsConst.COMMAND_OPERATION, this );
|
||||
AppServiceHandler.getApis().getStatusManagerApi().unregisterStatusChangedListener( TAG, StatusDescriptor.MEDIA_PLAYER_STATUS, this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartNavi() {
|
||||
mView.hideNavigationEntrance();
|
||||
mView.setCurrentXiaoZhiEmoji( AnimRes.EmojiType.Navigation );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopNavi() {
|
||||
mView.showNavigationEntrance();
|
||||
if ( AppServiceHandler.getApis().getStatusManagerApi().isMediaPlaying() ) {
|
||||
mView.setCurrentXiaoZhiEmoji( AnimRes.EmojiType.Music );
|
||||
} else {
|
||||
mView.setCurrentXiaoZhiEmoji( AnimRes.EmojiType.Others );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged( StatusDescriptor descriptor, boolean isTrue ) {
|
||||
if ( descriptor != StatusDescriptor.MEDIA_PLAYER_STATUS ) {
|
||||
return;
|
||||
}
|
||||
if ( AppServiceHandler.getApis().getMapServiceApi().getNavi( getContext() ).isNaviing() ) {
|
||||
// 导航优先级更高
|
||||
return;
|
||||
}
|
||||
if ( isTrue ) {
|
||||
mView.setCurrentXiaoZhiEmoji( AnimRes.EmojiType.Music );
|
||||
} else {
|
||||
mView.setCurrentXiaoZhiEmoji( AnimRes.EmojiType.Others );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.module.apps;
|
||||
|
||||
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.module.apps.anim.AnimRes;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -19,4 +20,11 @@ public interface AppNavigatorView extends IView {
|
||||
void hideNavigationEntrance();
|
||||
|
||||
void showNavigationEntrance();
|
||||
|
||||
/**
|
||||
* 设置当前小智形象表情
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
void setCurrentXiaoZhiEmoji( AnimRes.EmojiType type );
|
||||
}
|
||||
|
||||
@@ -11,4 +11,8 @@ public interface Anim {
|
||||
void start();
|
||||
|
||||
void stop();
|
||||
|
||||
void setCurrentAnim( AnimRes.EmojiType type );
|
||||
|
||||
void release();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,21 @@ import com.mogo.module.apps.R;
|
||||
*/
|
||||
public class AnimRes {
|
||||
|
||||
public static final int sRes[] = {
|
||||
public enum EmojiType {
|
||||
Navigation,
|
||||
Music,
|
||||
Others
|
||||
}
|
||||
|
||||
public static final int sNavigation[] = {
|
||||
|
||||
};
|
||||
|
||||
public static final int sMusic[] = {
|
||||
|
||||
};
|
||||
|
||||
public static final int sAll[][] = new int[][]{{
|
||||
R.drawable.mogo_tts_icon_00000,
|
||||
R.drawable.mogo_tts_icon_00001,
|
||||
R.drawable.mogo_tts_icon_00002,
|
||||
@@ -23,7 +37,8 @@ public class AnimRes {
|
||||
R.drawable.mogo_tts_icon_00008,
|
||||
R.drawable.mogo_tts_icon_00009,
|
||||
R.drawable.mogo_tts_icon_00010,
|
||||
R.drawable.mogo_tts_icon_00011,
|
||||
R.drawable.mogo_tts_icon_00011
|
||||
}, {
|
||||
R.drawable.mogo_tts_icon_00012,
|
||||
R.drawable.mogo_tts_icon_00013,
|
||||
R.drawable.mogo_tts_icon_00014,
|
||||
@@ -35,7 +50,8 @@ public class AnimRes {
|
||||
R.drawable.mogo_tts_icon_00020,
|
||||
R.drawable.mogo_tts_icon_00021,
|
||||
R.drawable.mogo_tts_icon_00022,
|
||||
R.drawable.mogo_tts_icon_00023,
|
||||
R.drawable.mogo_tts_icon_00023
|
||||
}, {
|
||||
R.drawable.mogo_tts_icon_00024,
|
||||
R.drawable.mogo_tts_icon_00025,
|
||||
R.drawable.mogo_tts_icon_00026,
|
||||
@@ -47,7 +63,8 @@ public class AnimRes {
|
||||
R.drawable.mogo_tts_icon_00032,
|
||||
R.drawable.mogo_tts_icon_00033,
|
||||
R.drawable.mogo_tts_icon_00034,
|
||||
R.drawable.mogo_tts_icon_00035,
|
||||
R.drawable.mogo_tts_icon_00035
|
||||
}, {
|
||||
R.drawable.mogo_tts_icon_00036,
|
||||
R.drawable.mogo_tts_icon_00037,
|
||||
R.drawable.mogo_tts_icon_00038,
|
||||
@@ -59,7 +76,8 @@ public class AnimRes {
|
||||
R.drawable.mogo_tts_icon_00044,
|
||||
R.drawable.mogo_tts_icon_00045,
|
||||
R.drawable.mogo_tts_icon_00046,
|
||||
R.drawable.mogo_tts_icon_00047,
|
||||
R.drawable.mogo_tts_icon_00047
|
||||
}, {
|
||||
R.drawable.mogo_tts_icon_00048,
|
||||
R.drawable.mogo_tts_icon_00049,
|
||||
R.drawable.mogo_tts_icon_00050,
|
||||
@@ -71,7 +89,8 @@ public class AnimRes {
|
||||
R.drawable.mogo_tts_icon_00056,
|
||||
R.drawable.mogo_tts_icon_00057,
|
||||
R.drawable.mogo_tts_icon_00058,
|
||||
R.drawable.mogo_tts_icon_00059,
|
||||
R.drawable.mogo_tts_icon_00059
|
||||
}, {
|
||||
R.drawable.mogo_tts_icon_00060,
|
||||
R.drawable.mogo_tts_icon_00061,
|
||||
R.drawable.mogo_tts_icon_00062,
|
||||
@@ -80,5 +99,7 @@ public class AnimRes {
|
||||
R.drawable.mogo_tts_icon_00065,
|
||||
R.drawable.mogo_tts_icon_00066,
|
||||
R.drawable.mogo_tts_icon_00067
|
||||
};
|
||||
}};
|
||||
|
||||
public static int sRes[] = sAll[0];
|
||||
}
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
package com.mogo.module.apps.anim;
|
||||
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mogo.module.apps.R;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
@@ -18,20 +14,14 @@ import com.mogo.utils.logger.Logger;
|
||||
public class AnimWrapper implements Anim {
|
||||
|
||||
private static final String TAG = "AnimWrapper";
|
||||
private ImageView mTarget;
|
||||
private Anim mDelegate;
|
||||
private boolean mIsStarted = false;
|
||||
|
||||
public AnimWrapper() {
|
||||
}
|
||||
|
||||
public void initAnim( ImageView target ) {
|
||||
mTarget = target;
|
||||
public AnimWrapper( ImageView target ) {
|
||||
if ( CarSeries.isF8xxSeries() ) {
|
||||
mDelegate = new OthersAnim( target );
|
||||
start();
|
||||
} else {
|
||||
mTarget.setImageResource( R.drawable.mogo_tts_icon_00000 );
|
||||
mDelegate = new KitkatAnim( target );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +43,22 @@ public class AnimWrapper implements Anim {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentAnim( AnimRes.EmojiType type ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setCurrentAnim( type );
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isStarted() {
|
||||
return mIsStarted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.release();
|
||||
}
|
||||
mDelegate = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,40 @@
|
||||
package com.mogo.module.apps.anim;
|
||||
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mogo.module.apps.R;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-02-26
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class KitkatAnim implements Anim{
|
||||
public class KitkatAnim implements Anim {
|
||||
|
||||
private ImageView mTarget;
|
||||
|
||||
public KitkatAnim( ImageView target ) {
|
||||
this.mTarget = target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
|
||||
mTarget.setImageResource( R.drawable.mogo_tts_icon_00000 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentAnim( AnimRes.EmojiType type ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
mTarget = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,17 +9,20 @@ import android.widget.ImageView;
|
||||
* @author congtaowang
|
||||
* @since 2020-02-26
|
||||
* <p>
|
||||
* 描述
|
||||
* 导航>音乐>其他(自己轮询)
|
||||
*/
|
||||
public class OthersAnim implements Anim {
|
||||
|
||||
private int mStartIndex = 0;
|
||||
|
||||
private final static int MSG_LOOP = 3003;
|
||||
public static final int MSG_CHANGE = 3004;
|
||||
public static final long INTERVAL = 100L;
|
||||
private boolean mStarted = false;
|
||||
|
||||
private final ImageView mImageView;
|
||||
private ImageView mImageView;
|
||||
|
||||
private int mEmojiIndex = 0;
|
||||
|
||||
private Handler mHandler = new Handler( Looper.getMainLooper() ) {
|
||||
@Override
|
||||
@@ -28,27 +31,80 @@ public class OthersAnim implements Anim {
|
||||
switch ( msg.what ) {
|
||||
case MSG_LOOP:
|
||||
if ( mStarted ) {
|
||||
if ( AnimRes.sRes.length == 0 ) {
|
||||
return;
|
||||
}
|
||||
mImageView.setImageResource( AnimRes.sRes[mStartIndex++ % AnimRes.sRes.length] );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_LOOP, INTERVAL );
|
||||
}
|
||||
break;
|
||||
case MSG_CHANGE:
|
||||
if ( mLastType == AnimRes.EmojiType.Others ) {
|
||||
boolean start = mStarted;
|
||||
stop();
|
||||
mEmojiIndex++;
|
||||
AnimRes.sRes = AnimRes.sAll[mEmojiIndex % AnimRes.sAll.length];
|
||||
mStartIndex = 0;
|
||||
if ( start ) {
|
||||
start();
|
||||
}
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 60 * 1_000L );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private AnimRes.EmojiType mLastType;
|
||||
|
||||
public OthersAnim( ImageView imageView ) {
|
||||
this.mImageView = imageView;
|
||||
mLastType = AnimRes.EmojiType.Others;
|
||||
AnimRes.sRes = AnimRes.sAll[mEmojiIndex];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
if ( mStarted ) {
|
||||
return;
|
||||
}
|
||||
mStarted = true;
|
||||
mHandler.sendEmptyMessage( MSG_LOOP );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 60 * 1_000L );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
mStarted = false;
|
||||
mHandler.removeMessages( MSG_LOOP );
|
||||
mHandler.removeMessages( MSG_CHANGE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentAnim( AnimRes.EmojiType type ) {
|
||||
if ( mLastType == type ) {
|
||||
return;
|
||||
}
|
||||
mLastType = type;
|
||||
switch ( type ) {
|
||||
case Navigation:
|
||||
mStartIndex = 0;
|
||||
AnimRes.sRes = AnimRes.sNavigation;
|
||||
break;
|
||||
case Music:
|
||||
mStartIndex = 0;
|
||||
AnimRes.sRes = AnimRes.sMusic;
|
||||
break;
|
||||
case Others:
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 0 * 1_000L );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
stop();
|
||||
mHandler = null;
|
||||
mImageView = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.mogo.module.back;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-02-26
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class BackToLauncherConst {
|
||||
|
||||
public static final String MODULE_NAME ="MOGO_BACK_2_LAUNCHER";
|
||||
|
||||
public static final String MODULE_PATH = "/back2launcher/ui";
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
|
||||
@@ -18,7 +20,7 @@ import com.mogo.service.module.ModuleType;
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = BackToLauncherConst.MODULE_PATH )
|
||||
@Route( path = MogoServicePaths.PATH_BACK )
|
||||
public class BackToLauncherModuleProvider implements IMogoModuleProvider {
|
||||
|
||||
private static final String TAG = "BackToLauncherModuleProvider";
|
||||
@@ -36,7 +38,7 @@ public class BackToLauncherModuleProvider implements IMogoModuleProvider {
|
||||
@NonNull
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return BackToLauncherConst.MODULE_NAME;
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -118,7 +119,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
private TextView mUpload;
|
||||
private ImageView mUploading;
|
||||
|
||||
private View mMove2CurrentLocation;
|
||||
private ImageButton mMove2CurrentLocation;
|
||||
|
||||
private NaviInfoView mNaviInfo;
|
||||
private TextView mExitNavi;
|
||||
@@ -257,9 +258,17 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mStatusManager.setDisplayOverview(TAG, false);
|
||||
UiThreadHandler.removeCallbacks(mLockCarRunnable);
|
||||
}
|
||||
if ( !mApis.getRefreshStrategyControllerApi().restartAutoRefreshAtTime( 0 ) ) {
|
||||
mStatusManager.setUserInteractionStatus(TAG, true, false);
|
||||
mMApUIController.recoverLockMode();
|
||||
if ( mIsLock ) {
|
||||
if ( mMApUIController.getCurrentUiMode() == EnumMapUI.CarUp_2D ) {
|
||||
mMApUIController.changeMapMode( EnumMapUI.NorthUP_2D );
|
||||
} else if( mMApUIController.getCurrentUiMode() == EnumMapUI.NorthUP_2D ){
|
||||
mMApUIController.changeMapMode( EnumMapUI.CarUp_2D );
|
||||
}
|
||||
} else {
|
||||
if ( !mApis.getRefreshStrategyControllerApi().restartAutoRefreshAtTime( 0 ) ) {
|
||||
mStatusManager.setUserInteractionStatus(TAG, true, false);
|
||||
mMApUIController.recoverLockMode();
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
@@ -744,6 +753,16 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
} else {
|
||||
mExitNavi.setText(R.string.module_ext_str_continue_navi);
|
||||
}
|
||||
|
||||
if ( isLock ) {
|
||||
if ( mMApUIController.getCurrentUiMode() == EnumMapUI.CarUp_2D ) {
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.icon_north_up );
|
||||
} else {
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.icon_car_up );
|
||||
}
|
||||
} else {
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.module_map_ic_move2_current_location );
|
||||
}
|
||||
}
|
||||
|
||||
private void traceData(String from) {
|
||||
@@ -794,7 +813,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderWeatherInfo(String temp, String desc, int iconId) {
|
||||
if (!DebugConfig.isMapBased()) {
|
||||
@@ -967,6 +985,12 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
mCameraMode.setSelected(ui == EnumMapUI.NorthUP_2D);
|
||||
mCameraMode.setText(getString(ui == EnumMapUI.NorthUP_2D ? R.string.mode_car_up : R.string.mode_north_up));
|
||||
|
||||
if ( ui == EnumMapUI.CarUp_2D ) {
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.icon_north_up );
|
||||
} else if( ui == EnumMapUI.NorthUP_2D ){
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.icon_car_up );
|
||||
}
|
||||
}
|
||||
|
||||
private static int SEEK_HELP_NOTICE_NUM_MSG_TYPE = 401015;
|
||||
|
||||
@@ -120,7 +120,9 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
// 相当于每次onResume都会请求一下个人信息,目的是能够相对及时的同步手机端的个人信息修改
|
||||
requestUserInfo();
|
||||
}
|
||||
requestCarModelList();
|
||||
if(DebugConfig.isMapBased()) {
|
||||
requestCarModelList();
|
||||
}
|
||||
getCommonConfig();
|
||||
}
|
||||
|
||||
|
||||
@@ -278,7 +278,9 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
if ( mCoverUpLayout.getVisibility() != View.VISIBLE ) {
|
||||
mServiceApis.getAdasControllerApi().showADAS();
|
||||
}
|
||||
mServiceApis.getLauncherApi().setFloatButtonVisible( false );
|
||||
if ( mServiceApis.getLauncherApi() != null ) {
|
||||
mServiceApis.getLauncherApi().setFloatButtonVisible( false );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -290,7 +292,9 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
if ( shouldCloseADASPanelWhenPause() ) {
|
||||
mServiceApis.getAdasControllerApi().closeADAS();
|
||||
}
|
||||
mServiceApis.getLauncherApi().setFloatButtonVisible( true );
|
||||
if ( mServiceApis.getLauncherApi() != null ) {
|
||||
mServiceApis.getLauncherApi().setFloatButtonVisible( true );
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean shouldCloseADASPanelWhenPause() {
|
||||
|
||||
@@ -112,7 +112,9 @@ public class SchemeIntent implements IMogoStatusChangedListener {
|
||||
delay = 5_000L;
|
||||
}
|
||||
mNextIntent = new IntentWrapper(intent, delay);
|
||||
mApis.getLauncherApi().backToLauncher(mContext);
|
||||
if ( mApis.getLauncherApi() != null ) {
|
||||
mApis.getLauncherApi().backToLauncher(mContext);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,9 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
AIAssist.getInstance( getContext() ).speakTTSVoice( "已为您继续导航" );
|
||||
UiThreadHandler.removeCallbacks( mLockCarRunnable );
|
||||
} else {
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
if ( mLauncher != null ) {
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
}
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
try {
|
||||
mStatusManager.setDisplayOverview( TAG, false );
|
||||
@@ -136,7 +138,9 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return;
|
||||
}
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
if ( mLauncher != null ) {
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
}
|
||||
if ( !mMogoMapService.getNavi( getContext() ).isNaviing() && !mStatusManager.isSearchUIShow() ) {
|
||||
mSearchManager.showSearch();
|
||||
}
|
||||
@@ -148,7 +152,9 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return;
|
||||
}
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
if ( mLauncher != null ) {
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
}
|
||||
mMogoSearchManager.calculatePath( new MogoLatLng( lat, lon ) );
|
||||
}
|
||||
|
||||
@@ -158,7 +164,9 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
// 导航过程中语音指令退出导航,会出现 activity 不走 onResume 的情况
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
if ( AppUtils.isAppForeground( getContext() ) && !hasOthersActivity() && !mStatusManager.isMainPageOnResume() ) {
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
if ( mLauncher != null ) {
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
}
|
||||
}
|
||||
}, 500L );
|
||||
return;
|
||||
@@ -203,7 +211,9 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
mView.getUIController().displayOverview( mDisplayOverviewBounds );
|
||||
AIAssist.getInstance( getContext() ).speakTTSVoice( "展示全程路线" );
|
||||
} else {
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
if ( mLauncher != null ) {
|
||||
mLauncher.backToLauncher( getContext() );
|
||||
}
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
mStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
mStatusManager.setDisplayOverview( TAG, true );
|
||||
|
||||
@@ -171,7 +171,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
private IMogoIntentManager mIntentManager;
|
||||
private IMogoActionManager mActionManager;
|
||||
private IMogoADASController mADASController;
|
||||
private IMogoLauncher mLauncher;
|
||||
private IMogoFragmentManager mFragmentManager;
|
||||
private IMogoNavi mNavi;
|
||||
private IMogoRegisterCenter mRegisterCenter;
|
||||
@@ -557,7 +556,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
mIntentManager.registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, this);
|
||||
|
||||
mADASController = MarkerServiceHandler.getADASController();
|
||||
mLauncher = MarkerServiceHandler.getLauncher();
|
||||
mFragmentManager = MarkerServiceHandler.getFragmentManager();
|
||||
|
||||
mFragmentManager.addMainFragmentStackTransactionListener(this);
|
||||
|
||||
@@ -22,7 +22,9 @@ public class MyLocationHandler implements IntentHandler {
|
||||
if ( MarkerServiceHandler.getMogoStatusManager().isMainPageOnResume() ) {
|
||||
MarkerServiceHandler.getMapUIController().recoverLockMode();
|
||||
} else {
|
||||
MarkerServiceHandler.getLauncher().backToLauncher( context );
|
||||
if ( MarkerServiceHandler.getLauncher() != null ) {
|
||||
MarkerServiceHandler.getLauncher().backToLauncher( context );
|
||||
}
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
MarkerServiceHandler.getMapUIController().recoverLockMode();
|
||||
}, 2_000L );
|
||||
|
||||
@@ -50,7 +50,9 @@ class WholeVoiceCommandIntentHandler implements IntentHandler {
|
||||
}
|
||||
switch ( command ) {
|
||||
case ServiceConst.COMMAND_BACK:
|
||||
MarkerServiceHandler.getLauncher().backToLauncher( context );
|
||||
if ( MarkerServiceHandler.getLauncher() != null ) {
|
||||
MarkerServiceHandler.getLauncher().backToLauncher( context );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.mogo.module.service.network.bean.TtsConfigData;
|
||||
import com.mogo.service.passport.IMogoTicketCallback;
|
||||
import com.mogo.utils.AppUtils;
|
||||
import com.mogo.utils.NetworkUtils;
|
||||
import com.mogo.utils.glide.GlideApp;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
@@ -33,6 +32,7 @@ import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -54,6 +54,8 @@ class LauncherCardRefresher {
|
||||
public static final String KEY_LauncherCardTipLastTipTime = "LauncherCardTipLastTipTime";
|
||||
|
||||
public static final String KEY_LAST_LOAD_TTS_TYPE = "keyLastLoadTtsType";
|
||||
public static final String KEY_LAST_LOAD_TTS_DATE = "keyLastLoadTtsDate";
|
||||
|
||||
|
||||
private static volatile LauncherCardRefresher sInstance;
|
||||
|
||||
@@ -374,9 +376,20 @@ class LauncherCardRefresher {
|
||||
*/
|
||||
private void requestTtsStrategyConfig() {
|
||||
|
||||
long lastPlayDateTime = SharedPrefsMgr.getInstance( mContext ).getLong( KEY_LAST_LOAD_TTS_DATE, 0L );
|
||||
if ( lastPlayDateTime != 0 ) {
|
||||
Date lastPlayDate = new Date( lastPlayDateTime );
|
||||
if ( lastPlayDate.getDate() == new Date( System.currentTimeMillis() ).getDate() ) {
|
||||
Logger.d( TAG, "一天只播报一次" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String name = SharedPrefsMgr.getInstance( mContext ).getString( KEY_LAST_LOAD_TTS_TYPE, LauncherCardRefreshType.Weather.name() );
|
||||
LauncherCardRefreshType type = LauncherCardRefreshType.valueOf( name );
|
||||
|
||||
Logger.d( TAG, "本次播报:%s", name );
|
||||
|
||||
MogoLocation location = MogoApisHandler.getInstance().getApis().getMapServiceApi().getSingletonLocationClient( mContext ).getLastKnowLocation();
|
||||
TtsConfigBody body = new TtsConfigBody()
|
||||
.addType( LauncherCardRefreshType.NearRoads.getVal() )
|
||||
@@ -395,6 +408,7 @@ class LauncherCardRefresher {
|
||||
@Override
|
||||
public void onError( Throwable e ) {
|
||||
super.onError( e );
|
||||
Logger.e( TAG, e, "queryBroadCastInfo" );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -469,6 +483,7 @@ class LauncherCardRefresher {
|
||||
break;
|
||||
}
|
||||
|
||||
Logger.d( TAG, "header = %s", header.type.getVal() );
|
||||
TtsConfigNode pointer = header;
|
||||
|
||||
do {
|
||||
@@ -561,13 +576,13 @@ class LauncherCardRefresher {
|
||||
* @return
|
||||
*/
|
||||
private boolean handleExplorerWayTtsConfig( TtsConfigData.OnlineCarVsExplorerWay explorerWay ) {
|
||||
if ( explorerWay == null || explorerWay.pois == 0 ) {
|
||||
if ( explorerWay == null || explorerWay.poiTotal == 0 ) {
|
||||
return false;
|
||||
}
|
||||
String tts = mContext.getString( R.string.module_service_launcher_card_tips );
|
||||
String info = mContext.getString( R.string.module_service_launcher_card_info );
|
||||
speakTTS( String.format( tts, explorerWay.pois, LauncherCardRefreshType.ExplorerWay.getDesc() ), false );
|
||||
notifyRefreshChanged( String.format( info, explorerWay.pois, LauncherCardRefreshType.ExplorerWay ), explorerWay.pois, tts );
|
||||
speakTTS( String.format( tts, explorerWay.poiTotal, LauncherCardRefreshType.ExplorerWay.getDesc() ), false );
|
||||
notifyRefreshChanged( String.format( info, explorerWay.poiTotal, LauncherCardRefreshType.ExplorerWay ), explorerWay.poiTotal, tts );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -578,13 +593,13 @@ class LauncherCardRefresher {
|
||||
* @return
|
||||
*/
|
||||
private boolean handleOnlineCarTtsConfig( TtsConfigData.OnlineCarVsExplorerWay onlineCar ) {
|
||||
if ( onlineCar == null || onlineCar.friends == 0 ) {
|
||||
if ( onlineCar == null || onlineCar.carTotal == 0 ) {
|
||||
return false;
|
||||
}
|
||||
String tts = mContext.getString( R.string.module_service_launcher_card_tips );
|
||||
String info = mContext.getString( R.string.module_service_launcher_card_info );
|
||||
speakTTS( String.format( tts, onlineCar.friends, LauncherCardRefreshType.OnlineCar.getDesc() ), false );
|
||||
notifyRefreshChanged( String.format( info, onlineCar.friends, LauncherCardRefreshType.OnlineCar ), onlineCar.friends, tts );
|
||||
speakTTS( String.format( tts, onlineCar.carTotal, LauncherCardRefreshType.OnlineCar.getDesc() ), false );
|
||||
notifyRefreshChanged( String.format( info, onlineCar.carTotal, LauncherCardRefreshType.OnlineCar ), onlineCar.carTotal, tts );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -595,7 +610,8 @@ class LauncherCardRefresher {
|
||||
*/
|
||||
private void writeNextLoadType( LauncherCardRefreshType type ) {
|
||||
SharedPrefsMgr.getInstance( mContext ).putString( KEY_LAST_LOAD_TTS_TYPE, type.getNext() );
|
||||
Logger.d( TAG, "本次播报:%s,下次播报:%s", type.getVal(), LauncherCardRefreshType.valueOf( type.getNext() ).getVal() );
|
||||
Logger.d( TAG, "本次播报:%s,下次播报:%s", type.name(), LauncherCardRefreshType.valueOf( type.getNext() ).name() );
|
||||
SharedPrefsMgr.getInstance( mContext ).putLong( KEY_LAST_LOAD_TTS_DATE, System.currentTimeMillis() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,6 +45,6 @@ public interface RefreshApiService {
|
||||
Observable< HomeCompanyDistanceForPushResponse > calculationNotHomeCompanyDistanceForPush( @FieldMap Map< String, Object > parameters );
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST( "/yycp-launcherSnapshot/appCard/queryBroadCastInfo" )
|
||||
@POST( "/yycp-launcherSnapshot/appCard/queryAppCardData" )
|
||||
Observable< TtsConfigData > queryBroadCastInfo( @FieldMap Map< String, Object > parameters );
|
||||
}
|
||||
|
||||
@@ -31,20 +31,14 @@ class TtsConfigData extends BaseData {
|
||||
}
|
||||
|
||||
public static class Weather extends BaseConfig {
|
||||
|
||||
public String time;
|
||||
public String date;
|
||||
public String ymd;
|
||||
public String week;
|
||||
public String sunrise;
|
||||
public String high;
|
||||
public String low;
|
||||
public String sunset;
|
||||
public int aqi;
|
||||
public String fx;
|
||||
public String fl;
|
||||
public String type;
|
||||
public String notice;
|
||||
public String cityName;
|
||||
public String cityId;
|
||||
public String weather;
|
||||
public int hour;
|
||||
public int weatherCode;
|
||||
public double weatherTime;
|
||||
public int alarmLevel;
|
||||
public int alarmType;
|
||||
}
|
||||
|
||||
public static class News extends BaseConfig {
|
||||
@@ -78,12 +72,12 @@ class TtsConfigData extends BaseData {
|
||||
/**
|
||||
* 车友数量
|
||||
*/
|
||||
public int friends;
|
||||
public int carTotal;
|
||||
|
||||
/**
|
||||
* 道路事件数量
|
||||
*/
|
||||
public int pois;
|
||||
public int poiTotal;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<string name="module_services_panel_item_distance_tag_text">距离导航目的地</string>
|
||||
<string name="module_services_panel_item_detail_text">查看车友信息</string>
|
||||
<string name="module_services_panel_item_call">电话</string>
|
||||
<string name="module_services_online_car_panel_empty_tmpl">很抱歉,目的地%dKM内未找到车友</string>
|
||||
<string name="module_services_online_car_panel_empty_tmpl">很抱歉,目的地%d公里内未找到车友</string>
|
||||
<string name="module_services_online_car_panel_title">目的地车友</string>
|
||||
<string name="module_services_error_text">加载失败,请点击重试</string>
|
||||
</resources>
|
||||
|
||||
@@ -52,7 +52,6 @@ class StrategyShareProvider : IProvider {
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Logger.e(S_TAG, e, "解析adas数据异常")
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,16 +74,11 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter<V2XSurroundingVi
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mClickListener != null) {
|
||||
mClickListener.onItemClickListener(v, position, surroundingConstruction, getTypeName(surroundingConstruction.getPoiType()));
|
||||
mClickListener.onItemClickListener(v, position, surroundingConstruction);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//数据绑定
|
||||
// Glide.with(mContext)
|
||||
// .load(getTypeRes(surroundingConstruction.getPoiType()))
|
||||
// .into(mBgImageView);
|
||||
|
||||
mBgImageView.setBackgroundResource(getTypeRes(surroundingConstruction.getPoiType()));
|
||||
mTypeImageView.setBackgroundResource(getTypeSmallRes(surroundingConstruction.getPoiType()));
|
||||
// RequestOptions requestOptions = new RequestOptions()
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
package com.mogo.module.v2x.adapter.holder;
|
||||
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XEventShowEntity;
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
@@ -56,8 +52,6 @@ public class V2XIllegalParkVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
mAddressTv = itemView.findViewById(R.id.tvAddress);
|
||||
mIllegalNumTv = itemView.findViewById(R.id.tvIllegalNum);
|
||||
mIlIllegalParkingLike = itemView.findViewById(R.id.llIllegalParkingLike);
|
||||
Drawable drawable = ContextCompat.getDrawable(viewGroup.getContext(), R.drawable.icon_heart_like_bg);
|
||||
mIlIllegalParkingLike.setBackground(drawable);
|
||||
mIIllegalParkingUnLike = itemView.findViewById(R.id.llIllegalParkingUnLike);
|
||||
|
||||
// 设置视图状态监听
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.module.v2x.adapter.holder;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -10,8 +9,6 @@ import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerUserInfo;
|
||||
@@ -136,8 +133,6 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
ivEventLive = itemView.findViewById(R.id.ivEventLive);
|
||||
ivEventCallChart = itemView.findViewById(R.id.ivEventCallChart);
|
||||
ivEventZan = itemView.findViewById(R.id.ivEventZan);
|
||||
Drawable drawable = ContextCompat.getDrawable(itemView.getContext(), R.drawable.icon_heart_like_bg);
|
||||
ivEventZan.setBackground(drawable);
|
||||
ivEventReportTrue = itemView.findViewById(R.id.ivEventReportTrue);
|
||||
ivEventReportErr = itemView.findViewById(R.id.ivEventReportErr);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
package com.mogo.module.v2x.adapter.holder;
|
||||
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
@@ -50,8 +47,6 @@ public class V2XScenarioHistoryIllegalParkVH extends V2XBaseViewHolder<V2XHistor
|
||||
mTagEventEvaluate = itemView.findViewById(R.id.tagEventEvaluate);
|
||||
|
||||
mLlIllegalParkingLike = itemView.findViewById(R.id.llIllegalParkingLike);
|
||||
Drawable drawable = ContextCompat.getDrawable(viewGroup.getContext(), R.drawable.icon_history_heart_back);
|
||||
mLlIllegalParkingLike.setBackground(drawable);
|
||||
mLlIllegalParkingUnLike = itemView.findViewById(R.id.llIllegalParkingUnLike);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.module.v2x.adapter.holder;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -8,7 +7,6 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
@@ -51,8 +49,6 @@ public class V2XScenarioHistoryRoadEventVH extends V2XBaseViewHolder<V2XHistoryS
|
||||
mTagEventEvaluate = itemView.findViewById(R.id.tagEventEvaluate);
|
||||
|
||||
mLlIllegalParkingLike = itemView.findViewById(R.id.llIllegalParkingLike);
|
||||
Drawable drawable = ContextCompat.getDrawable(viewGroup.getContext(), R.drawable.icon_history_heart_back);
|
||||
mLlIllegalParkingLike.setBackground(drawable);
|
||||
mLlIllegalParkingUnLike = itemView.findViewById(R.id.llIllegalParkingUnLike);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,36 @@
|
||||
package com.mogo.module.v2x.fragment
|
||||
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.graphics.Typeface
|
||||
import android.os.Bundle
|
||||
import android.text.SpannableString
|
||||
import android.text.Spanned
|
||||
import android.text.style.AbsoluteSizeSpan
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.text.style.StyleSpan
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.RadioButton
|
||||
import android.widget.RadioGroup
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.module.common.entity.MarkerExploreWay
|
||||
import com.mogo.module.common.entity.MarkerPoiTypeEnum
|
||||
import com.mogo.module.v2x.R
|
||||
import com.mogo.module.v2x.SpacesItemDecoration
|
||||
import com.mogo.module.v2x.V2XConst.MODULE_NAME
|
||||
import com.mogo.module.v2x.V2XServiceManager
|
||||
import com.mogo.module.v2x.adapter.V2XEventPagerAdapter
|
||||
import com.mogo.module.v2x.adapter.V2XSurroundingDetailAdapter
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction
|
||||
import com.mogo.module.v2x.presenter.EventPanelPresenter
|
||||
import com.mogo.module.v2x.utils.TrackUtils
|
||||
import com.mogo.module.v2x.view.V2XEventPanelHistoryCountView
|
||||
@@ -23,6 +38,9 @@ import com.mogo.module.v2x.voice.V2XVoiceCallbackListener
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager
|
||||
import com.mogo.utils.logger.Logger
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
|
||||
|
||||
/**
|
||||
@@ -50,6 +68,12 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
private var mRbSurroundingEvent: RadioButton? = null
|
||||
private var mRbShareEvents: RadioButton? = null
|
||||
|
||||
private var mBackImage: ImageView? = null
|
||||
private var mTopBriefTv: TextView? = null
|
||||
private var mDetailRecyclerView: RecyclerView? = null
|
||||
private lateinit var mSurroundingDetailAdapter: V2XSurroundingDetailAdapter
|
||||
var markerExploreWays = mutableListOf<MarkerExploreWay>()
|
||||
|
||||
private val mV2XScenarioHistoryFragment = V2XScenarioHistoryFragment()
|
||||
private val mV2XShareEventsFragment = V2XShareEventsFragment()
|
||||
private val mV2XSurroundingFragment = V2XSurroundingFragment()
|
||||
@@ -77,6 +101,11 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
EventBus.getDefault().register(this)
|
||||
}
|
||||
|
||||
// 打开周边事件TAB
|
||||
private val mCheckSurroundingCb = V2XVoiceCallbackListener { _: String?, _: Intent? ->
|
||||
try {
|
||||
@@ -120,6 +149,12 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
mRbSurroundingEvent = mRootView.findViewById(R.id.rbSurroundingEvent)
|
||||
mRbShareEvents = mRootView.findViewById(R.id.rbShareEvents)
|
||||
|
||||
mBackImage = mRootView.findViewById(R.id.back_image)
|
||||
mTopBriefTv = mRootView.findViewById(R.id.tv_brief_detail)
|
||||
mDetailRecyclerView = mRootView.findViewById(R.id.surrounding_detail_recycleview)
|
||||
|
||||
initDetail()
|
||||
|
||||
// M1 不基于地图的版本直接展示事件面板,且不可关闭
|
||||
if (!DebugConfig.isMapBased()) {
|
||||
mClPanelContainer?.visibility = View.VISIBLE
|
||||
@@ -174,6 +209,10 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
hidePanel()
|
||||
}
|
||||
|
||||
mBackImage?.setOnClickListener {
|
||||
showBaseUi(true)
|
||||
}
|
||||
|
||||
mV2XEventPanelHistoryCountView = V2XEventPanelHistoryCountView(context)
|
||||
mV2XEventPanelHistoryCountView!!.setOnClickListener {
|
||||
if (mClPanelContainer == null) {
|
||||
@@ -201,6 +240,7 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
EventBus.getDefault().unregister(this)
|
||||
mediator?.detach()
|
||||
// 避免内存泄漏
|
||||
fragment = null
|
||||
@@ -215,7 +255,7 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
/*
|
||||
* 语音查询热心指数需求
|
||||
* */
|
||||
public fun showPanelWithSelectedItem(item: Int) {
|
||||
fun showPanelWithSelectedItem(item: Int) {
|
||||
mV2XShareEventsFragment.fromVoice = true
|
||||
if (isPanelShow()) {
|
||||
if (mRbScenarioHistory?.isChecked == true) {
|
||||
@@ -234,6 +274,79 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
}
|
||||
|
||||
|
||||
private fun initDetail() {
|
||||
mDetailRecyclerView!!.addItemDecoration(SpacesItemDecoration(resources.getDimension(R.dimen.share_item_padding).toInt()))
|
||||
mSurroundingDetailAdapter = V2XSurroundingDetailAdapter(activity, markerExploreWays)
|
||||
mDetailRecyclerView!!.adapter = mSurroundingDetailAdapter
|
||||
val linearLayoutManager = LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false)
|
||||
mDetailRecyclerView!!.layoutManager = linearLayoutManager
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun updateSurroundingDetail(data: SurroundingConstruction) {
|
||||
loadSurroundingDetail(data)
|
||||
}
|
||||
|
||||
private fun loadSurroundingDetail(detailData: SurroundingConstruction) {
|
||||
showBaseUi(false)
|
||||
if (detailData != null) {
|
||||
markerExploreWays.clear()
|
||||
markerExploreWays.addAll(detailData.getConstrutList().toMutableList())
|
||||
mSurroundingDetailAdapter.notifyDataSetChanged()
|
||||
|
||||
val originStr = String.format(context!!.resources.getString(R.string.v2x_surrounding_detail_top_brief), markerExploreWays.size)
|
||||
val spannableString = SpannableString(originStr + getTypeName(detailData.poiType))
|
||||
spannableString.setSpan(ForegroundColorSpan(Color.parseColor("#459DFF")),
|
||||
7, originStr.length - getTypeName(detailData.poiType)?.length!!, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
//设置字体大小,true表示前面的字体大小 dip
|
||||
spannableString.setSpan(AbsoluteSizeSpan(context!!.resources.getDimension(R.dimen.module_v2x_surrounding_top_textsize).toInt(), true),
|
||||
7, originStr.length - getTypeName(detailData.poiType)?.length!!, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
spannableString.setSpan(StyleSpan(Typeface.BOLD), 7,
|
||||
originStr.length - getTypeName(detailData.poiType)?.length!!, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
mTopBriefTv?.text = (spannableString)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否显示基础页面
|
||||
*/
|
||||
private fun showBaseUi(isShow: Boolean) {
|
||||
if (isShow) {
|
||||
mBackImage?.visibility = View.GONE
|
||||
mTopBriefTv?.visibility = View.GONE
|
||||
mDetailRecyclerView?.visibility = View.GONE
|
||||
|
||||
mRgTabSelect?.visibility = View.VISIBLE
|
||||
mVpEventPanel?.visibility = View.VISIBLE
|
||||
mBtnHidePanels?.visibility = View.VISIBLE
|
||||
} else {
|
||||
mBackImage?.visibility = View.VISIBLE
|
||||
mTopBriefTv?.visibility = View.VISIBLE
|
||||
mDetailRecyclerView?.visibility = View.VISIBLE
|
||||
|
||||
mRgTabSelect?.visibility = View.GONE
|
||||
mVpEventPanel?.visibility = View.GONE
|
||||
mBtnHidePanels?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun getTypeName(type: String): String? {
|
||||
var typeName = ""
|
||||
typeName = when (type) {
|
||||
MarkerPoiTypeEnum.ROAD_CLOSED -> "封路"
|
||||
MarkerPoiTypeEnum.FOURS_ICE -> "道路结冰"
|
||||
MarkerPoiTypeEnum.FOURS_FOG -> "浓雾"
|
||||
MarkerPoiTypeEnum.TRAFFIC_CHECK -> "交通检查"
|
||||
MarkerPoiTypeEnum.FOURS_ACCIDENT -> "交通事故"
|
||||
MarkerPoiTypeEnum.FOURS_BLOCK_UP -> "拥堵"
|
||||
MarkerPoiTypeEnum.FOURS_ROAD_WORK -> "施工"
|
||||
MarkerPoiTypeEnum.FOURS_PONDING -> "道路积水"
|
||||
MarkerPoiTypeEnum.FOURS_LIVING -> "实时路况"
|
||||
else -> "实时路况"
|
||||
}
|
||||
return typeName
|
||||
}
|
||||
|
||||
private fun selectWithItem(item: Int) {
|
||||
when (item) {
|
||||
0 -> {
|
||||
|
||||
@@ -26,6 +26,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
@@ -53,6 +54,8 @@ import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@@ -82,14 +85,6 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
private IMogoServiceApis mApis;
|
||||
private NetworkLoadingView mloadingImage;
|
||||
|
||||
private RelativeLayout mSurroundingDetailLayout;
|
||||
private RecyclerView mDetailRecyclerView;
|
||||
private ImageView mBackImage;
|
||||
private TextView mBriefTv;
|
||||
private V2XSurroundingDetailAdapter mDetailAdapter;
|
||||
private List<MarkerExploreWay> markerExploreWays = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -118,13 +113,6 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
mShareTv.setOnClickListener(this);
|
||||
mFreshTv.setOnClickListener(this);
|
||||
|
||||
mSurroundingDetailLayout = findViewById(R.id.layout_surrounding_event_detail);
|
||||
mDetailRecyclerView = findViewById(R.id.surrounding_detail_recycleview);
|
||||
mSurroundingDetailLayout.setVisibility(View.GONE);
|
||||
mBackImage = findViewById(R.id.back_image);
|
||||
mBriefTv = findViewById(R.id.tv_brief_detail);
|
||||
mBackImage.setOnClickListener(this);
|
||||
|
||||
// mRecyclerView.setHasFixedSize(true);
|
||||
mRecyclerView.setOverScrollMode(OVER_SCROLL_NEVER);
|
||||
GridLayoutManager layoutManage = new GridLayoutManager(getContext(), 2);
|
||||
@@ -140,15 +128,6 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
|
||||
}
|
||||
|
||||
private void initDetail() {
|
||||
mDetailRecyclerView.addItemDecoration(new SpacesItemDecoration((int) getResources().getDimension(R.dimen.share_item_padding)));
|
||||
mDetailAdapter = new V2XSurroundingDetailAdapter(getActivity(), markerExploreWays);
|
||||
mDetailRecyclerView.setAdapter(mDetailAdapter);
|
||||
LinearLayoutManager linearLayoutManager =
|
||||
new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
|
||||
mDetailRecyclerView.setLayoutManager(linearLayoutManager);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected SurroundingEventPresenter createPresenter() {
|
||||
@@ -174,8 +153,6 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
}
|
||||
} else if (id == R.id.tv_main_refresh || id == R.id.tv_top_refresh) { //刷新
|
||||
initData();
|
||||
} else if (id == R.id.back_image) {
|
||||
showDetail(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +219,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
/*
|
||||
* 语音查询周边事件 TTS播报
|
||||
* */
|
||||
public void ttsForVoiceCheckout(){
|
||||
public void ttsForVoiceCheckout() {
|
||||
if (poiInfosList.size() > 0) {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).
|
||||
speakTTSVoice("为您找到周边以下事件请查看", null);
|
||||
@@ -323,99 +300,76 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
return poiTypes;
|
||||
}
|
||||
|
||||
private void showDetail(boolean isShow) {
|
||||
if (isShow) {
|
||||
mSurroundingLayout.setVisibility(View.GONE);
|
||||
mSurroundingDetailLayout.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mSurroundingDetailLayout.setVisibility(View.GONE);
|
||||
mSurroundingLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理marker的显示 TODO
|
||||
* 处理marker的显示
|
||||
*
|
||||
* @param v
|
||||
* @param position
|
||||
* @param construction
|
||||
*/
|
||||
@Override
|
||||
public void onItemClickListener(View v, int position, SurroundingConstruction construction, String poiType) {
|
||||
showDetail(true);
|
||||
initDetail();
|
||||
public void onItemClickListener(View v, int position, SurroundingConstruction construction) {
|
||||
if (construction != null) {
|
||||
//处理 marker的显示
|
||||
markerExploreWays.clear();
|
||||
markerExploreWays.addAll(construction.getConstrutList());
|
||||
mDetailAdapter.notifyDataSetChanged();
|
||||
if (!DebugConfig.isMapBased()) {
|
||||
EventBus.getDefault().post(construction);
|
||||
} else {
|
||||
//卡片消失
|
||||
V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
//清除道路事件
|
||||
V2XServiceManager.getMarkerManager().removeMarkers(ServiceConst.CARD_TYPE_ROAD_CONDITION);
|
||||
|
||||
String brief = String.format(getContext().getResources().getString(R.string.v2x_surrounding_detail_top_brief), markerExploreWays.size());
|
||||
mBriefTv.setText(brief + poiType);
|
||||
Logger.d(TAG, "onItemClickListener markerExploreWays.size() = " + markerExploreWays.size());
|
||||
try {
|
||||
//处理 marker的显示
|
||||
List<MarkerExploreWay> exploreWayList = construction.getConstrutList();
|
||||
Logger.d(TAG, "onItemClickListener exploreWayList.size() = " + exploreWayList.size());
|
||||
if (exploreWayList != null && exploreWayList.size() > 0) {
|
||||
for (int i = 0; i < exploreWayList.size(); i++) {
|
||||
MarkerExploreWay exploreWay = exploreWayList.get(i);
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(exploreWay);
|
||||
markerShowEntity.setChecked(false);
|
||||
markerShowEntity.setTextContent(exploreWay.getAddr());
|
||||
markerShowEntity.setMarkerLocation(exploreWay.getLocation());
|
||||
markerShowEntity.setMarkerType(ServiceConst.CARD_TYPE_ROAD_CONDITION);
|
||||
|
||||
WorkThreadHandler.getInstance().postDelayed(() -> {
|
||||
IMogoMarker mogoMarker = V2XServiceManager.getIMogoMarkerService().drawMarker(markerShowEntity);
|
||||
// 点击监听,天际弹窗展示详情
|
||||
if (mogoMarker != null) {
|
||||
mogoMarker.startScaleAnimation(0, 1.2f, 0, 1.2f, 300, new AccelerateInterpolator(), new OnMarkerAnimationListener() {
|
||||
@Override
|
||||
public void onAnimStart() {
|
||||
Logger.d(TAG, " onItemClickListener onAnimStart -----> ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimEnd() {
|
||||
if (mogoMarker.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, " onItemClickListener onAnimEnd ------> ");
|
||||
mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
|
||||
}
|
||||
});
|
||||
mogoMarker.setOwner(markerShowEntity.getMarkerType());
|
||||
mogoMarker.setObject(markerShowEntity);
|
||||
}
|
||||
}, i * 100L);
|
||||
}
|
||||
|
||||
//自适应显示
|
||||
showBonndsRoadtion(exploreWayList);
|
||||
} else {
|
||||
Logger.e(TAG, "onItemClickListener exploreWayList == null");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public void onItemClickListener(View v, int position, SurroundingConstruction construction) {
|
||||
// if (construction != null) {
|
||||
// //卡片消失
|
||||
// V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
// //清除道路事件
|
||||
// V2XServiceManager.getMarkerManager().removeMarkers(ServiceConst.CARD_TYPE_ROAD_CONDITION);
|
||||
//
|
||||
// try {
|
||||
// //处理 marker的显示
|
||||
// List<MarkerExploreWay> exploreWayList = construction.getConstrutList();
|
||||
// Logger.d(TAG, "onItemClickListener exploreWayList.size() = " + exploreWayList.size());
|
||||
// if (exploreWayList != null && exploreWayList.size() > 0) {
|
||||
// for (int i = 0; i < exploreWayList.size(); i++) {
|
||||
// MarkerExploreWay exploreWay = exploreWayList.get(i);
|
||||
// MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
// markerShowEntity.setBindObj(exploreWay);
|
||||
// markerShowEntity.setChecked(false);
|
||||
// markerShowEntity.setTextContent(exploreWay.getAddr());
|
||||
// markerShowEntity.setMarkerLocation(exploreWay.getLocation());
|
||||
// markerShowEntity.setMarkerType(ServiceConst.CARD_TYPE_ROAD_CONDITION);
|
||||
//
|
||||
// WorkThreadHandler.getInstance().postDelayed(() -> {
|
||||
// IMogoMarker mogoMarker = V2XServiceManager.getIMogoMarkerService().drawMarker(markerShowEntity);
|
||||
// // 点击监听,天际弹窗展示详情
|
||||
// if (mogoMarker != null) {
|
||||
// mogoMarker.startScaleAnimation(0, 1.2f, 0, 1.2f, 300, new AccelerateInterpolator(), new OnMarkerAnimationListener() {
|
||||
// @Override
|
||||
// public void onAnimStart() {
|
||||
// Logger.d(TAG, " onItemClickListener onAnimStart -----> ");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAnimEnd() {
|
||||
// if (mogoMarker.isDestroyed()) {
|
||||
// return;
|
||||
// }
|
||||
// Logger.d(TAG, " onItemClickListener onAnimEnd ------> ");
|
||||
// mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
|
||||
// }
|
||||
// });
|
||||
// mogoMarker.setOwner(markerShowEntity.getMarkerType());
|
||||
// mogoMarker.setObject(markerShowEntity);
|
||||
// }
|
||||
// }, i * 100L);
|
||||
// }
|
||||
//
|
||||
// //自适应显示
|
||||
// showBonndsRoadtion(exploreWayList);
|
||||
// } else {
|
||||
// Logger.e(TAG, "onItemClickListener exploreWayList == null");
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 自适应显示
|
||||
*
|
||||
|
||||
@@ -10,5 +10,5 @@ import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
* @since 2020/8/10
|
||||
*/
|
||||
public interface SurroundingItemClickListener {
|
||||
void onItemClickListener(View v, int position, SurroundingConstruction construction, String poiType);
|
||||
void onItemClickListener(View v, int position, SurroundingConstruction construction);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ import android.animation.Animator;
|
||||
import android.animation.AnimatorInflater;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@@ -25,6 +23,7 @@ public class HeartLikeView extends LinearLayout implements Animator.AnimatorList
|
||||
private ImageView mIllegalParkingLike;
|
||||
private AnimatorSet mAnimatorSet;
|
||||
private OnClickCallListener mOnClickCallListener;
|
||||
|
||||
private boolean isAnimator = false;
|
||||
|
||||
public HeartLikeView(Context context) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.5 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#1F2131"/>
|
||||
<corners android:radius="12px"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#FF4944"
|
||||
android:startColor="#C23632" />
|
||||
<corners android:radius="6px" />
|
||||
</shape>
|
||||
@@ -194,10 +194,10 @@
|
||||
|
||||
<com.mogo.module.v2x.view.HeartLikeView
|
||||
android:id="@+id/ivEventZan"
|
||||
android:layout_width="@dimen/module_v2x_event_button_size"
|
||||
android:layout_height="@dimen/module_v2x_event_button_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_15"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="@dimen/dp_15"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivEventLive"
|
||||
app:layout_constraintStart_toEndOf="@id/ivEventEventNav"
|
||||
app:layout_goneMarginLeft="@dimen/dp_10"
|
||||
|
||||
@@ -88,7 +88,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
app:backgroundImg="@drawable/icon_history_heart_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/llIllegalParkingUnLike"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -5,201 +5,148 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!--两层列表-->
|
||||
<!--周边-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_surrounding_event"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!--周边-->
|
||||
<!--顶部layout-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_surrounding_event"
|
||||
android:id="@+id/layout_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!--顶部layout-->
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_height"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brief"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:gravity="center_vertical"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
<!-- android:layout_centerInParent="true"-->
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_height"
|
||||
android:visibility="visible">
|
||||
android:layout_width="@dimen/module_v2x_surrounding_top_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_bt_height"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brief"
|
||||
android:id="@+id/tv_top_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:gravity="center_vertical"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center|center_horizontal"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
android:textColor="@color/v2x_item_white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<!--列表相关-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/list_layout_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/layout_top"
|
||||
android:layout_marginBottom="@dimen/module_v2x_panel_surrounding_marginbottom">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/surrounding_recycleview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:visibility="visible" />
|
||||
|
||||
<!--空数据显示-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_empty_data_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_iv_margin_top"
|
||||
android:src="@drawable/mogo_image_blank_nor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_empty"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="周边5公里,暂无交通事件"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_main_empty_1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="1px"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="你可以试着分享一个事件给其他车主"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
<!-- android:layout_centerInParent="true"-->
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="@dimen/module_v2x_surrounding_top_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_bt_height"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_top_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center|center_horizontal"
|
||||
android:id="@+id/tv_main_share"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_toLeftOf="@+id/center_empty"
|
||||
android:background="@drawable/bg_v2x_go_to_share"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_go_to_share"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:id="@+id/center_empty"
|
||||
android:layout_width="@dimen/module_v2x_panel_surrounding_stance"
|
||||
android:layout_height="@dimen/module_v2x_panel_surrounding_stance"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_refresh"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_toRightOf="@+id/center_empty"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
android:textColor="@color/v2x_item_white"
|
||||
android:textColor="@color/v2x_white_refresh"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<!--列表相关-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/list_layout_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/layout_top"
|
||||
android:layout_marginBottom="@dimen/module_v2x_panel_surrounding_marginbottom">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/surrounding_recycleview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:visibility="visible" />
|
||||
|
||||
<!--空数据显示-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_empty_data_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_image_height"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_iv_margin_top"
|
||||
android:src="@drawable/mogo_image_blank_nor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_empty"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="周边5公里,暂无交通事件"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_main_empty_1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="1px"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="你可以试着分享一个事件给其他车主"
|
||||
android:textColor="@color/v2x_FFF_333"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/tv_main_empty_2"
|
||||
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_share"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_toLeftOf="@+id/center_empty"
|
||||
android:background="@drawable/bg_v2x_go_to_share"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_go_to_share"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:id="@+id/center_empty"
|
||||
android:layout_width="@dimen/module_v2x_panel_surrounding_stance"
|
||||
android:layout_height="@dimen/module_v2x_panel_surrounding_stance"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_refresh"
|
||||
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
|
||||
android:layout_toRightOf="@+id/center_empty"
|
||||
android:background="@drawable/bg_v2x_refresh"
|
||||
android:gravity="center"
|
||||
android:text="@string/v2x_surrounding_refresh"
|
||||
android:textColor="@color/v2x_white_refresh"
|
||||
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<!--周边详情-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_surrounding_event_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<!--顶部layout-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_top_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/module_v2x_surrounding_top_height">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_image"
|
||||
android:layout_alignParentTop="true"
|
||||
android:src="@drawable/v2x_back_image"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:layout_width="43px"
|
||||
android:layout_height="43px"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brief_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toRightOf="@+id/back_image"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="8px"
|
||||
android:layout_marginLeft="19px"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:textSize="18px" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/surrounding_detail_recycleview"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<com.mogo.module.common.view.NetworkLoadingView
|
||||
android:id="@+id/loading_iv"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -92,10 +92,47 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/rgTabSelect" />
|
||||
|
||||
<!-- <View-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="58px"-->
|
||||
<!-- android:background="@drawable/v2x_shadow_shape_view"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent" />-->
|
||||
|
||||
<!--顶部layout-->
|
||||
<ImageView
|
||||
android:id="@+id/back_image"
|
||||
android:layout_width="43px"
|
||||
android:layout_height="43px"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:src="@drawable/v2x_back_image"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="18px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brief_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="19px"
|
||||
android:layout_marginTop="26px"
|
||||
app:layout_constraintLeft_toRightOf="@+id/back_image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="周围5公里,共15条交通信息"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:visibility="gone"
|
||||
android:textSize="18px" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/surrounding_detail_recycleview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
|
||||
android:layout_marginTop="90px"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/back_image"
|
||||
android:layout_marginRight="@dimen/module_v2x_surrounding_margin_left" />
|
||||
|
||||
<!-- <View-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="58px"-->
|
||||
<!-- android:background="@drawable/v2x_shadow_shape_view"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent" />-->
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:id="@+id/surrounding_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_v2x_event_list_item">
|
||||
android:background="@drawable/bg_v2x_surrounding_event_list_item">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/surrounding_road_type_address"
|
||||
@@ -21,7 +21,7 @@
|
||||
app:layout_constraintEnd_toStartOf="@+id/surrounding_road_like"
|
||||
app:layout_constraintStart_toStartOf="@id/surrounding_road_type"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="小黄庄北街与北三环辅路交叉口小黄庄北街与北三环辅路交叉口" />
|
||||
tools:text="小黄庄北街与北三环辅路交叉口" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/surrounding_username"
|
||||
@@ -30,10 +30,11 @@
|
||||
android:alpha="0.6"
|
||||
android:textColor="@color/v2x_FFF_666"
|
||||
android:textSize="16px"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginTop="6px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/surrounding_road_type_address"
|
||||
tools:text="赵云" />
|
||||
tools:text="小蘑菇" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/surrounding_time"
|
||||
@@ -42,8 +43,9 @@
|
||||
android:alpha="0.6"
|
||||
android:textColor="@color/v2x_FFF_666"
|
||||
android:textSize="16px"
|
||||
android:layout_marginStart="@dimen/dp_80"
|
||||
app:layout_constraintStart_toStartOf="@+id/surrounding_username"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="6px"
|
||||
app:layout_constraintStart_toEndOf="@+id/surrounding_username"
|
||||
app:layout_constraintTop_toBottomOf="@+id/surrounding_road_type_address"
|
||||
tools:text="2020-1-12" />
|
||||
|
||||
@@ -51,14 +53,14 @@
|
||||
android:id="@+id/surrounding_road_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginTop="6px"
|
||||
android:layout_marginBottom="@dimen/dp_36"
|
||||
android:background="@drawable/bg_v2x_event_type_read"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5px"
|
||||
android:paddingLeft="6px"
|
||||
android:paddingTop="3px"
|
||||
android:paddingRight="5px"
|
||||
android:paddingRight="6px"
|
||||
android:paddingBottom="3px"
|
||||
android:text="违章停车"
|
||||
android:textColor="#ffffff"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
android:id="@+id/llIllegalParkingLike"
|
||||
android:layout_width="@dimen/module_v2x_event_button_size"
|
||||
android:layout_height="@dimen/module_v2x_event_button_size"
|
||||
android:background="@drawable/icon_heart_like_bg"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -7,9 +7,4 @@
|
||||
<style name="customTabLayoutTextAppearance" parent="TextAppearance.Design.Tab">
|
||||
<item name="android:textSize">@dimen/dp_40</item>
|
||||
</style>
|
||||
|
||||
<declare-styleable name="HeartLikeView">
|
||||
<attr name="backgroundImg" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
@@ -227,7 +227,9 @@ class AutoNaviIntentHandler implements IMogoVoiceCmdCallBack {
|
||||
private void enterApp( Context context ) {
|
||||
try {
|
||||
if ( DebugConfig.isLauncher() ) {
|
||||
MogoWidgetManger.getInstance().getApis().getLauncherApi().backToLauncher( context );
|
||||
if ( MogoWidgetManger.getInstance().getApis().getLauncherApi() != null ) {
|
||||
MogoWidgetManger.getInstance().getApis().getLauncherApi().backToLauncher( context );
|
||||
}
|
||||
} else {
|
||||
LaunchUtils.launchByPkg( context, "com.mogo.launcher.app" );
|
||||
}
|
||||
|
||||
@@ -279,4 +279,9 @@ public class MogoServicePaths {
|
||||
* 全局免唤醒
|
||||
*/
|
||||
public static final String PATH_GLOBAL_UNWAKE = "/global/unwake";
|
||||
|
||||
/**
|
||||
* 返回悬浮按钮
|
||||
*/
|
||||
public static final String PATH_BACK = "/back2launcher/ui";
|
||||
}
|
||||
|
||||
@@ -101,7 +101,11 @@ public class MogoADASController implements IMogoADASController {
|
||||
public void sendMsg(String msg) {
|
||||
Logger.d(TAG, "收到adas数据回调: " + msg);
|
||||
for (IMogoAdasDataCallback callback : adasDataCallbackList) {
|
||||
callback.onAdasDataCallback(msg);
|
||||
try {
|
||||
callback.onAdasDataCallback(msg);
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "sendMsg" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#DDDDDD"/>
|
||||
<corners android:radius="12px"/>
|
||||
</shape>
|
||||
Reference in New Issue
Block a user