This commit is contained in:
unknown
2020-07-22 18:13:02 +08:00
39 changed files with 380 additions and 94 deletions

View File

@@ -0,0 +1,36 @@
package com.mogo.module.common.wm;
import android.app.Dialog;
import android.content.Context;
import com.mogo.module.common.dialog.BaseFloatDialog;
import com.mogo.utils.logger.Logger;
/**
* 采用Dialog实现接口
*/
class DialogImpl implements IWindowManagerView {
private Dialog dialog;
@Override
public void init(WindowManagerView.WMViewParams params) {
Logger.d("DialogImpl", "init====");
dialog = new BaseFloatDialog(params.mContext);
dialog.setContentView(params.mContentView);
}
@Override
public boolean isShowing() {
return dialog.isShowing();
}
@Override
public void show() {
dialog.show();
}
@Override
public void hide() {
dialog.dismiss();
}
}

View File

@@ -0,0 +1,25 @@
package com.mogo.module.common.wm;
interface IWindowManagerView {
/**
* 初始化
* @param params contentView包装类
*/
void init(WindowManagerView.WMViewParams params);
/**
* 是否显示
* @return true - 显示中
*/
boolean isShowing();
/**
* 显示
*/
void show();
/**
* 隐藏
*/
void hide();
}

View File

@@ -0,0 +1,67 @@
package com.mogo.module.common.wm;
import android.content.Context;
import android.graphics.PixelFormat;
import android.os.Build;
import android.view.Gravity;
import android.view.WindowManager;
import com.mogo.module.common.utils.CarSeries;
import com.mogo.utils.WindowUtils;
/**
* 采用windowManager实现接口
*/
class WindowManagerImpl implements IWindowManagerView {
private WindowManager mWindowManager;
private WindowManager.LayoutParams mLayoutParams;
private WindowManagerView.WMViewParams mParams;
private boolean isShowing;
@Override
public void init(WindowManagerView.WMViewParams params) {
mParams = params;
mWindowManager = (WindowManager) mParams.mContext.getApplicationContext().getSystemService( Context.WINDOW_SERVICE );
mLayoutParams = new WindowManager.LayoutParams();
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ) {
mLayoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
} else {
mLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
}
mLayoutParams.format = PixelFormat.TRANSLUCENT;
mLayoutParams.gravity = Gravity.CENTER;
mLayoutParams.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
mLayoutParams.width = 1920;
mLayoutParams.height = 1080;
} else {
mLayoutParams.width = WindowUtils.getScreenWidth( mParams.mContext );
mLayoutParams.height = WindowUtils.getScreenHeight( mParams.mContext );
}
mLayoutParams.dimAmount = 0.5f;
mLayoutParams.x = 0;
mLayoutParams.y = 0;
}
@Override
public boolean isShowing() {
return isShowing;
}
@Override
public void show() {
if(!isShowing){
isShowing = true;
mWindowManager.addView(mParams.mContentView,mLayoutParams);
}
}
@Override
public void hide() {
if (isShowing && mParams != null) {
mWindowManager.removeView(mParams.mContentView);
isShowing = false;
}
}
}

View File

