diff --git a/.idea/misc.xml b/.idea/misc.xml index cd77a1f062..21e99e2dc0 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java b/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java index d5900526a1..0218167b23 100644 --- a/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java +++ b/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java @@ -57,4 +57,34 @@ public class AppUtils { return null; } } + + public static boolean isAppForeground( Context context ) { + if ( context != null ) { + ActivityManager activityManager = ( ActivityManager ) context.getSystemService( Context.ACTIVITY_SERVICE ); + List< ActivityManager.RunningAppProcessInfo > processes = activityManager.getRunningAppProcesses(); + for ( ActivityManager.RunningAppProcessInfo processInfo : processes ) { + if ( processInfo.processName.equals( context.getPackageName() ) ) { + if ( processInfo.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND ) { + return true; + } + } + } + } + return false; + } + + public static boolean isAppForeground( Context context, String pkg ) { + if ( context != null ) { + ActivityManager activityManager = ( ActivityManager ) context.getSystemService( Context.ACTIVITY_SERVICE ); + List< ActivityManager.RunningAppProcessInfo > processes = activityManager.getRunningAppProcesses(); + for ( ActivityManager.RunningAppProcessInfo processInfo : processes ) { + if ( processInfo.processName.equals( pkg ) ) { + if ( processInfo.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND ) { + return true; + } + } + } + } + return false; + } } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerImpl.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerImpl.java index f9b34a59be..7aa61980f9 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerImpl.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerImpl.java @@ -30,7 +30,7 @@ class WindowManagerImpl implements IWindowManagerView { mLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT; } mLayoutParams.format = PixelFormat.TRANSLUCENT; - mLayoutParams.gravity = Gravity.CENTER; + 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; @@ -59,6 +59,5 @@ class WindowManagerImpl implements IWindowManagerView { mWindowManager.removeView(mParams.mContentView); isShowing = false; } - } } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerView.java index d0d2cfa4d4..215f832b6c 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerView.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerView.java @@ -72,6 +72,11 @@ public class WindowManagerView { return this; } + public Builder gravity( int gravity ) { + mParams.mGravity = gravity; + return this; + } + /** * 默认dialog实现 * @@ -105,5 +110,6 @@ public class WindowManagerView { public int mHeight; public int mX; public int mY; + public int mGravity; } } diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/AutoNaviBroadcastReceiver.java b/modules/mogo-module-map/src/main/java/com/mogo/module/map/AutoNaviBroadcastIntentHandler.java similarity index 86% rename from modules/mogo-module-map/src/main/java/com/mogo/module/map/AutoNaviBroadcastReceiver.java rename to modules/mogo-module-map/src/main/java/com/mogo/module/map/AutoNaviBroadcastIntentHandler.java index 242bbbce63..4ddc0f947f 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/AutoNaviBroadcastReceiver.java +++ b/modules/mogo-module-map/src/main/java/com/mogo/module/map/AutoNaviBroadcastIntentHandler.java @@ -1,14 +1,12 @@ package com.mogo.module.map; -import android.content.BroadcastReceiver; -import android.content.Context; import android.content.Intent; -import android.content.IntentFilter; import android.text.TextUtils; -import com.mogo.commons.AbsMogoApplication; import com.mogo.map.navi.MogoNaviConfig; import com.mogo.map.uicontroller.EnumMapUI; +import com.mogo.service.intent.IMogoIntentListener; +import com.mogo.service.intent.IMogoIntentManager; import com.mogo.utils.logger.Logger; public @@ -18,21 +16,19 @@ public * * 接收高德地图车机版广播 */ -class AutoNaviBroadcastReceiver extends BroadcastReceiver { +class AutoNaviBroadcastIntentHandler implements IMogoIntentListener { public static final String TAG = "AutoNaviBroadcastReceiver"; public static final String AUTONAVI_STANDARD_BROADCAST_RECV = "AUTONAVI_STANDARD_BROADCAST_RECV"; - public void register() { - IntentFilter inputFilter = new IntentFilter(); - inputFilter.addAction( AUTONAVI_STANDARD_BROADCAST_RECV ); - AbsMogoApplication.getApp().registerReceiver( this, inputFilter ); + public void register( IMogoIntentManager manager ) { + manager.registerIntentListener( AUTONAVI_STANDARD_BROADCAST_RECV, this ); } - public void unregister() { + public void unregister(IMogoIntentManager manager ) { mCallback = null; - AbsMogoApplication.getApp().unregisterReceiver( this ); + manager.unregisterIntentListener( AUTONAVI_STANDARD_BROADCAST_RECV, this ); } private OnMapControlCallback mCallback; @@ -42,7 +38,7 @@ class AutoNaviBroadcastReceiver extends BroadcastReceiver { } @Override - public void onReceive( Context context, Intent intent ) { + public void onIntentReceived( String intentStr, Intent intent ) { String action = intent.getAction(); int keyType = intent.getIntExtra( "KEY_TYPE", 0 ); @@ -122,6 +118,5 @@ class AutoNaviBroadcastReceiver extends BroadcastReceiver { .avoidSpeed( prefer == 3 ); mCallback.onReCalculatePath( config ); } - mCallback.onEnd( intent ); } } diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java b/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java index f72c5dea25..a45306c822 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java +++ b/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java @@ -32,6 +32,7 @@ import com.mogo.service.module.IMogoRegisterCenter; import com.mogo.service.module.IMogoSearchManager; import com.mogo.service.statusmanager.IMogoStatusManager; import com.mogo.service.strategy.IMogoRefreshStrategyController; +import com.mogo.utils.AppUtils; import com.mogo.utils.ResourcesHelper; import com.mogo.utils.UiThreadHandler; import com.mogo.utils.logger.Logger; @@ -73,23 +74,11 @@ public class MapPresenter extends Presenter< MapView > implements mView.getUIController().recoverLockMode(); } }; - private AutoNaviBroadcastReceiver mAutoNaviReceiver; + private AutoNaviBroadcastIntentHandler mAutoNaviReceiver; private MapControlCommandHandler mCustomVoiceCommandHandler; public MapPresenter( MapView view ) { super( view ); - initBroadcast(); - mCustomVoiceCommandHandler = new MapControlCommandHandler(); - mCustomVoiceCommandHandler.setCallback( this ); - } - - /** - * opera type为0:0 实时路况开;1实时路况关 type为1:0 放大地图; 1缩小地图 type为2:0切换2d车上; 1切换2d北上;2切换3d车上支持 - */ - private void initBroadcast() { - mAutoNaviReceiver = new AutoNaviBroadcastReceiver(); - mAutoNaviReceiver.setCallback( this ); - mAutoNaviReceiver.register(); } @Override @@ -158,11 +147,10 @@ public class MapPresenter extends Presenter< MapView > implements if ( CustomNaviInterrupter.getInstance().interrupt() ) { // 导航过程中语音指令退出导航,会出现 activity 不走 onResume 的情况 UiThreadHandler.postDelayed( () -> { - if ( isForeground( getContext() ) && !hasOthersActivity() && !mStatusManager.isMainPageOnResume() ) { + if ( AppUtils.isAppForeground( getContext() ) && !hasOthersActivity() && !mStatusManager.isMainPageOnResume() ) { mLauncher.backToLauncher( getContext() ); } }, 500L ); - onEnd( intent ); return; } mMogoMapService.getNavi( getContext() ).stopNavi(); @@ -176,26 +164,6 @@ public class MapPresenter extends Presenter< MapView > implements mMogoMapService.getNavi( getContext() ).reCalculateRoute( config ); } - @Override - public void onEnd( Intent intent ) { - mMogoIntentManager.invoke( AutoNaviBroadcastReceiver.AUTONAVI_STANDARD_BROADCAST_RECV, intent ); - } - - private boolean isForeground( Context context ) { - if ( context != null ) { - ActivityManager activityManager = ( ActivityManager ) context.getSystemService( Context.ACTIVITY_SERVICE ); - List< ActivityManager.RunningAppProcessInfo > processes = activityManager.getRunningAppProcesses(); - for ( ActivityManager.RunningAppProcessInfo processInfo : processes ) { - if ( processInfo.processName.equals( context.getPackageName() ) ) { - if ( processInfo.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND ) { - return true; - } - } - } - } - return false; - } - private boolean hasOthersActivity() { ActivityManager am = ( ActivityManager ) getContext().getSystemService( Context.ACTIVITY_SERVICE ); List< ActivityManager.RunningTaskInfo > list = am.getRunningTasks( 1 ); @@ -298,6 +266,16 @@ public class MapPresenter extends Presenter< MapView > implements for ( String cmd : VoiceConstants.sUnUnRegisterCmds ) { mMogoIntentManager.registerIntentListener( cmd, this ); } + + initBroadcast(); + mCustomVoiceCommandHandler = new MapControlCommandHandler(); + mCustomVoiceCommandHandler.setCallback( this ); + } + + private void initBroadcast() { + mAutoNaviReceiver = new AutoNaviBroadcastIntentHandler(); + mAutoNaviReceiver.setCallback( this ); + mAutoNaviReceiver.register( mMogoIntentManager ); } @Override @@ -309,7 +287,6 @@ public class MapPresenter extends Presenter< MapView > implements @Override public void onPause( @NonNull LifecycleOwner owner ) { super.onPause( owner ); - unregisterVoiceCmd(); } @@ -317,7 +294,7 @@ public class MapPresenter extends Presenter< MapView > implements public void onDestroy( @NonNull LifecycleOwner owner ) { super.onDestroy( owner ); if ( mAutoNaviReceiver != null ) { - mAutoNaviReceiver.unregister(); + mAutoNaviReceiver.unregister( mMogoIntentManager ); } } diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/OnMapControlCallback.java b/modules/mogo-module-map/src/main/java/com/mogo/module/map/OnMapControlCallback.java index d0d074da5e..cd6263370d 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/OnMapControlCallback.java +++ b/modules/mogo-module-map/src/main/java/com/mogo/module/map/OnMapControlCallback.java @@ -31,9 +31,6 @@ public interface OnMapControlCallback { // 重新规划路线 void onReCalculatePath( MogoNaviConfig config ); - // 结束 - void onEnd( Intent intent ); - // 查看全程 void onDisplayOverview(); diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java index ed58cdd98f..1eb74077a3 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java @@ -32,6 +32,7 @@ import com.mogo.module.common.MogoModule; import com.mogo.module.common.MogoModulePaths; import com.mogo.module.common.map.MapCenterPointStrategy; import com.mogo.module.common.map.Scene; +import com.mogo.module.service.intent.AutoNaviIntentHandler; import com.mogo.module.service.intent.IntentHandlerFactory; import com.mogo.module.service.marker.MapMarkerManager; import com.mogo.module.service.network.RefreshCallback; @@ -274,7 +275,7 @@ public class MogoServices implements IMogoMapListener, private boolean mIsFirstAccOn = true; - private IMogoStatusChangedListener statusChangedListener = new StatusChangedAdapter(){ + private IMogoStatusChangedListener statusChangedListener = new StatusChangedAdapter() { @Override public void onUserInteracted( boolean userInteracted ) { if ( userInteracted ) { @@ -303,9 +304,11 @@ public class MogoServices implements IMogoMapListener, restartAutoRefreshAtTime( 2_000L ); } mIsMainPageFirstResume = false; + AutoNaviIntentHandler.getInstance().closeEntrance(); } else { unregisterInternalUnWakeupWords(); stopAutoRefreshStrategy(); + AutoNaviIntentHandler.getInstance().syncAutoNaviForgroundStatus( mContext ); } } @@ -382,6 +385,8 @@ public class MogoServices implements IMogoMapListener, mIntentManager.registerIntentListener( ServiceConst.COMMAND_ZHIDAO_NEARBY_USER_ONLINE, this ); mIntentManager.registerIntentListener( ServiceConst.COMMAND_ZHIDAO_NEARBY_FRIEND_BYLOCATION, this ); mIntentManager.registerIntentListener( ServiceConst.COMMAND_BACK, this ); + mIntentManager.registerIntentListener( MogoReceiver.ACTION_AUTO_NAVI_RECEIVER, this ); + mIntentManager.registerIntentListener( MogoReceiver.ACTION_AUTO_NAVI_SEND, this ); mADASController = MarkerServiceHandler.getADASController(); mLauncher = MarkerServiceHandler.getLauncher(); @@ -395,6 +400,9 @@ public class MogoServices implements IMogoMapListener, if ( DebugConfig.isLaunchLocationService() ) { initLocationServiceProcess( context ); } + + AutoNaviIntentHandler.getInstance().syncAutoNaviForgroundStatus( mContext ); + } private void initLocationServiceProcess( Context context ) { @@ -473,6 +481,8 @@ public class MogoServices implements IMogoMapListener, filter.addAction( MogoReceiver.ACTION_VOICE_READY ); filter.addAction( MogoReceiver.ACTION_MOCK ); filter.addAction( Intent.ACTION_CLOSE_SYSTEM_DIALOGS ); + filter.addAction( MogoReceiver.ACTION_AUTO_NAVI_RECEIVER ); + filter.addAction( MogoReceiver.ACTION_AUTO_NAVI_SEND ); try { context.getApplicationContext().registerReceiver( mAIAssistReceiver, filter ); Logger.i( TAG, "register voice receiver." ); @@ -914,4 +924,14 @@ public class MogoServices implements IMogoMapListener, AIAssist.getInstance( mContext ).registerUnWakeupCommand( ServiceConst.CMD_BACK, ServiceConst.CMD_BACK_WORDS, this ); } } + + @Override + public void onStartNavi() { + AutoNaviIntentHandler.getInstance().preShowEntrance( mContext ); + } + + @Override + public void onStopNavi() { + AutoNaviIntentHandler.getInstance().closeEntrance(); + } } diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AutoNaviIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AutoNaviIntentHandler.java new file mode 100644 index 0000000000..7e98a5a052 --- /dev/null +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AutoNaviIntentHandler.java @@ -0,0 +1,149 @@ +package com.mogo.module.service.intent; + +import android.content.Context; +import android.content.Intent; +import android.text.TextUtils; +import android.view.Gravity; +import android.view.View; +import android.view.WindowManager; + +import com.mogo.commons.AbsMogoApplication; +import com.mogo.commons.debug.DebugConfig; +import com.mogo.module.common.wm.WindowManagerView; +import com.mogo.module.service.MarkerServiceHandler; +import com.mogo.module.service.R; +import com.mogo.module.service.receiver.MogoReceiver; +import com.mogo.utils.AppUtils; +import com.mogo.utils.LaunchUtils; +import com.mogo.utils.ResourcesHelper; +import com.mogo.utils.logger.Logger; + +public +/** + * @author congtaowang + * @since 2020/6/5 + *

+ * 描述 + */ +class AutoNaviIntentHandler implements IntentHandler { + + private static final String TAG = "AutoNaviIntentHandler"; + + private static volatile AutoNaviIntentHandler sInstance; + + private AutoNaviIntentHandler() { + } + + public static AutoNaviIntentHandler getInstance() { + if ( sInstance == null ) { + synchronized ( AutoNaviIntentHandler.class ) { + if ( sInstance == null ) { + sInstance = new AutoNaviIntentHandler(); + } + } + } + return sInstance; + } + + private WindowManagerView mWindowManagerView; + + public synchronized void release() { + sInstance = null; + } + + @Override + public void handle( Context context, Intent intent ) { + int keyType = intent.getIntExtra( "KEY_TYPE", 0 ); + switch ( keyType ) { + case 10021: + closeEntrance(); + MarkerServiceHandler.getADASController().showADAS(); + break; + case 20009: + MarkerServiceHandler.getADASController().closeADAS(); + break; + case 10019: + int extraState = intent.getIntExtra( "EXTRA_STATE", -1 ); + switch ( extraState ) { + case 3: + syncAutoNaviNavingStatus( context ); + break; + case 4: + closeEntrance(); + break; + case 8: + showEntrance( context ); + break; + case 9: + closeEntrance(); + break; + } + break; + } + } + + /** + * 通过查询高德地图状态后再显示 + * + * @param context + */ + public void preShowEntrance( Context context ) { + syncAutoNaviForgroundStatus( context ); + } + + private void showEntrance( Context context ) { + if ( mWindowManagerView == null ) { + mWindowManagerView = new WindowManagerView.Builder( AbsMogoApplication.getApp() ) + .contentView( R.layout.module_service_app_entrance ) + .size( WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT ) + .position( ResourcesHelper.getDimensionPixelSize( context, R.dimen.module_services_app_entrance_x ), ResourcesHelper.getDimensionPixelSize( AbsMogoApplication.getApp(), R.dimen.module_services_app_entrance_y ) ) + .gravity( Gravity.LEFT|Gravity.TOP ) + .showInWindowManager(); + View root = mWindowManagerView.findViewById( R.id.module_service_app_entrance_root ); + root.setOnClickListener( view -> { + try { + if ( DebugConfig.isLauncher() ) { + MarkerServiceHandler.getLauncher().backToLauncher( context ); + } else { + LaunchUtils.launchByPkg( context, "com.mogo.launcher.app" ); + } + } catch ( Exception e ) { + Logger.e( TAG, e, "error." ); + } + } ); + } + try { + mWindowManagerView.show(); + } catch ( Exception e ) { + Logger.e( TAG, e, "error." ); + } + } + + public void closeEntrance() { + if ( mWindowManagerView == null ) { + return; + } + try { + mWindowManagerView.dismiss(); + } catch ( Exception e ) { + Logger.e( TAG, e, "error." ); + } + } + + public void syncAutoNaviForgroundStatus( Context context ) { + Intent intent = new Intent(); + intent.setAction( "AUTONAVI_STANDARD_BROADCAST_RECV" ); + intent.putExtra( "KEY_TYPE", 12404 ); + intent.putExtra( "EXTRA_REQUEST_AUTO_STATE", 0 ); + context.sendBroadcast( intent ); + } + + public void syncAutoNaviNavingStatus( Context context ) { + Intent intent = new Intent(); + intent.setAction( "AUTONAVI_STANDARD_BROADCAST_RECV" ); + intent.putExtra( "KEY_TYPE", 12404 ); + intent.putExtra( "EXTRA_REQUEST_AUTO_STATE", 1 ); + context.sendBroadcast( intent ); + } +} + diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java index ea84b182e2..c9887ac462 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java @@ -37,6 +37,8 @@ public class IntentHandlerFactory { mHandlers.put( MogoReceiver.ACTIION_ADAS, ADASStatusIntentHandler.getInstance() ); mHandlers.put( MogoReceiver.ACTION_VOICE_READY, new AIAssistIntentHandler() ); mHandlers.put( ServiceConst.COMMAND_BACK, WholeVoiceCommandIntentHandler.getInstance() ); + mHandlers.put( MogoReceiver.ACTION_AUTO_NAVI_RECEIVER, AutoNaviIntentHandler.getInstance() ); + mHandlers.put( MogoReceiver.ACTION_AUTO_NAVI_SEND, AutoNaviIntentHandler.getInstance() ); } private static final class InstanceHolder { diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java index 42f9bef659..411d36b927 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java @@ -53,6 +53,11 @@ public class MogoReceiver extends BroadcastReceiver { public static final String ACTION_MOCK = "com.mogo.mock"; + // 接受其他app发给高德的广播 + public static final String ACTION_AUTO_NAVI_RECEIVER = "AUTONAVI_STANDARD_BROADCAST_RECV"; + // 接受高德发过来的广播 + public static final String ACTION_AUTO_NAVI_SEND = "AUTONAVI_STANDARD_BROADCAST_SEND"; + private IMogoIntentManager mMogoIntentManager; public MogoReceiver(Context context) { diff --git a/modules/mogo-module-service/src/main/res/drawable/module_services_app_entrance_bkg.xml b/modules/mogo-module-service/src/main/res/drawable/module_services_app_entrance_bkg.xml new file mode 100644 index 0000000000..31b2c574f5 --- /dev/null +++ b/modules/mogo-module-service/src/main/res/drawable/module_services_app_entrance_bkg.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/layout/module_service_app_entrance.xml b/modules/mogo-module-service/src/main/res/layout/module_service_app_entrance.xml new file mode 100644 index 0000000000..7c54d93ab8 --- /dev/null +++ b/modules/mogo-module-service/src/main/res/layout/module_service_app_entrance.xml @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/values-ldpi/dimens.xml b/modules/mogo-module-service/src/main/res/values-ldpi/dimens.xml new file mode 100644 index 0000000000..4114da3f4b --- /dev/null +++ b/modules/mogo-module-service/src/main/res/values-ldpi/dimens.xml @@ -0,0 +1,30 @@ + + + 16dp + 2dp + 56px + 65px + 35px + 35px + 4px + + 550px + 208px + 100px + 100px + 100px + 10px + 54px + 44px + 44px + 14px + 12px + 64px + 6.5px + 10px + 19px + 15px + 2px + 24px + 498px + \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/values-mdpi/dimens.xml b/modules/mogo-module-service/src/main/res/values-mdpi/dimens.xml new file mode 100644 index 0000000000..4114da3f4b --- /dev/null +++ b/modules/mogo-module-service/src/main/res/values-mdpi/dimens.xml @@ -0,0 +1,30 @@ + + + 16dp + 2dp + 56px + 65px + 35px + 35px + 4px + + 550px + 208px + 100px + 100px + 100px + 10px + 54px + 44px + 44px + 14px + 12px + 64px + 6.5px + 10px + 19px + 15px + 2px + 24px + 498px + \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/values-xhdpi-1920x1000/dimens.xml b/modules/mogo-module-service/src/main/res/values-xhdpi-1920x1000/dimens.xml new file mode 100644 index 0000000000..1ccedd1fee --- /dev/null +++ b/modules/mogo-module-service/src/main/res/values-xhdpi-1920x1000/dimens.xml @@ -0,0 +1,30 @@ + + + 20dp + 4dp + 100px + 117px + 60px + 60px + 8px + + + 1000px + 390px + 200px + 200px + 10px + 10px + 100px + 80px + 80px + 24px + 20px + 120px + 20px + 40px + 30px + 4px + 48px + 1000px + \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-service/src/main/res/values-xhdpi/dimens.xml index 341706179d..1ccedd1fee 100644 --- a/modules/mogo-module-service/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-service/src/main/res/values-xhdpi/dimens.xml @@ -22,4 +22,9 @@ 20px 120px 20px + 40px + 30px + 4px + 48px + 1000px \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/values/dimens.xml b/modules/mogo-module-service/src/main/res/values/dimens.xml index fd1066746d..1ccedd1fee 100644 --- a/modules/mogo-module-service/src/main/res/values/dimens.xml +++ b/modules/mogo-module-service/src/main/res/values/dimens.xml @@ -1,25 +1,30 @@ - 16dp - 2dp - 56px - 65px - 35px - 35px - 4px + 20dp + 4dp + 100px + 117px + 60px + 60px + 8px - 550px - 208px - 100px - 100px - 100px + + 1000px + 390px + 200px + 200px + 10px 10px - 54px - 44px - 44px - 14px - 12px - 64px - 6.5px - 10px + 100px + 80px + 80px + 24px + 20px + 120px + 20px + 40px + 30px + 4px + 48px + 1000px \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/values/strings.xml b/modules/mogo-module-service/src/main/res/values/strings.xml index 27efab9b88..00488f2df6 100644 --- a/modules/mogo-module-service/src/main/res/values/strings.xml +++ b/modules/mogo-module-service/src/main/res/values/strings.xml @@ -1,3 +1,4 @@ mogo-module-service + 切换辅助驾驶模式