[2.13.0-merge]yakun and code style
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
package com.mogo.eagle.core.function.hmi.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.view.Gravity;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
|
||||
/**
|
||||
* 浮在各种wm上面的dialog基类,调用了window.setType
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class BaseFloatDialog extends Dialog {
|
||||
|
||||
private static final String TAG = "BaseFloatDialog";
|
||||
|
||||
public BaseFloatDialog(@NonNull Context context) {
|
||||
this(context, R.style.BaseFloatDialogStyle);
|
||||
}
|
||||
|
||||
public BaseFloatDialog(@NonNull Context context, int themeResId) {
|
||||
super(context, themeResId);
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
|
||||
addFlag();
|
||||
}
|
||||
}
|
||||
|
||||
private void addFlag() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
|
||||
} else {
|
||||
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
|
||||
}
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
|
||||
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
|
||||
| WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
CallerLogger.INSTANCE.d(TAG, "onShow====");
|
||||
super.show();
|
||||
setWindowSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
CallerLogger.INSTANCE.d( TAG, "onDismiss====");
|
||||
super.dismiss();
|
||||
}
|
||||
private void setWindowSize(){
|
||||
WindowManager.LayoutParams attributes = getWindow().getAttributes();
|
||||
attributes.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
attributes.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
FrameLayout content = (FrameLayout)findViewById(android.R.id.content);
|
||||
if(content!=null){
|
||||
ViewGroup rootView = (ViewGroup) content.getChildAt(0);
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) rootView.getLayoutParams();
|
||||
layoutParams.gravity = Gravity.CENTER;
|
||||
rootView.setLayoutParams(layoutParams);
|
||||
}
|
||||
getWindow().setAttributes(attributes);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.mogo.eagle.core.function.hmi.dialog;
|
||||
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* 采用Dialog实现接口
|
||||
*/
|
||||
class DialogImpl implements IWindowManagerView {
|
||||
private Dialog dialog;
|
||||
private View contentView;
|
||||
|
||||
@Override
|
||||
public void init(WindowManagerView.WMViewParams params) {
|
||||
dialog = new BaseFloatDialog(params.mContext);
|
||||
contentView = params.mContentView;
|
||||
dialog.setContentView(contentView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShowing() {
|
||||
return dialog.isShowing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTouchEvent(OnViewClickListener listener) {
|
||||
// do nothings.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(WindowManagerView.WMViewParams params) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hide() {
|
||||
/*
|
||||
* 取得view的父组件,然后移除view
|
||||
*/
|
||||
if (contentView != null) {
|
||||
((ViewGroup) contentView.getParent()).removeView(contentView);
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.mogo.eagle.core.function.hmi.dialog;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface IWindowManagerView {
|
||||
/**
|
||||
* 初始化
|
||||
*
|
||||
* @param params contentView包装类
|
||||
*/
|
||||
void init( WindowManagerView.WMViewParams params );
|
||||
|
||||
/**
|
||||
* 是否显示
|
||||
*
|
||||
* @return true - 显示中
|
||||
*/
|
||||
boolean isShowing();
|
||||
|
||||
/**
|
||||
* 支持手势拖动,该操作只支持触发点击操作
|
||||
*/
|
||||
void handleTouchEvent(OnViewClickListener listener);
|
||||
|
||||
/**
|
||||
* 显示
|
||||
*/
|
||||
void show();
|
||||
|
||||
/**
|
||||
* 更新界面位置或大小
|
||||
* @param params 具体参数
|
||||
*/
|
||||
void update(WindowManagerView.WMViewParams params);
|
||||
|
||||
/**
|
||||
* 刷新
|
||||
*/
|
||||
void update();
|
||||
|
||||
/**
|
||||
* 隐藏
|
||||
*/
|
||||
void hide();
|
||||
|
||||
public interface OnViewClickListener {
|
||||
void onClick( View view, float xPos, float yPos );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
package com.mogo.eagle.core.function.hmi.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-24
|
||||
* <p>
|
||||
* 显示在最上层的对话框
|
||||
*/
|
||||
public class WMDialog implements DialogInterface {
|
||||
|
||||
private WMDialogParams mParams;
|
||||
private WindowManagerView mWindowManagerView;
|
||||
|
||||
private WMDialog( WMDialogParams params ) {
|
||||
this.mParams = params;
|
||||
mWindowManagerView = new WindowManagerView.Builder( mParams.mContext ).contentView( R.layout.module_commons_layout_wm_dialog ).build();
|
||||
initViews();
|
||||
}
|
||||
|
||||
public void show() {
|
||||
mWindowManagerView.show();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
TextView ok = mWindowManagerView.findViewById( R.id.module_commons_wm_dialog_button_ok );
|
||||
TextView cancel = mWindowManagerView.findViewById( R.id.module_commons_wm_dialog_button_cancel );
|
||||
TextView content = mWindowManagerView.findViewById( R.id.module_commons_wm_dialog_content );
|
||||
|
||||
ok.setText( mParams.mOkButtonText );
|
||||
if ( mParams.mOnOkButtonClickListener != null ) {
|
||||
ok.setOnClickListener( view -> {
|
||||
if ( mParams.mOnOkButtonClickListener != null ) {
|
||||
mParams.mOnOkButtonClickListener.onClick( WMDialog.this, DialogInterface.BUTTON_POSITIVE );
|
||||
}
|
||||
} );
|
||||
}
|
||||
cancel.setText( mParams.mCancelButtonText );
|
||||
if ( mParams.mOnCancelButtonClickListener != null ) {
|
||||
cancel.setOnClickListener( view -> {
|
||||
if ( mParams.mOnCancelButtonClickListener != null ) {
|
||||
mParams.mOnCancelButtonClickListener.onClick( WMDialog.this, DialogInterface.BUTTON_NEGATIVE );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
content.setText( mParams.mContent );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
mWindowManagerView.dismiss();
|
||||
}
|
||||
|
||||
public boolean isShowing() {
|
||||
return mWindowManagerView.isShowing();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Context mContext;
|
||||
private WMDialogParams mParams;
|
||||
|
||||
public Builder( Activity activity ) {
|
||||
this.mContext = activity;
|
||||
mParams = new WMDialogParams();
|
||||
mParams.mContext = activity;
|
||||
}
|
||||
|
||||
public Builder setContent( CharSequence content ) {
|
||||
mParams.mContent = content;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setContent( @StringRes int content ) {
|
||||
mParams.mContent = mContext.getString( content );
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setOkButton( CharSequence buttonText, OnClickListener listener ) {
|
||||
mParams.mOkButtonText = buttonText;
|
||||
mParams.mOnOkButtonClickListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setOkButton( @StringRes int buttonText, OnClickListener listener ) {
|
||||
mParams.mOkButtonText = mContext.getText( buttonText );
|
||||
mParams.mOnOkButtonClickListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCancelButton( CharSequence buttonText, OnClickListener listener ) {
|
||||
mParams.mCancelButtonText = buttonText;
|
||||
mParams.mOnCancelButtonClickListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCancelButton( @StringRes int buttonText, OnClickListener listener ) {
|
||||
mParams.mCancelButtonText = mContext.getText( buttonText );
|
||||
mParams.mOnCancelButtonClickListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setOnDialogDismissListener( OnDismissListener onDialogDismissListener ) {
|
||||
mParams.mOnDialogDismissListener = onDialogDismissListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WMDialog build() {
|
||||
WMDialog dialog = new WMDialog( mParams );
|
||||
return dialog;
|
||||
}
|
||||
}
|
||||
|
||||
public static class WMDialogParams {
|
||||
|
||||
// public CharSequence mTitle;
|
||||
public CharSequence mOkButtonText;
|
||||
public CharSequence mCancelButtonText;
|
||||
public CharSequence mContent;
|
||||
public OnClickListener mOnOkButtonClickListener;
|
||||
public OnClickListener mOnCancelButtonClickListener;
|
||||
public OnDismissListener mOnDialogDismissListener;
|
||||
public Context mContext;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.mogo.eagle.core.function.hmi.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.os.Build;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
/**
|
||||
* 采用windowManager实现接口
|
||||
*/
|
||||
class WindowManagerImpl implements IWindowManagerView {
|
||||
|
||||
private WindowManager mWindowManager;
|
||||
private WindowManager.LayoutParams mLayoutParams;
|
||||
private WindowManagerView.WMViewParams mParams;
|
||||
private boolean isShowing;
|
||||
|
||||
private View rootView;
|
||||
|
||||
private float mLastX, mLastY;
|
||||
private int mOldOffsetX, mOldOffsetY;
|
||||
|
||||
@Override
|
||||
public void init( WindowManagerView.WMViewParams params ) {
|
||||
mParams = params;
|
||||
mWindowManager = ( WindowManager ) mParams.mContext.getApplicationContext().getSystemService( Context.WINDOW_SERVICE );
|
||||
generateLayoutParams();
|
||||
}
|
||||
|
||||
private void generateLayoutParams(){
|
||||
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 = mParams.mGravity;
|
||||
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;
|
||||
|
||||
mLayoutParams.width = mParams.mWidth;
|
||||
mLayoutParams.height = mParams.mHeight;
|
||||
mOldOffsetX = mLayoutParams.x = mParams.mX;
|
||||
mOldOffsetY = mLayoutParams.y = mParams.mY;
|
||||
mLayoutParams.dimAmount = 0.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShowing() {
|
||||
return isShowing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTouchEvent(OnViewClickListener listener) {
|
||||
mParams.mContentView.setOnTouchListener( ( v, event ) -> {
|
||||
final int action = event.getAction();
|
||||
float x = event.getX();
|
||||
float y = event.getY();
|
||||
if ( action == MotionEvent.ACTION_DOWN ) {
|
||||
mLastX = x;
|
||||
mLastY = y;
|
||||
} else if ( action == MotionEvent.ACTION_MOVE ) {
|
||||
mLayoutParams.x += ( int ) ( x - mLastX ) / 3; // 减小偏移量,防止过度抖动
|
||||
mLayoutParams.y += ( int ) ( y - mLastY ) / 3; // 减小偏移量,防止过度抖动
|
||||
mWindowManager.updateViewLayout( mParams.mContentView, mLayoutParams );
|
||||
} else if ( action == MotionEvent.ACTION_UP ) {
|
||||
int newOffsetX = mLayoutParams.x;
|
||||
int newOffsetY = mLayoutParams.y;
|
||||
// 只要按钮一动位置不是很大,就认为是点击事件
|
||||
if ( Math.abs( mOldOffsetX - newOffsetX ) <= 20
|
||||
&& Math.abs( mOldOffsetY - newOffsetY ) <= 20 ) {
|
||||
if ( listener != null ) {
|
||||
listener.onClick( mParams.mContentView, x, y );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
mOldOffsetX = newOffsetX;
|
||||
mOldOffsetY = newOffsetY;
|
||||
}
|
||||
return true;
|
||||
} );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
if ( !isShowing ) {
|
||||
isShowing = true;
|
||||
rootView = mParams.mContentView;
|
||||
mWindowManager.addView( mParams.mContentView, mLayoutParams );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(WindowManagerView.WMViewParams params) {
|
||||
if (isShowing) {
|
||||
mParams = params;
|
||||
generateLayoutParams();
|
||||
mWindowManager.updateViewLayout(rootView,mLayoutParams);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
if ( isShowing ) {
|
||||
mWindowManager.updateViewLayout(rootView,mLayoutParams);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hide() {
|
||||
if ( isShowing && mParams != null ) {
|
||||
mWindowManager.removeView( mParams.mContentView );
|
||||
isShowing = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.mogo.eagle.core.function.hmi.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.LayoutRes;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-05-21
|
||||
* <p>
|
||||
* 往 window manager 添加view
|
||||
*/
|
||||
public class WindowManagerView {
|
||||
|
||||
private WMViewParams mParams;
|
||||
|
||||
private IWindowManagerView mManagerView;
|
||||
|
||||
private WindowManagerView( WMViewParams params, IWindowManagerView view ) {
|
||||
this.mParams = params;
|
||||
mManagerView = view;
|
||||
view.init( params );
|
||||
}
|
||||
|
||||
public boolean isShowing() {
|
||||
return mManagerView.isShowing();
|
||||
}
|
||||
|
||||
public < T extends View > T findViewById( @IdRes int id ) {
|
||||
return mParams.mContentView.findViewById( id );
|
||||
}
|
||||
|
||||
public void attachTouchEvent( IWindowManagerView.OnViewClickListener listener ) {
|
||||
mManagerView.handleTouchEvent(listener);
|
||||
}
|
||||
|
||||
public void show() {
|
||||
mManagerView.show();
|
||||
}
|
||||
|
||||
public void dismiss() {
|
||||
mManagerView.hide();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private WMViewParams mParams = null;
|
||||
|
||||
public Builder( Context context ) {
|
||||
mParams = new WMViewParams();
|
||||
mParams.mContext = context;
|
||||
}
|
||||
|
||||
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 );
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder size( int width, int height ) {
|
||||
mParams.mWidth = width;
|
||||
mParams.mHeight = height;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder position( int x, int y ) {
|
||||
mParams.mX = x;
|
||||
mParams.mY = y;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder gravity( int gravity ) {
|
||||
mParams.mGravity = gravity;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认dialog实现
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public WindowManagerView build() {
|
||||
return showInDialog();
|
||||
}
|
||||
|
||||
public WindowManagerView showInDialog() {
|
||||
if ( mParams.mContentView == null ) {
|
||||
throw new NullPointerException( "WMViewParams#mContentView must not be null." );
|
||||
}
|
||||
return new WindowManagerView( mParams, new DialogImpl() );
|
||||
}
|
||||
|
||||
public WindowManagerView showInWindowManager() {
|
||||
if ( mParams.mContentView == null ) {
|
||||
throw new NullPointerException( "WMViewParams#mContentView must not be null." );
|
||||
}
|
||||
return new WindowManagerView( mParams, new WindowManagerImpl() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class WMViewParams {
|
||||
|
||||
public View mContentView;
|
||||
public Context mContext;
|
||||
public int mWidth;
|
||||
public int mHeight;
|
||||
public int mX;
|
||||
public int mY;
|
||||
public int mGravity;
|
||||
}
|
||||
|
||||
public void exchangeSizeAndPosition(int width, int height, int x, int y) {
|
||||
if (isShowing()) {
|
||||
mParams.mX = x;
|
||||
mParams.mY = y;
|
||||
mParams.mWidth = width;
|
||||
mParams.mHeight = height;
|
||||
mManagerView.update(mParams);
|
||||
}
|
||||
}
|
||||
|
||||
public void update(){
|
||||
if ( mManagerView != null) {
|
||||
mManagerView.update();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
|
||||
/**
|
||||
* V2X 预警广播接收。用于跨应用,跨进程,内部也可以通过这种方式弹出预警提示框
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.commons.mvp.BaseFragment
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.voice.*
|
||||
@@ -83,6 +84,7 @@ import com.mogo.eagle.core.function.hmi.ui.tools.MaskView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||
import com.mogo.eagle.core.function.main.utils.DisplayEffectsHelper
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.*
|
||||
@@ -96,7 +98,6 @@ import com.mogo.eagle.core.utilcode.reminder.api.impl.*
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.millis2String
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.module.common.enums.*
|
||||
import com.zhidao.support.adas.high.common.MogoReport.Code.Error.EMAP.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
@@ -133,7 +134,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
private var mSOPSettingView: SOPSettingView? = null
|
||||
|
||||
//StatusView
|
||||
private var statusBarViewFloat: WarningFloat.Builder? = null
|
||||
private var statusBarView: StatusBarView? = null
|
||||
|
||||
private var mNoticeFloat: WarningFloat.Builder? = null
|
||||
@@ -195,10 +195,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
//toggleStatusBarView()
|
||||
|
||||
initViewShowWithConfig()
|
||||
|
||||
val decorView = requireActivity().window.decorView as FrameLayout
|
||||
statusBarView = decorView.findViewWithTag<View>("status_bar") as StatusBarView?
|
||||
//设置StatusBar初始状态
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
statusBarView?.updateRightView(true, "demoMode", DemoModeView(requireContext()))
|
||||
@@ -592,6 +592,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
return HmiPresenter(this)
|
||||
}
|
||||
|
||||
override fun displayEffects() {
|
||||
DisplayEffectsHelper.getInstance().display()
|
||||
}
|
||||
|
||||
override fun setSpeedChartViewVisibility(visibility: Int) {
|
||||
viewSpeedChart?.visibility = visibility
|
||||
}
|
||||
@@ -746,52 +750,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleStatusBarView() {
|
||||
activity?.let{
|
||||
if(statusBarViewFloat!= null){
|
||||
WarningFloat.dismiss(statusBarViewFloat!!.config.floatTag, false)
|
||||
statusBarViewFloat = null
|
||||
statusBarView = null
|
||||
}else{
|
||||
if (statusBarView == null){
|
||||
statusBarView = StatusBarView(it)
|
||||
}
|
||||
val side = TOP
|
||||
val gravity = Gravity.TOP
|
||||
statusBarViewFloat = WarningFloat.with(it)
|
||||
.setTag("statusBarView")
|
||||
.setLayout(statusBarView!!)
|
||||
.setSidePattern(side)
|
||||
.setWindowWidth(ScreenUtils.getScreenWidth())
|
||||
.setWindowHeight(BarUtils.getStatusBarHeight())
|
||||
.setGravity(gravity, 0)
|
||||
.setImmersionStatusBar(true)
|
||||
.setAnimator(object : DefaultAnimator() {
|
||||
override fun enterAnim(
|
||||
view: View,
|
||||
params: LayoutParams,
|
||||
windowManager: WindowManager,
|
||||
sidePattern: SidePattern
|
||||
): Animator? =
|
||||
super.enterAnim(view, params, windowManager, sidePattern)
|
||||
?.apply {
|
||||
interpolator = LinearInterpolator()
|
||||
}
|
||||
|
||||
override fun exitAnim(
|
||||
view: View,
|
||||
params: LayoutParams,
|
||||
windowManager: WindowManager,
|
||||
sidePattern: SidePattern
|
||||
): Animator? =
|
||||
super.exitAnim(view, params, windowManager, sidePattern)
|
||||
?.setDuration(200)
|
||||
})
|
||||
.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
|
||||
@@ -1,49 +1,54 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.bindingcar
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
|
||||
|
||||
/**
|
||||
* @brief 修改车辆对话框
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class ModifyBindingCarDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver{
|
||||
class ModifyBindingCarDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver {
|
||||
|
||||
private val TAG = "BindingCarDialog"
|
||||
private var confirmTv: TextView? = null
|
||||
private var cancleTv: TextView? = null
|
||||
private var cancelTv: TextView? = null
|
||||
|
||||
private var mServiceApis: IMogoServiceApis? = null
|
||||
private val statusChangedListenerForCheckNotice = IMogoStatusChangedListener { descriptor, isTrue ->
|
||||
if (descriptor == StatusDescriptor.MAIN_PAGE_IS_BACKGROUND) {
|
||||
dismiss()
|
||||
private val statusChangedListenerForCheckNotice =
|
||||
IMogoStatusChangedListener { descriptor, isTrue ->
|
||||
if (descriptor == StatusDescriptor.MAIN_PAGE_IS_BACKGROUND) {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
setContentView(R.layout.dialog_modify_bindingcar)
|
||||
setCanceledOnTouchOutside(true)
|
||||
|
||||
confirmTv = findViewById(R.id.tv_bindingcar_confirm)
|
||||
cancleTv = findViewById(R.id.tv_bindingcar_cancel)
|
||||
cancelTv = findViewById(R.id.tv_bindingcar_cancel)
|
||||
|
||||
confirmTv?.setOnClickListener {
|
||||
modifyBindingcar()
|
||||
}
|
||||
|
||||
cancleTv?.setOnClickListener {
|
||||
cancelTv?.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(
|
||||
TAG,
|
||||
StatusDescriptor.MAIN_PAGE_IS_BACKGROUND,
|
||||
statusChangedListenerForCheckNotice
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,6 +67,11 @@ class ModifyBindingCarDialog(context: Context) : BaseFloatDialog(context), Lifec
|
||||
|
||||
override fun dismiss() {
|
||||
super.dismiss()
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(
|
||||
TAG,
|
||||
StatusDescriptor.MAIN_PAGE_IS_BACKGROUND,
|
||||
statusChangedListenerForCheckNotice
|
||||
)
|
||||
}
|
||||
|
||||
fun showModifyBindingcarDialog() {
|
||||
|
||||
@@ -3,13 +3,13 @@ package com.mogo.eagle.core.function.hmi.ui.bindingcar
|
||||
import android.content.Context
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
|
||||
|
||||
/**
|
||||
@@ -20,9 +20,8 @@ class ToBindingCarDialog(context: Context) : BaseFloatDialog(context), Lifecycle
|
||||
|
||||
private val TAG = "ToBindingCarDialog"
|
||||
private var confirmTv: TextView? = null
|
||||
private var cancleTv: TextView? = null
|
||||
private var cancelTv: TextView? = null
|
||||
|
||||
private var mServiceApis: IMogoServiceApis? = null
|
||||
private val statusChangedListenerForCheckNotice = IMogoStatusChangedListener { descriptor, isTrue ->
|
||||
if (descriptor == StatusDescriptor.MAIN_PAGE_IS_BACKGROUND) {
|
||||
dismiss()
|
||||
@@ -34,15 +33,21 @@ class ToBindingCarDialog(context: Context) : BaseFloatDialog(context), Lifecycle
|
||||
setCanceledOnTouchOutside(true)
|
||||
|
||||
confirmTv = findViewById(R.id.tv_to_bindingcar_confirm)
|
||||
cancleTv = findViewById(R.id.tv_to_bindingcar_cancel)
|
||||
cancelTv = findViewById(R.id.tv_to_bindingcar_cancel)
|
||||
|
||||
confirmTv?.setOnClickListener {
|
||||
toBindingcar()
|
||||
}
|
||||
|
||||
cancleTv?.setOnClickListener {
|
||||
cancelTv?.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(
|
||||
TAG,
|
||||
StatusDescriptor.MAIN_PAGE_IS_BACKGROUND,
|
||||
statusChangedListenerForCheckNotice
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,6 +66,11 @@ class ToBindingCarDialog(context: Context) : BaseFloatDialog(context), Lifecycle
|
||||
|
||||
override fun dismiss() {
|
||||
super.dismiss()
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(
|
||||
TAG,
|
||||
StatusDescriptor.MAIN_PAGE_IS_BACKGROUND,
|
||||
statusChangedListenerForCheckNotice
|
||||
)
|
||||
}
|
||||
|
||||
fun showToBindingcarDialog() {
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.bindingcar
|
||||
|
||||
import android.content.Context
|
||||
import android.opengl.Visibility
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
|
||||
/**
|
||||
* @brief APP升级提示弹框
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver{
|
||||
class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver {
|
||||
|
||||
private val TAG = "UpgradeAppDialog"
|
||||
private var confirmTv: TextView? = null
|
||||
@@ -70,7 +65,13 @@ class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleOb
|
||||
}
|
||||
|
||||
// 升级类型 1:提示升级 2:静默升级 3:强制升级
|
||||
fun showUpgradeAppDialog(name: String, url: String, title: String, content: String, installType: String) {
|
||||
fun showUpgradeAppDialog(
|
||||
name: String,
|
||||
url: String,
|
||||
title: String,
|
||||
content: String,
|
||||
installType: String
|
||||
) {
|
||||
if (isShowing) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.model.VideoOptionModel
|
||||
|
||||
@@ -18,7 +18,7 @@ import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst;
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideRoundedCornersTransform;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform;
|
||||
import com.mogo.eagle.core.utilcode.util.BitmapHelper;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
|
||||
|
||||
@@ -7,19 +7,19 @@ import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.BitmapHelper
|
||||
import com.mogo.eagle.core.widget.media.video.NoticeSimpleVideoPlayer
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack
|
||||
@@ -94,13 +94,13 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context), LifecycleO
|
||||
playVideo(mVideoUrl)
|
||||
}
|
||||
|
||||
mServiceApis = MogoApisHandler.getInstance().apis
|
||||
mServiceApis?.statusManagerApi?.registerStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForCheckNotice)
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForCheckNotice)
|
||||
}
|
||||
|
||||
|
||||
override fun dismiss() {
|
||||
super.dismiss()
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForCheckNotice)
|
||||
stopLive()
|
||||
}
|
||||
|
||||
@@ -125,7 +125,9 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context), LifecycleO
|
||||
pushImageView?.let {
|
||||
GlideApp.with(context).load(noticeNormal.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f, GlideRoundedCornersTransform.CornerType.ALL)
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(it)
|
||||
}
|
||||
|
||||
@@ -191,8 +193,12 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context), LifecycleO
|
||||
playImageView!!.visibility = View.VISIBLE
|
||||
playImageView!!.setImageResource(R.drawable.notice_video_play)
|
||||
thumbnailImageView!!.visibility = View.VISIBLE
|
||||
GlideApp.with(context).load(firstbitmap).optionalTransform(GlideRoundedCornersTransform(
|
||||
20f, GlideRoundedCornersTransform.CornerType.ALL)).into(thumbnailImageView!!)
|
||||
GlideApp.with(context).load(firstbitmap).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(thumbnailImageView!!)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst;
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideRoundedCornersTransform;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,27 +15,25 @@ import androidx.recyclerview.widget.StaggeredGridLayoutManager;
|
||||
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.module.status.StatusDescriptor;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData;
|
||||
import com.mogo.eagle.core.data.notice.NoticeValue;
|
||||
import com.mogo.eagle.core.function.api.notice.NoticeNetCallBack;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.call.notice.CallerNoticeManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideRoundedCornersTransform;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform;
|
||||
import com.mogo.eagle.core.utilcode.mogo.imageloader.MogoImageView;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.BitmapHelper;
|
||||
import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
|
||||
import com.mogo.eagle.core.widget.media.video.NoticeSimpleSmallVideoPlayer;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.imageloader.MogoImageView;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog;
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager;
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
|
||||
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack;
|
||||
@@ -64,9 +62,8 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
|
||||
private TextView refuse;//拒绝
|
||||
private TextView connect;//连接
|
||||
private NoticeTrafficAdapter adapter;
|
||||
private final ArrayList dataArrayList = new ArrayList();
|
||||
private final ArrayList<NoticeValue> dataArrayList = new ArrayList<>();
|
||||
private NoticeTrafficStyleInfo.NoticeTrafficAccountInfo mTrafficStyleInfo;
|
||||
private IMogoServiceApis mServiceApis;
|
||||
|
||||
public NoticeTrafficDialog(@NonNull Context context, NoticeTrafficStylePushData pushData) {
|
||||
super(context);
|
||||
@@ -84,8 +81,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
|
||||
setCanceledOnTouchOutside(true);
|
||||
playerShow();//视频播放器及接操作按钮
|
||||
recyclerVie();//详情信息列表
|
||||
mServiceApis = MogoApisHandler.getInstance().getApis();
|
||||
mServiceApis.getStatusManagerApi().registerStatusChangedListener(M_HMI + TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForNotice);
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(M_HMI + TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForNotice);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,7 +165,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
|
||||
* 开启自动驾驶
|
||||
*/
|
||||
private void startAutoPilot() {
|
||||
if (mTrafficStyleInfo != null){
|
||||
if (mTrafficStyleInfo != null) {
|
||||
AutopilotControlParameters parameters = new AutopilotControlParameters();
|
||||
parameters.isSpeakVoice = false;
|
||||
parameters.vehicleType = 10;
|
||||
@@ -356,13 +352,10 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
|
||||
*/
|
||||
private void requestTrafficInfo() {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "requestTrafficInfo");
|
||||
CallerNoticeManager.getNoticeProvider().requestAccidentInfo(mPushData.getInfoId(), MoGoAiCloudClientConfig.getInstance().getSn(), new NoticeNetCallBack() {
|
||||
@Override
|
||||
public void callBackWithResult(NoticeTrafficStyleInfo trafficInfo) {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "交通事故详情::" + trafficInfo);
|
||||
mTrafficStyleInfo = trafficInfo.getResult().getAccidentInfo();
|
||||
infoRefresh(mTrafficStyleInfo);
|
||||
}
|
||||
CallerNoticeManager.getNoticeProvider().requestAccidentInfo(mPushData.getInfoId(), MoGoAiCloudClientConfig.getInstance().getSn(), trafficInfo -> {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "交通事故详情::" + trafficInfo);
|
||||
mTrafficStyleInfo = trafficInfo.getResult().getAccidentInfo();
|
||||
infoRefresh(mTrafficStyleInfo);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -445,6 +438,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
|
||||
public void dismiss() {
|
||||
super.dismiss();
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "trafficDialog dismiss");
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(M_HMI + TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForNotice);
|
||||
releasePlayer();
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ import com.mogo.map.MogoMap
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.mogo.module.service.routeoverlay.*
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.*
|
||||
import com.zhidao.easysocket.utils.L
|
||||
import com.zhidao.support.adas.high.other.permission.BackgrounderPermission
|
||||
import com.zhjt.mogo_core_function_devatools.env.*
|
||||
|
||||
@@ -17,8 +17,7 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.module.service.routeoverlay.RouteStrategy
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.*
|
||||
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.content.Context
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.content.Context
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import kotlinx.android.synthetic.main.view_autopilot_status.view.*
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.*
|
||||
import android.util.*
|
||||
import android.view.*
|
||||
import android.widget.*
|
||||
import com.mogo.commons.*
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.*
|
||||
import com.mogo.map.*
|
||||
import com.mogo.map.uicontroller.*
|
||||
import com.mogo.module.common.constants.*
|
||||
import com.mogo.map.MogoMapUIController
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import kotlinx.android.synthetic.main.view_perspective_switch.view.*
|
||||
|
||||
/**
|
||||
@@ -34,17 +32,20 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
if (MogoMapUIController.getInstance().currentMapVisualAngle.isLongSight) {
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .visibleAllMarkers()
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
MogoMapUIController.getInstance()
|
||||
.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_normal)
|
||||
} else if (MogoMapUIController.getInstance().currentMapVisualAngle.isMediumSight) {
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .inVisibleWithoutMarkers(DataTypes.TYPE_MARKER_ADAS)
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null)
|
||||
MogoMapUIController.getInstance()
|
||||
.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_faster)
|
||||
} else {
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .visibleAllMarkers()
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
MogoMapUIController.getInstance()
|
||||
.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
|
||||
textSwitch.setText(R.string.module_map_model_normal)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,10 @@ import com.kwai.koom.base.MonitorManager;
|
||||
import com.kwai.koom.nativeoom.leakmonitor.LeakMonitor;
|
||||
import com.kwai.koom.nativeoom.leakmonitor.LeakMonitorConfig;
|
||||
import com.kwai.koom.nativeoom.leakmonitor.LeakRecord;
|
||||
import com.mogo.commons.analytics.AnalyticsUtils;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.commons.mvp.BaseFragment;
|
||||
import com.mogo.commons.mvp.MvpActivity;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
@@ -58,10 +60,6 @@ import com.mogo.map.listener.MogoMapListenerHandler;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.fragmentmanager.FragmentStackTransactionListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.rousetime.android_startup.StartupManager;
|
||||
import com.rousetime.android_startup.model.LoggerLevel;
|
||||
import com.rousetime.android_startup.model.StartupConfig;
|
||||
@@ -85,15 +83,11 @@ import system_master.SystemStatusInfo;
|
||||
*/
|
||||
public class MainActivity extends MvpActivity<MainView, MainPresenter> implements MainView,
|
||||
IMogoLocationListener,
|
||||
FragmentStackTransactionListener,
|
||||
IMoGoAutopilotStatusListener {
|
||||
|
||||
protected static final String TAG = "MainActivity";
|
||||
private static final int REQUEST_CODE_DIALOG = 100;
|
||||
|
||||
protected IMogoServiceApis mServiceApis;
|
||||
protected IMogoStatusManager mMogoStatusManager;
|
||||
|
||||
protected FrameLayout mFloatingLayout;
|
||||
protected View mCoverUpLayout;
|
||||
|
||||
@@ -103,7 +97,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
private RecyclerView mConnectInfoRV;
|
||||
private ConnInfoAdapter mConnAdapter;
|
||||
private List<AutopilotStatusInfo> dataList = new ArrayList<>();
|
||||
private final List<AutopilotStatusInfo> dataList = new ArrayList<>();
|
||||
private int mLastStatus = 0x00;
|
||||
private boolean isFloatingLayerHidden = false;
|
||||
|
||||
@@ -218,16 +212,12 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
properties.put("app_launch_hotStartTime", hotStartTime);
|
||||
}
|
||||
}
|
||||
MogoApisHandler.getInstance().getApis().getAnalyticsApi().track("app_launch_time", properties);
|
||||
AnalyticsUtils.track("app_launch_time", properties);
|
||||
}
|
||||
}
|
||||
|
||||
private void init() {
|
||||
if (mServiceApis == null) {
|
||||
mServiceApis = MogoApisHandler.getInstance().getApis();
|
||||
}
|
||||
mMogoStatusManager = mServiceApis.getStatusManagerApi();
|
||||
mMogoStatusManager.setMainPageLaunchedStatus(TAG, true);
|
||||
MogoStatusManager.getInstance().setMainPageLaunchedStatus(TAG, true);
|
||||
}
|
||||
|
||||
private void initConnectInfoRV() {
|
||||
@@ -275,7 +265,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
loadFunctionFragment();
|
||||
|
||||
// TODO 这里临时兼容进入VR模式,标记状态机。有些业务(OCH)会根据状态判断加载
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode(TAG, true);
|
||||
MogoStatusManager.getInstance().setVrMode(TAG, true);
|
||||
// 设置地图样式
|
||||
MogoMapListenerHandler.getInstance().onMapModeChanged(EnumMapUI.MAP_STYLE_DAY_VR);
|
||||
});
|
||||
@@ -286,21 +276,11 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
loadFunctionMapView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTransaction(int size) {
|
||||
if (size == 0) {
|
||||
showLayout();
|
||||
} else if (size == 1) {
|
||||
hideLayout();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载其它模块
|
||||
*/
|
||||
protected void loadOthersModules() {
|
||||
// 加载地图,触发地图加载完毕回调,在初始化其他卡片模块,保证卡片模块可以正确获取地图相关服务。
|
||||
MogoModulesManager.getInstance().loadModules();
|
||||
MogoModulesManager.getInstance().loadFunctionModules();
|
||||
mPresenter.delayOperations();
|
||||
MogoModulesManager.getInstance().loadFunctionModulesServer();
|
||||
@@ -317,8 +297,8 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
* 启动后台服务
|
||||
*/
|
||||
private void startBaseService() {
|
||||
Intent intentMainServicee = new Intent(this, MogoMainService.class);
|
||||
startService(intentMainServicee);
|
||||
Intent intentMainService = new Intent(this, MogoMainService.class);
|
||||
startService(intentMainService);
|
||||
|
||||
// USB 摄像头行车记录仪进程
|
||||
// Intent intentCarcorderService = new Intent(this, CarcorderService.class);
|
||||
@@ -404,23 +384,20 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
mMogoStatusManager.setMainPageResumeStatus(TAG, true);
|
||||
mMogoStatusManager.setMainPageIsBackgroundStatus(TAG, false);
|
||||
MogoStatusManager.getInstance().setMainPageResumeStatus(TAG, true);
|
||||
MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
mMogoStatusManager.setMainPageResumeStatus(TAG, false);
|
||||
MogoStatusManager.getInstance().setMainPageResumeStatus(TAG, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
if (mMogoStatusManager != null) {
|
||||
mMogoStatusManager.setMainPageIsBackgroundStatus(TAG, true);
|
||||
}
|
||||
MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -431,15 +408,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
mPresenter.handleSchemeIntent(intent, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoServiceApis getApis() {
|
||||
if (mServiceApis == null) {
|
||||
mServiceApis = MogoApisHandler.getInstance().getApis();
|
||||
}
|
||||
return mServiceApis;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -492,17 +460,16 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
listenerRegister.unregisterMarkerClickListener();
|
||||
listenerRegister.unregisterHostMapListener();
|
||||
}
|
||||
mMogoStatusManager.setMainPageLaunchedStatus(TAG, false);
|
||||
mMogoStatusManager.setMainPageIsBackgroundStatus(TAG, false);
|
||||
|
||||
IMogoMapUIController mapUIController = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
if (mapUIController != null) {
|
||||
mapUIController.destroy();
|
||||
}
|
||||
MogoStatusManager.getInstance().setMainPageLaunchedStatus(TAG, false);
|
||||
MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, false);
|
||||
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "destroy.");
|
||||
ContextHolderUtil.releaseContext();
|
||||
MogoModulesManager.getInstance().onDestroy();
|
||||
SchemeIntent.getInstance().clear();
|
||||
FloatingViewHandler.clear();
|
||||
ProcessUtils.killAllBackgroundProcesses();
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.FrameLayout;
|
||||
@@ -22,12 +21,13 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.module.intent.IMogoIntentListener;
|
||||
import com.mogo.commons.module.intent.IntentManager;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.main.moujie.BluetoothMonitorReceiver;
|
||||
@@ -36,8 +36,6 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.rousetime.android_startup.model.CostTimesModel;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
import com.zhjt.service.chain.TracingConstants;
|
||||
@@ -48,7 +46,6 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.Timer;
|
||||
@@ -73,7 +70,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
|
||||
private BluetoothMonitorReceiver mBluetoothReceiver = null;
|
||||
private BluetoothAdapter mBluetoothAdapter;
|
||||
// private List<BluetoothDevice> mAreadlyConnectedList = new ArrayList<>();//已连接设备集合
|
||||
// private List<BluetoothDevice> mAreadlyConnectedList = new ArrayList<>();//已连接设备集合
|
||||
private int numberA = 0;
|
||||
private boolean isLongPressA = false;
|
||||
private int numberB = 0;
|
||||
@@ -123,7 +120,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
getApis().getIntentManagerApi().registerIntentListener(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this);
|
||||
IntentManager.getInstance().registerIntentListener(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this);
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.INSTANCE.addListener(TAG, this);
|
||||
//ActivityLifecycleManager.getInstance().setAppActive(true);
|
||||
@@ -138,7 +135,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
getApis().getIntentManagerApi().unregisterIntentListener(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this);
|
||||
IntentManager.getInstance().unregisterIntentListener(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this);
|
||||
//ActivityLifecycleManager.getInstance().setAppActive(false);
|
||||
}
|
||||
|
||||
@@ -381,7 +378,6 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
|
||||
/**
|
||||
* 查找蓝牙连接过的蓝牙设备
|
||||
*
|
||||
*/
|
||||
private void showBondedDevice(BluetoothAdapter bluetoothAdapter) {
|
||||
// mAreadlyConnectedList.clear();
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.elegant.utils.UiThreadHandler;
|
||||
import com.mogo.cloud.socket.SocketBuildConfig;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.module.MogoModule;
|
||||
import com.mogo.commons.module.MogoModulePaths;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig;
|
||||
@@ -17,7 +19,6 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.function.api.chat.biz.ChatConsts;
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager;
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.notice.PushUIConstants;
|
||||
import com.mogo.eagle.core.function.overview.OverviewDb;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
|
||||
@@ -25,9 +26,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
|
||||
import com.mogo.map.MapApiPath;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.CpuInfo;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MemInfo;
|
||||
@@ -138,7 +136,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModuleFunction(new MogoModule("/och/api", "IMoGoFunctionProvider"));
|
||||
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MapApiPath.PATH, "CustomMapApiBuilder"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY));
|
||||
// MogoModulePaths.addBaseModule(new MogoModule(V2XConst.PATH_V2X_UI, V2XConst.MODULE_NAME));
|
||||
|
||||
// OBU 模块
|
||||
@@ -155,8 +152,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider"));
|
||||
// 自动驾驶系统检测模块
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_CHECK, "CheckProvider"));
|
||||
// 推送模块
|
||||
MogoModulePaths.addModule(new MogoModule(PushUIConstants.PATH, "PUSH_UI"));
|
||||
// 绑定车辆
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_BINDING_CAR, "IMoGoBindingcarProvider"));
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.main;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@@ -43,7 +42,6 @@ public class MainPresenter extends Presenter<MainView> {
|
||||
|
||||
public MainPresenter(MainView view) {
|
||||
super(view);
|
||||
SchemeIntent.getInstance().init(getContext(), mView.getApis());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -109,7 +107,4 @@ public class MainPresenter extends Presenter<MainView> {
|
||||
mMsgHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
public void handleSchemeIntent(Intent intent, boolean isOnNewIntent) {
|
||||
SchemeIntent.getInstance().handle(intent, isOnNewIntent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,4 @@ public interface MainView extends IView {
|
||||
*/
|
||||
void loadModules();
|
||||
|
||||
/**
|
||||
* 接口水龙头
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoServiceApis getApis();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,204 +0,0 @@
|
||||
package com.mogo.eagle.core.function.main;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.CommonUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-20
|
||||
* <p>
|
||||
* scheme 意图处理
|
||||
* <p>
|
||||
* 导航:adb shell am start -d "mogo://launcher/main/switch2?type=navi'&'lon=116.327007'&'lat=39.977639"
|
||||
*/
|
||||
public class SchemeIntent implements IMogoStatusChangedListener {
|
||||
|
||||
private static final String TAG = "SchemeIntent";
|
||||
|
||||
public static final String TYPE_NAVI = "navi";
|
||||
|
||||
public static final String TYPE_SEARCH_ROAD_CONDITION = "search-road-condition";
|
||||
|
||||
public static final String TYPE_LAUNCH = "launch";
|
||||
|
||||
public static final String TYPE_SHOW_ONLINE_CAR_PANEL = "showOnlineCarPanel";
|
||||
|
||||
public static final String TYPE_SHOW_SHARE_PANEL = "showSharePanel";
|
||||
public static final String TYPE_SHOW_HISTORY_PANEL = "showHistoryPanel";
|
||||
public static final String TYPE_SHOW_SURROUNDING_PANEL = "showSurroundingPanel";
|
||||
|
||||
private IMogoServiceApis mApis;
|
||||
private Context mContext;
|
||||
|
||||
private IntentWrapper mNextIntent;
|
||||
|
||||
private static class IntentWrapper {
|
||||
public Intent mIntent;
|
||||
public long mDelay;
|
||||
|
||||
public IntentWrapper(Intent intent, long delay) {
|
||||
this.mIntent = intent;
|
||||
this.mDelay = delay;
|
||||
}
|
||||
}
|
||||
|
||||
private static volatile SchemeIntent sInstance;
|
||||
|
||||
private SchemeIntent() {
|
||||
}
|
||||
|
||||
public static SchemeIntent getInstance() {
|
||||
if (sInstance == null) {
|
||||
synchronized (SchemeIntent.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new SchemeIntent();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
public void init(Context context, IMogoServiceApis apis) {
|
||||
mContext = context;
|
||||
mApis = apis;
|
||||
mApis.getStatusManagerApi().registerStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_RESUME, this);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
mApis.getStatusManagerApi().unregisterStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_RESUME, this);
|
||||
mContext = null;
|
||||
mApis = null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理scheme
|
||||
*
|
||||
* @param intent 跳转的intent
|
||||
* @param isOnNewIntent 根据这个参数判断是从onCreate过来还是从onNewIntent过来,从而可以在{@link #isDelay(Intent, boolean)}里面确定延时逻辑,如果是从onNewIntent过来是不需要延时的
|
||||
*/
|
||||
public void handle(Intent intent, boolean isOnNewIntent) {
|
||||
if (intent == null || intent.getData() == null) {
|
||||
return;
|
||||
}
|
||||
Uri target = intent.getData();
|
||||
String path = target.getPath();
|
||||
if (path == null || path.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mApis.getStatusManagerApi().isMainPageOnResume()) {
|
||||
long delay = 0L;
|
||||
if (isDelay(intent, isOnNewIntent)) {
|
||||
delay = 5_000L;
|
||||
}
|
||||
mNextIntent = new IntentWrapper(intent, delay);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (path) {
|
||||
case "/main/switch2":
|
||||
handleSwitch2Action(target);
|
||||
break;
|
||||
case "/main/share":
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "收到打开分享框的scheme,准备打开分享框");
|
||||
// Map<String, Object> properties = new HashMap<>();
|
||||
// properties.put("from", "1");
|
||||
// mApis.getAnalyticsApi().track("v2x_share_click", properties);
|
||||
// mApis.getShareManager().showShareDialog();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
mNextIntent = null;
|
||||
}
|
||||
|
||||
private boolean isDelay(Intent intent, boolean isOnNewIntent) {
|
||||
if (isOnNewIntent || intent == null || intent.getData() == null) {
|
||||
return false;
|
||||
}
|
||||
Uri target = intent.getData();
|
||||
String type = target.getQueryParameter("type");
|
||||
return TextUtils.equals(TYPE_NAVI, type) || TextUtils.equals(TYPE_SHOW_SHARE_PANEL, type);
|
||||
}
|
||||
|
||||
private void handleSwitch2Action(Uri target) {
|
||||
String type = target.getQueryParameter("type");
|
||||
if (TextUtils.isEmpty(type)) {
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "语音打开事件面板" + type);
|
||||
switch (type) {
|
||||
case TYPE_LAUNCH:
|
||||
handleLaunchIntent(target);
|
||||
break;
|
||||
case TYPE_SHOW_HISTORY_PANEL:
|
||||
handleShowEventPanel(0);
|
||||
break;
|
||||
case TYPE_SHOW_SURROUNDING_PANEL:
|
||||
handleShowEventPanel(1);
|
||||
break;
|
||||
case TYPE_SHOW_SHARE_PANEL:
|
||||
handleShowEventPanel(2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void handleLaunchIntent(Uri uri) {
|
||||
String type = uri.getQueryParameter("channelType");
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("appname", CommonUtils.getAppName(mContext));
|
||||
properties.put("appversion", CommonUtils.getVersionName(mContext));
|
||||
properties.put("from", type);
|
||||
mApis.getAnalyticsApi().track("appenterfront", properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* 语音打开事件面板
|
||||
*/
|
||||
private void handleShowEventPanel(int item) {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "语音打开事件面板" + item);
|
||||
//mApis.getEventPanelManager().showPanelWithSelectedItem(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
||||
if (descriptor == StatusDescriptor.MAIN_PAGE_RESUME) {
|
||||
if (mNextIntent == null) {
|
||||
return;
|
||||
}
|
||||
if (isTrue) {
|
||||
// 保证回到桌面后在开始该规划路线。
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
if (mNextIntent == null) {
|
||||
return;
|
||||
}
|
||||
handle(mNextIntent.mIntent, false);
|
||||
}, mNextIntent.mDelay);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,11 +8,6 @@ package com.mogo.eagle.core.function.main.cards;
|
||||
*/
|
||||
public interface MogoModulesHandler {
|
||||
|
||||
/**
|
||||
* 加载模块
|
||||
*/
|
||||
void loadModules();
|
||||
|
||||
/**
|
||||
* 架构升级v1.1加载功能模块
|
||||
*/
|
||||
@@ -27,7 +22,6 @@ public interface MogoModulesHandler {
|
||||
* 加载基本服务模块,需要不启动页面就能运行
|
||||
* <p>
|
||||
* 1. v2x
|
||||
* 2. mogo-module-service
|
||||
*/
|
||||
void loadBaseModule();
|
||||
|
||||
|
||||
@@ -5,18 +5,14 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.module.MogoModule;
|
||||
import com.mogo.commons.module.MogoModulePaths;
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.main.MainActivity;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@@ -35,18 +31,15 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
|
||||
private MainActivity mActivity;
|
||||
private Application mApp;
|
||||
|
||||
private Map<MogoModule, IMogoModuleProvider> mModuleProviders = new HashMap<>();
|
||||
// 空间换效率
|
||||
private Map<String, IMogoModuleProvider> mModuleNameProviders = new HashMap<>();
|
||||
private static final byte[] obj = new byte[0];
|
||||
|
||||
// 架构升级后的加载功能模块的方式
|
||||
private Map<MogoModule, IMoGoFunctionProvider> mModuleFunctionProviders = new HashMap<>();
|
||||
private Map<String, IMoGoFunctionProvider> mModuleNameFunctionProviders = new HashMap<>();
|
||||
private final Map<MogoModule, IMoGoFunctionProvider> mModuleFunctionProviders = new HashMap<>();
|
||||
private final Map<String, IMoGoFunctionProvider> mModuleNameFunctionProviders = new HashMap<>();
|
||||
|
||||
// 架构升级后的加载功能模块的方式
|
||||
private Map<MogoModule, IMoGoFunctionServerProvider> mModuleFunctionServerProviders = new HashMap<>();
|
||||
private Map<String, IMoGoFunctionServerProvider> mModuleNameFunctionServerProviders = new HashMap<>();
|
||||
private final Map<MogoModule, IMoGoFunctionServerProvider> mModuleFunctionServerProviders = new HashMap<>();
|
||||
private final Map<String, IMoGoFunctionServerProvider> mModuleNameFunctionServerProviders = new HashMap<>();
|
||||
|
||||
private static volatile MogoModulesManager sInstance;
|
||||
|
||||
@@ -55,7 +48,7 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
|
||||
public static MogoModulesManager getInstance() {
|
||||
if (sInstance == null) {
|
||||
synchronized (MogoModulesManager.class) {
|
||||
synchronized (obj) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new MogoModulesManager();
|
||||
}
|
||||
@@ -84,21 +77,6 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
return mApp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadModules() {
|
||||
final List<MogoModule> modules = MogoModulePaths.getModules();
|
||||
if (modules != null && !modules.isEmpty()) {
|
||||
for (MogoModule module : modules) {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "module.getPath():" + module.getPath() + " name: " + module.getName());
|
||||
IMogoModuleProvider provider = load(module.getPath());
|
||||
if (provider != null) {
|
||||
mModuleProviders.put(module, provider);
|
||||
mModuleNameProviders.put(module.getName(), provider);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadFunctionModules() {
|
||||
final List<MogoModule> modules = MogoModulePaths.getModuleFunctions();
|
||||
@@ -151,15 +129,6 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private IMogoModuleProvider load(String path) {
|
||||
try {
|
||||
return (IMogoModuleProvider) ARouter.getInstance().build(path).navigation(getContext());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private IMoGoFunctionProvider loadFunction(String path) {
|
||||
try {
|
||||
return (IMoGoFunctionProvider) ARouter.getInstance().build(path).navigation(getContext());
|
||||
@@ -178,45 +147,8 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private void addFragment(IMogoModuleProvider provider, int containerId) {
|
||||
if (provider == null) {
|
||||
CallerLogger.INSTANCE.e(M_HMI + TAG, "add fragment fail cause provider == null, container is " + ResourcesHelper.getResNameById(getApplicationContext(), containerId));
|
||||
return;
|
||||
}
|
||||
Fragment fragment = null;
|
||||
fragment = mActivity.getSupportFragmentManager().findFragmentByTag(provider.getModuleName());
|
||||
if (fragment == null) {
|
||||
fragment = provider.createFragment(getContext(), null);
|
||||
}
|
||||
if (fragment == null) {
|
||||
CallerLogger.INSTANCE.e(M_HMI + TAG, "add fragment fail cause fragment == null, container is " + ResourcesHelper.getResNameById(getApplicationContext(), containerId));
|
||||
return;
|
||||
}
|
||||
mActivity.getSupportFragmentManager().beginTransaction()
|
||||
.replace(containerId, fragment, provider.getModuleName())
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (mModuleNameProviders != null) {
|
||||
Collection<IMogoModuleProvider> modules = mModuleNameProviders.values();
|
||||
if (modules != null) {
|
||||
for (IMogoModuleProvider module : modules) {
|
||||
try {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "destroy module: " + module.getModuleName());
|
||||
module.onDestroy();
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(M_HMI + TAG, e + " onDestroy");
|
||||
}
|
||||
}
|
||||
}
|
||||
mModuleNameProviders.clear();
|
||||
}
|
||||
if (mModuleProviders != null) {
|
||||
mModuleProviders.clear();
|
||||
}
|
||||
if (mModuleFunctionProviders != null) {
|
||||
Collection<IMoGoFunctionProvider> modules = mModuleFunctionProviders.values();
|
||||
if (modules != null) {
|
||||
|
||||
@@ -21,8 +21,6 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.navi.MogoCarLocationChangedListenerRegister;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
|
||||
public
|
||||
/**
|
||||
@@ -35,7 +33,6 @@ public
|
||||
class MogoMainService extends Service implements IMogoLocationListener {
|
||||
|
||||
private static final String TAG = "MogoMainService";
|
||||
private IMogoServiceApis mServiceApis;
|
||||
|
||||
/**
|
||||
* 主模块管控定位,可以向各个模块发送统一定位信息
|
||||
@@ -45,7 +42,6 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "基本服务启动");
|
||||
mServiceApis = MogoApisHandler.getInstance().getApis();
|
||||
initAndStartLocation();
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "5秒已过,启动基础服务……");
|
||||
@@ -106,6 +102,5 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
mLocationClient.destroy();
|
||||
mLocationClient = null;
|
||||
}
|
||||
mServiceApis = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.mogo.eagle.core.function.main.utils;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.service.v2x.DisplayEffectsInterface;
|
||||
|
||||
/**
|
||||
* created by wujifei on 2021/3/30 15:45
|
||||
* describe:
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_MAIN_DISPLAY_EFFECTS_MANAGER)
|
||||
public class DisplayEffectsManager implements DisplayEffectsInterface {
|
||||
private Context context;
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayEffects(String type) {
|
||||
DisplayEffectsHelper.getInstance().display();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import android.widget.FrameLayout;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.service.windowview.IMogoWindowManager;
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewLayoutSet;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -14,8 +14,8 @@ import com.mogo.service.windowview.IMogoWindowManager;
|
||||
* <p>
|
||||
* 根据优先级控制显示 window view.
|
||||
*/
|
||||
@Route( path = MogoServicePaths.PATH_WINDOW_MANAGER )
|
||||
public class MogoWindowManager implements IMogoWindowManager {
|
||||
@Route( path = MogoServicePaths.PATH_FLOAT_VIEW_MANAGER )
|
||||
public class FloatViewManager implements IViewLayoutSet {
|
||||
|
||||
@Override
|
||||
public void addView( View view, int x, int y, boolean movable ) {
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_30" />
|
||||
<gradient android:startColor="#3F4057" android:endColor="#2A2B38"/>
|
||||
</shape>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#3E7FFC"
|
||||
android:startColor="#5CC1FF" />
|
||||
|
||||
<corners android:bottomLeftRadius="@dimen/dp_30" />
|
||||
</shape>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#50526E"
|
||||
android:startColor="#333F4057" />
|
||||
<corners android:bottomRightRadius="@dimen/dp_30" />
|
||||
|
||||
</shape>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_99000000"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/dp_790"
|
||||
android:layout_height="@dimen/dp_440"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/module_commons_shape_dlg_round_bkg">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_commons_wm_dialog_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_marginTop="@dimen/dp_134"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="是否退出导航导航导航导航导航导航导航导航导航导航导航导航导航导航导航导航?" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_commons_wm_dialog_button_ok"
|
||||
android:layout_width="@dimen/dp_395"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:background="@drawable/module_commons_shape_left_btn_bkg"
|
||||
android:gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
tools:text="确认" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_commons_wm_dialog_button_cancel"
|
||||
android:layout_width="@dimen/dp_395"
|
||||
android:layout_height="@dimen/dp_128"
|
||||
android:background="@drawable/module_commons_shape_right_btn_bkg"
|
||||
android:gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
tools:text="取消" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -79,7 +79,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_push_dialog_acc_title" />
|
||||
|
||||
<!--缩略图-->
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
<com.mogo.eagle.core.utilcode.mogo.imageloader.MogoImageView
|
||||
android:id="@+id/thumbnail_image"
|
||||
android:layout_width="@dimen/module_push_dialog_check_acc_image_width"
|
||||
android:layout_height="@dimen/module_push_dialog_check_acc_image__height"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/notice_traffic_dialog_title" />
|
||||
<!---->
|
||||
<com.mogo.service.imageloader.MogoImageView
|
||||
<com.mogo.eagle.core.utilcode.mogo.imageloader.MogoImageView
|
||||
android:id="@+id/thumbnail_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
||||
@@ -53,4 +53,19 @@
|
||||
<attr name="defaultColor" format="color"/> <!--档位默认色值-->
|
||||
<attr name="selectColor" format="color"/> <!--当前档位色值-->
|
||||
</declare-styleable>
|
||||
|
||||
<style name="BaseFloatDialogStyle" parent="@android:style/Theme.Dialog">
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:backgroundDimAmount">0.6</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:fullBright">@android:color/transparent</item>
|
||||
<item name="android:fullDark">@android:color/transparent</item>
|
||||
<item name="android:topBright">@android:color/transparent</item>
|
||||
<item name="android:topDark">@android:color/transparent</item>
|
||||
<item name="android:borderlessButtonStyle">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -40,6 +40,7 @@
|
||||
<color name="color_FF2966EC">#FF2966EC</color>
|
||||
<color name="color_FFA7B6F0">#FFA7B6F0</color>
|
||||
<color name="color_B3FFFFFF">#B3FFFFFF</color>
|
||||
<color name="color_99000000">#99000000</color>
|
||||
|
||||
|
||||
<color name="version_latest_start_color">#6D7BAF</color>
|
||||
|
||||
Reference in New Issue
Block a user