@@ -11,6 +11,7 @@ import android.view.WindowManager;
import androidx.annotation.IdRes;
import androidx.annotation.LayoutRes;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.module.common.utils.CarSeries;
import com.mogo.utils.WindowUtils;
@@ -23,89 +24,57 @@ import com.mogo.utils.WindowUtils;
public class WindowManagerView {
private WMViewParams mParams;
private boolean mIsShowing;
private WindowManager mWindowManager;
private WindowManager.LayoutParams mLayoutParams;
private WindowManagerView( WMViewParams params ) {
private IWindowManagerView managerView;
private WindowManagerView(WMViewParams params) {
this.mParams = params;
init();
}
private void init() {
mWindowManager = ( WindowManager ) mParams.mContext.getApplicationContext().getSystemService( Context.WINDOW_SERVICE );
mLayoutParams = new WindowManager.LayoutParams();
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ) {
mLayoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
} else {
mLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
}
mLayoutParams.format = PixelFormat.TRANSLUCENT;
mLayoutParams.gravity = Gravity.CENTER;
mLayoutParams.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
mLayoutParams.width = 1920;
mLayoutParams.height = 1080;
} else {
mLayoutParams.width = WindowUtils.getScreenWidth( mParams.mContext );
mLayoutParams.height = WindowUtils.getScreenHeight( mParams.mContext );
}
mLayoutParams.dimAmount = 0.5f;
mLayoutParams.x = 0;
mLayoutParams.y = 0;
managerView = new DialogImpl();
managerView.init(params);
// init();
}
public boolean isShowing() {
return mIsShowing;
return managerView.isShowing();
}
public < T extends View > T findViewById( @IdRes int id ) {
return mParams.mContentView.findViewById( id );
public <T extends View> T findViewById(@IdRes int id) {
return mParams.mContentView.findViewById(id);
}
public void show() {
if ( mIsShowing ) {
return;
}
mIsShowing = true;
mWindowManager.addView( mParams.mContentView, mLayoutParams );
managerView.show();
}
public void dismiss() {
if ( !mIsShowing ) {
return;
}
if ( mParams != null ) {
mWindowManager.removeViewImmediate( mParams.mContentView );
}
mIsShowing = false;
managerView.hide();
}
public static class Builder {
private WMViewParams mParams = null;
public Builder( Context context ) {
public Builder(Context context) {
mParams = new WMViewParams();
mParams.mContext = context;
}
public Builder contentView( View contentView ) {
public Builder contentView(View contentView) {
mParams.mContentView = contentView;
return this;
}
public Builder contentView( @LayoutRes int contentViewId ) {
mParams.mContentView = LayoutInflater.from( mParams.mContext ).inflate( contentViewId, null );
public Builder contentView(@LayoutRes int contentViewId) {
mParams.mContentView = LayoutInflater.from(mParams.mContext).inflate(contentViewId,
null);
return this;
}
public WindowManagerView build() {
if ( mParams.mContentView == null ) {
throw new NullPointerException( "WMViewParams#mContentView must not be null." );
if (mParams.mContentView == null) {
throw new NullPointerException("WMViewParams#mContentView must not be null.");
}
return new WindowManagerView( mParams );
return new WindowManagerView(mParams);
}
}

View File

@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<corners android:radius="@dimen/module_ext_common_corner" />
<gradient android:angle="135" android:endColor="#1C1E28" android:startColor="#242737" />
</shape>
</item>
<item>
<shape>
<corners android:radius="@dimen/module_ext_common_corner" />
<gradient android:angle="135" android:endColor="#3F435F" android:startColor="#2E3141" />
<gradient android:angle="135" android:endColor="#48495E" android:startColor="#616381" />
</shape>
</item>
</selector>

View File

@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<gradient android:angle="135" android:endColor="#ff113361" android:startColor="#ff124B98" android:type="linear" />
<corners android:radius="@dimen/module_ext_common_corner" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<gradient android:angle="135" android:endColor="#ff1e57a4" android:startColor="#ff1f7eff" android:type="linear" />

View File

@@ -21,6 +21,7 @@ import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.map.MapCenterPointStrategy;
import com.mogo.module.common.map.Scene;
import com.mogo.module.common.utils.CarSeries;
import com.mogo.module.main.cards.MogoModulesManager;
import com.mogo.module.main.service.MogoMainService;
import com.mogo.module.main.windowview.FloatingViewHandler;
@@ -30,7 +31,6 @@ import com.mogo.service.fragmentmanager.IMogoFragmentManager;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.service.map.IMogoMapService;
import com.mogo.service.module.IMogoModuleProvider;
import com.mogo.service.obu.IMogoObuManager;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.utils.logger.Logger;
import com.zhidao.autopilot.support.api.AutopilotServiceManage;
@@ -244,12 +244,21 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
super.onPause();
mMogoStatusManager.setMainPageResumeStatus( TAG, false );
mMogoStatusManager.setMainPageLaunchedStatus( TAG, false );
if ( !mIsHomeKeyDown || !DebugConfig.isLauncher() ) {
if ( shouldCloseADASPanel() ) {
mServiceApis.getAdasControllerApi().closeADAS();
}
mIsHomeKeyDown = false;
}
private boolean shouldCloseADASPanel(){
// m4 系列因为按home键会造成页面pause后resume造成adas panel 闪烁
// f 系列加上上滑返回桌面后会走 mIsHomeKeyDown = true但是不会造成页面pause
// 独立 app 任何情况下都需要隐藏 adas
return !mIsHomeKeyDown
|| CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X
|| !DebugConfig.isLauncher();
}
@Override
protected void onStop() {
super.onStop();

View File

@@ -14,7 +14,6 @@ import com.mogo.service.IMogoServiceApis;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.utils.logger.Logger;
import cn.kuwo.autosdk.api.KWAPI;
import cn.kuwo.autosdk.api.OnGetSongImgUrlListener;
@@ -43,14 +42,14 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
kwapi = KWAPI.createKWAPI(context, "auto");
kwapi.registerConnectedListener(b -> {
Logger.d(TAG, "onConnected: " + b);
Log.d(TAG, "onConnected: " + b);
Log.d(TAG, "onConnected: " + b);
isBind = b;
if (!isBind) {
mView.onMusicStopped();
}else{
PlayerStatus currentState = kwapi.getPlayerStatus();
Logger.d(TAG, "check current status: " + currentState);
Log.d(TAG, "check current status: " + currentState);
Log.d(TAG, "check current status: " + currentState);
if(currentState == PlayerStatus.BUFFERING||currentState == PlayerStatus.PLAYING){
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
@@ -62,13 +61,13 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
});
kwapi.registerExitListener(() -> {
Logger.d(TAG, "onExit===");
Log.d(TAG, "onExit===");
Log.d(TAG, "onExit===");
mView.onAppExit();
});
kwapi.registerPlayerStatusListener((playerStatus, music) -> {
Logger.d(TAG, "onPlayerStatusListener: " + playerStatus + " music: " + music.name);
Log.d(TAG, "onPlayerStatusListener: " + playerStatus + " music: " + music.name);
switch (playerStatus) {
case BUFFERING:
if (currentMedia.getMediaName() == null || !currentMedia.getMediaName().equals(music.name)) {
@@ -113,7 +112,7 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
@Override
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
if (isTrue) {
Logger.d(TAG, "onResume, isBind: " + isBind);
Log.d(TAG, "onResume, isBind: " + isBind);
Log.d(TAG, "onResume, isBind: " + isBind);
// 需要在resume时候判断绑定关系是否正常
if (!isBind) {
@@ -125,14 +124,14 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
// 当前处于绑定状态,且有音乐信息,需判断是否正在播放,进行界面刷新
Log.d(TAG, "step1==" + currentMusic.name);
if (kwapi.getPlayerStatus() == PlayerStatus.BUFFERING || kwapi.getPlayerStatus() == PlayerStatus.PLAYING) {
Logger.d(TAG, "当前可能正在播放音乐,需要更新=1=" + currentMusic.name);
Log.d(TAG, "当前可能正在播放音乐,需要更新=1=" + currentMusic.name);
currentMedia.setMediaName(currentMusic.name);
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
mView.onMediaInfoChanged(currentMedia);
mView.onMusicPlaying();
kwapi.getSongPicUrl(currentMusic, onGetSongImgUrlListener);
} else if (kwapi.getPlayerStatus() == PlayerStatus.INIT) {
Logger.d(TAG, "当前可能正在播放音乐,需要更新=3=" + currentMusic.name);
Log.d(TAG, "当前可能正在播放音乐,需要更新=3=" + currentMusic.name);
currentMedia.setMediaName(currentMusic.name);
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PAUSE_OR_STOP);
mView.onMediaInfoChanged(currentMedia);
@@ -142,14 +141,14 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
Log.d(TAG, "step2==media: " + currentMedia.getMediaName() + " " +
"musicName: " + currentMusic.name + " status: " + kwapi.getPlayerStatus());
if (kwapi.getPlayerStatus() == PlayerStatus.BUFFERING || kwapi.getPlayerStatus() == PlayerStatus.PLAYING) {
Logger.d(TAG, "当前可能正在播放音乐,需要更新=2=" + currentMusic.name);
Log.d(TAG, "当前可能正在播放音乐,需要更新=2=" + currentMusic.name);
currentMedia.setMediaName(currentMusic.name);
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
mView.onMediaInfoChanged(currentMedia);
mView.onMusicPlaying();
kwapi.getSongPicUrl(currentMusic, onGetSongImgUrlListener);
}else if (kwapi.getPlayerStatus() == PlayerStatus.INIT) {
Logger.d(TAG, "当前可能正在播放音乐,需要更新=4=" + currentMusic.name);
Log.d(TAG, "当前可能正在播放音乐,需要更新=4=" + currentMusic.name);
currentMedia.setMediaName(currentMusic.name);
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PAUSE_OR_STOP);
mView.onMediaInfoChanged(currentMedia);
@@ -237,16 +236,18 @@ public class KwPresenter extends BaseMediaPresenter<IMusicView> {
private OnGetSongImgUrlListener onGetSongImgUrlListener = new OnGetSongImgUrlListener() {
@Override
public void onGetSongImgUrlSucessed(Music music, String s) {
currentMedia.setMediaName(music.name);
currentMedia.setMediaImg(s);
Logger.d(TAG,
"onGetSongImgUrlSucessed: " + currentMedia);
handler.post(() -> mView.onMediaInfoChanged(currentMedia));
if(currentMedia.getPlayState() == MusicConstant.PLAY_STATE_PLAYING) {
currentMedia.setMediaName(music.name);
currentMedia.setMediaImg(s);
Log.d(TAG,
"onGetSongImgUrlSucessed: " + currentMedia);
handler.post(() -> mView.onMediaInfoChanged(currentMedia));
}
}
@Override
public void onGetSongImgUrlFailed(Music music, int i) {
Logger.e(TAG, "onGetSongImgUrlFailed: " + i);
Log.e(TAG, "onGetSongImgUrlFailed: " + i);
}
};

View File

@@ -1,6 +1,7 @@
package com.mogo.module.media.window;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
@@ -101,6 +102,7 @@ public class MediaWindow2 implements IMusicView {
int statusBarHeight = WindowUtils.getStatusBarHeight(mContext);
Logger.d(TAG,
"yPos: " + yPos + " xPos: " + xPos + " statusBarHeight: " + statusBarHeight);
Log.d(TAG, "addMediaWindoView");
FrameLayout.LayoutParams params =
new FrameLayout.LayoutParams((int) mContext.getResources().getDimension(R.dimen.module_media_pop_window_width), (int) mContext.getResources().getDimension(R.dimen.module_media_pop_window_height));
params.leftMargin = xPos;
@@ -204,6 +206,7 @@ public class MediaWindow2 implements IMusicView {
@Override
public void onMusicPlaying() {
Logger.d(TAG, "onMusicPlaying===" + mMediaInfoData);
Log.d(TAG, "onMusicPlaying===" + mMediaInfoData);
isFirstPlay = false;
updateWindowUI(false);
if (mWindowPlayPause != null) {
@@ -218,6 +221,7 @@ public class MediaWindow2 implements IMusicView {
@Override
public void onMusicPause() {
Logger.d(TAG, "onMusicPause: ===" + mMediaInfoData);
Log.d(TAG, "onMusicPause: ===" + mMediaInfoData);
if (mWindowPlayPause != null) {
mWindowPlayPause.setImageResource(R.drawable.module_media_window_pop_pause);
}
@@ -230,6 +234,7 @@ public class MediaWindow2 implements IMusicView {
@Override
public void onMusicStopped() {
Logger.d(TAG, "onMusicStopped===" + mMediaInfoData);
Log.d(TAG, "onMusicStopped===" + mMediaInfoData);
if (mWindowPlayPause != null) {
mWindowPlayPause.setImageResource(R.drawable.module_media_window_pop_pause);
}
@@ -244,6 +249,7 @@ public class MediaWindow2 implements IMusicView {
@Override
public void onMediaInfoChanged(MediaInfoData mediaInfoData) {
Logger.d(TAG, "onMediaInfoChanged: " + mediaInfoData);
Log.d(TAG, "onMediaInfoChanged:" + mediaInfoData);
mMediaInfoData = mediaInfoData;
addWindowView();
updateWindowUI();

View File

@@ -715,6 +715,7 @@ public class MogoServices implements IMogoMapListener,
break;
case ACC_STATUS:
if ( isTrue ) {
initLocationServiceProcess( mContext );
mADASController.showADAS();
refreshStrategy();
MarkerServiceHandler.getApis().getMapServiceApi().getSingletonLocationClient( mContext ).stop();

View File

@@ -3,6 +3,8 @@ package com.mogo.module.service.marker;
import android.content.Context;
import android.graphics.Rect;
import android.text.TextUtils;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.LinearInterpolator;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
@@ -11,6 +13,7 @@ import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
import com.mogo.module.common.ModuleNames;
import com.mogo.module.common.entity.MarkerCarPois;
import com.mogo.module.common.entity.MarkerCardResult;
@@ -34,6 +37,7 @@ import com.mogo.service.module.IMogoBizActionDoneListener;
import com.mogo.utils.ResourcesHelper;
import com.mogo.utils.ThreadPoolService;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.WorkThreadHandler;
import com.mogo.utils.logger.Logger;
import org.json.JSONArray;
@@ -368,15 +372,42 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
IMogoMarker mogoMarker = existCarMap.get( sn );
if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
Logger.d( TAG, "draw road condition, sn = %s", sn );
mogoMarker = drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH );
}
if ( mogoMarker != null ) {
mogoMarker.setVisible( true );
try {
post2AddAndStartAnimation( markerShowEntity, i * 100L );
} catch ( Exception e ) {
e.printStackTrace();
}
}
}
}
}
private void post2AddAndStartAnimation( MarkerShowEntity entity, long delay ) {
if ( entity == null ) {
return;
}
WorkThreadHandler.getInstance().postDelayed( () -> {
if ( entity == null ) {
return;
}
IMogoMarker marker = drawMapMarker( entity, ServiceConst.MARKER_Z_INDEX_HIGH );
marker.startScaleAnimationWithAlpha( 0, 1.2f, 0, 1.2f, 0f, 1f,300, new LinearInterpolator(), new OnMarkerAnimationListener() {
@Override
public void onAnimStart() {
Logger.d( TAG, " onAnimStart ---1----> " );
}
@Override
public void onAnimEnd() {
if ( marker.isDestroyed() ) {
return;
}
marker.startScaleAnimation( 1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null );
}
} );
}, delay );
}
/**
* S = (A ∩ B) B
* A ∩ B)作为旧列表需要保留的部分

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 B

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 B

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">20dp</dimen>
<dimen name="module_service_marker_dot_marginTop">8dp</dimen>
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
<dimen name="module_service_marker_bubble_width">100px</dimen>
<dimen name="module_service_marker_bubble_height">117px</dimen>
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">16dp</dimen>
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
<dimen name="module_service_marker_dot_marginTop">2dp</dimen>
<dimen name="module_service_marker_bubble_width">56px</dimen>
<dimen name="module_service_marker_bubble_height">65px</dimen>
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>

View File

@@ -64,6 +64,8 @@ public class LaucherShareDialog extends BaseFloatDialog implements View.OnClickL
public LaucherShareDialog(Context context) {
super(context);
// getWindow().setWindowAnimations(R.style.ShareDialogAnim);
this.mContext = context;
mApis = (IMogoServiceApis) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation(context);
mAnalytics = mApis.getAnalyticsApi();

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:interpolator="@android:anim/overshoot_interpolator"
android:fromXScale="0.0"
android:toXScale="1.0"
android:fromYScale="0.0"
android:toYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:fillAfter="true"
android:duration="400"/>
</set>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:interpolator="@android:anim/anticipate_overshoot_interpolator"
android:fromXScale="1.0"
android:toXScale="0.0"
android:fromYScale="1.0"
android:toYScale="0.0"
android:pivotX="50%"
android:pivotY="50%"
android:fillAfter="true"
android:duration="400"/>
</set>

View File

@@ -13,4 +13,9 @@
<item name="android:topDark">@color/all_transparent_white</item>
<item name="android:borderlessButtonStyle">@color/all_transparent_white</item>
</style>
<style name="ShareDialogAnim" parent="android:Animation" mce_bogus="1" >
<item name="android:windowEnterAnimation">@anim/module_share_dialog_enter_anim</item>
<item name="android:windowExitAnimation">@anim/module_share_dialog_exit_anim</item>
</style>
</resources>

View File

@@ -213,5 +213,8 @@ public class V2XSeekHelpScenario extends AbsV2XScenario<List<V2XMarkerEntity>> i
@Override
public void beforeViewRemoveAnim(View view) {
Logger.d(MODULE_NAME, "关闭 Window 开始");
// 重置场景提示的消息
setV2XMessageEntity(null);
clearPOI();
}
}