opt app list UI
This commit is contained in:
@@ -57,9 +57,11 @@ public enum AppEnum {
|
||||
|
||||
//"均衡器",
|
||||
Equlizer( "均衡器", "com.zhidao.equalizer", R.drawable.module_apps_ic_equlizer ),
|
||||
Equlizer_NWD( "均衡器", "com.nwd.audioset", R.drawable.module_apps_ic_equlizer ),
|
||||
|
||||
//"方控学习",
|
||||
SteerProduct( "方控学习", "com.zd.steerproduct", R.drawable.module_apps_ic_stee_product ),
|
||||
SteerProduct_NWD( "方控学习", "", R.drawable.module_apps_ic_stee_product ),
|
||||
|
||||
//"车载设置",
|
||||
CarSettings( "车载设置", "com.zhidao.settings", R.drawable.module_apps_ic_car_setting ),
|
||||
@@ -78,12 +80,25 @@ public enum AppEnum {
|
||||
|
||||
// 本地视频
|
||||
LocalVideo( "本地视频", "com.zhidao.video", R.drawable.module_apps_ic_local_video ),
|
||||
LocalVideo_NWD( "本地视频", "com.nwd.android.video.ui", R.drawable.module_apps_ic_local_video ),
|
||||
|
||||
// 车辆信息
|
||||
CanBus( "车辆信息", "com.nwd.can.setting", R.drawable.module_apps_ic_canbus ),
|
||||
|
||||
// 蓝牙电话
|
||||
BT_PHONE( "蓝牙电话", "com.nwd.android.phone", R.drawable.module_apps_ic_bt_phone ),
|
||||
|
||||
// 本地音乐
|
||||
LOCAL_MUSIC( "本地音乐", "", 0 ),
|
||||
|
||||
// 天气
|
||||
WEATHER( "天气", "com.zhidao.weather", 0 ),
|
||||
|
||||
// 蓝牙音乐
|
||||
BT_MUSIC( "蓝牙音乐", "com.nwd.bt.music", 0 ),
|
||||
|
||||
// 高德地图
|
||||
AUTO_NAVI( "高德地图", "com.autonavi.amapauto", 0 ),
|
||||
;
|
||||
|
||||
private String mName;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
android:id="@+id/module_apps_id_app_icon"
|
||||
android:layout_width="@dimen/module_apps_navigation_icon_width"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/module_apps_ic_chat"
|
||||
android:src="@drawable/module_apps_ic_im"
|
||||
android:layout_height="@dimen/module_apps_navigation_icon_height" />
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -17,5 +17,7 @@
|
||||
<item>com.android.calculator2</item>
|
||||
<item>com.nwd.guidebookskin</item>
|
||||
<item>com.iflytek.inputmethod.pad</item>
|
||||
<item>com.nwd.tools.reboot</item>
|
||||
<item>com.android.car.setting</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -35,23 +35,24 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
private Map< MogoModule, IMogoModuleProvider > mModuleProviders = new HashMap<>();
|
||||
// 空间换效率
|
||||
private Map< String, IMogoModuleProvider > mModuleNameProviders = new HashMap<>();
|
||||
|
||||
|
||||
private static volatile MogoModulesManager sInstance;
|
||||
|
||||
private MogoModulesManager(){}
|
||||
|
||||
public static MogoModulesManager getInstance(){
|
||||
if( sInstance == null ){
|
||||
synchronized( MogoModulesManager.class ) {
|
||||
if( sInstance == null ){
|
||||
|
||||
private MogoModulesManager() {
|
||||
}
|
||||
|
||||
public static MogoModulesManager getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( MogoModulesManager.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new MogoModulesManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release(){
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
@@ -131,7 +132,7 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
|
||||
@Override
|
||||
public void loadBaseModule() {
|
||||
List<MogoModule> baseModules = MogoModulePaths.getBaseModules();
|
||||
List< MogoModule > baseModules = MogoModulePaths.getBaseModules();
|
||||
for ( MogoModule baseModule : baseModules ) {
|
||||
if ( baseModule == null ) {
|
||||
continue;
|
||||
@@ -142,7 +143,11 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
}
|
||||
|
||||
private IMogoModuleProvider load( String path ) {
|
||||
return ( IMogoModuleProvider ) ARouter.getInstance().build( path ).navigation( getContext() );
|
||||
try {
|
||||
return ( IMogoModuleProvider ) ARouter.getInstance().build( path ).navigation( getContext() );
|
||||
} catch ( Exception e ) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private void addFragment( IMogoModuleProvider provider, int containerId ) {
|
||||
|
||||
Reference in New Issue
Block a user