增加比亚迪module
This commit is contained in:
@@ -124,6 +124,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
final long start = System.currentTimeMillis();
|
||||
|
||||
MogoModulesManager.getInstance().init( this, getApis() );
|
||||
loadSplash();
|
||||
mMogoMapService = mServiceApis.getMapServiceApi();
|
||||
if ( mMogoMapService != null ) {
|
||||
mMogoMapService.getHostListenerRegister().registerHostMapListener( EventDispatchCenter.getInstance() );
|
||||
@@ -204,6 +205,11 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
// mCardsContainer.setAdapter( mCardModulesAdapter );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadSplash() {
|
||||
MogoModulesManager.getInstance().loadBydModule(R.id.module_main_id_splash_container);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected MainPresenter createPresenter() {
|
||||
|
||||
@@ -32,4 +32,9 @@ public interface MainView extends IView {
|
||||
* @return
|
||||
*/
|
||||
IMogoServiceApis getApis();
|
||||
|
||||
/**
|
||||
* 加载闪屏页
|
||||
*/
|
||||
void loadSplash();
|
||||
}
|
||||
|
||||
@@ -71,4 +71,10 @@ public interface MogoModulesHandler {
|
||||
* @param containerId
|
||||
*/
|
||||
void loadLeftPanelModule(int containerId);
|
||||
|
||||
/**
|
||||
* 加载比亚迪模块
|
||||
* @param containerId
|
||||
*/
|
||||
void loadBydModule(int containerId);
|
||||
}
|
||||
|
||||
@@ -147,6 +147,14 @@ public class MogoModulesManager implements MogoModulesHandler {
|
||||
addFragment( provider, containerId );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadBydModule(int containerId) {
|
||||
IMogoModuleProvider provider = ( IMogoModuleProvider ) ARouter.getInstance()
|
||||
.build(MogoServicePaths.PATH_BYD)
|
||||
.navigation( getContext() );
|
||||
addFragment( provider, containerId );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadBaseModule() {
|
||||
List< MogoModule > baseModules = MogoModulePaths.getBaseModules();
|
||||
|
||||
@@ -9,23 +9,23 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_map_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_map_left_shadow_frame"
|
||||
android:layout_width="@dimen/module_main_map_left_shadow_frame_width"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/module_main_dw_left_frame_bkg"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- 时间、天气、消息 与entrance合到了一起,减少一个view -->
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/module_main_id_header_fragment_container"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/module_ext_height"-->
|
||||
<!-- android:layout_marginLeft="@dimen/module_main_header_fragment_container_marginLeft"-->
|
||||
<!-- android:layout_marginTop="@dimen/module_main_header_fragment_container_marginTop" />-->
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/module_main_id_header_fragment_container"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/module_ext_height"-->
|
||||
<!-- android:layout_marginLeft="@dimen/module_main_header_fragment_container_marginLeft"-->
|
||||
<!-- android:layout_marginTop="@dimen/module_main_header_fragment_container_marginTop" />-->
|
||||
|
||||
<!-- 左边按钮 -->
|
||||
<FrameLayout
|
||||
@@ -36,23 +36,24 @@
|
||||
|
||||
<!-- 左侧浮层,布局位置目前只考虑了1+16独立app情况 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_left_panel_fragment_container"
|
||||
android:layout_width="@dimen/module_main_id_left_panel_fragment_container_width"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/module_main_id_left_panel_fragment_container" />
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--快捷操作浮层-->
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_entrance_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/module_main_entrance_fragment_container_padding"
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft" />
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
|
||||
android:padding="@dimen/module_main_entrance_fragment_container_padding" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_event_panel_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/module_main_entrance_fragment_container_padding"
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft" />
|
||||
android:layout_marginLeft="@dimen/module_main_id_entrance_fragment_container_marginLeft"
|
||||
android:padding="@dimen/module_main_entrance_fragment_container_padding" />
|
||||
|
||||
<!-- 浮层-->
|
||||
<FrameLayout
|
||||
@@ -73,5 +74,10 @@
|
||||
android:visibility="visible"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_main_id_splash_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user