opt
This commit is contained in:
@@ -27,6 +27,8 @@ import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
*/
|
||||
public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresenter > implements AppsListView, FragmentStackTransactionListener {
|
||||
|
||||
private static final String TAG = "AppsListActivity";
|
||||
|
||||
private BottomSheetBehavior mBottomSheetBehavior;
|
||||
private IMogoFragmentManager mMogoFragmentManager;
|
||||
|
||||
@@ -38,12 +40,13 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
|
||||
|
||||
@Override
|
||||
protected void onCreate( @Nullable Bundle savedInstanceState ) {
|
||||
overridePendingTransition( R.anim.module_apps_anim_enter, 0);
|
||||
getWindow().addFlags( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
overridePendingTransition( R.anim.module_apps_anim_enter, 0 );
|
||||
getWindow().addFlags( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS );
|
||||
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ) {
|
||||
getWindow().setStatusBarColor( Color.BLACK );
|
||||
}
|
||||
super.onCreate( savedInstanceState );
|
||||
AppServiceHandler.getApis().getStatusManagerApi().setAppListUIShow( TAG, true );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,8 +56,9 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add( R.id.module_apps_id_container, new AppsFragment() )
|
||||
.replace( R.id.module_apps_id_container, new AppsFragment() )
|
||||
.commitAllowingStateLoss();
|
||||
|
||||
mBottomSheetBehavior = BottomSheetBehavior.from( findViewById( R.id.module_apps_id_container ) );
|
||||
@@ -74,14 +78,14 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
|
||||
} );
|
||||
mBottomSheetBehavior.setState( BottomSheetBehavior.STATE_EXPANDED );
|
||||
|
||||
mMogoFragmentManager = ( IMogoFragmentManager ) ARouter.getInstance().build( MogoServicePaths.PATH_FRAGMENT_MANAGER ).navigation( this );
|
||||
mMogoFragmentManager = AppServiceHandler.getApis().getFragmentManagerApi();
|
||||
mMogoFragmentManager.addMainFragmentStackTransactionListener( this );
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected AppsListPresenter createPresenter() {
|
||||
return new AppsListPresenter(this);
|
||||
return new AppsListPresenter( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -100,12 +104,13 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
|
||||
@Override
|
||||
public void closeAppsPanel() {
|
||||
finish();
|
||||
overridePendingTransition( R.anim.module_apps_anim_enter, R.anim.module_apps_anim_exit);
|
||||
overridePendingTransition( R.anim.module_apps_anim_enter, R.anim.module_apps_anim_exit );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
AppServiceHandler.getApis().getStatusManagerApi().setAppListUIShow( TAG, false );
|
||||
mMogoFragmentManager.removeMainFragmentStackTransactionListener( this );
|
||||
mMogoFragmentManager = null;
|
||||
mBottomSheetBehavior = null;
|
||||
|
||||
@@ -72,7 +72,6 @@ public class AppsPresenter extends Presenter< AppsView > {
|
||||
|
||||
mAnalytics = mApis.getAnalyticsApi();
|
||||
mMogoStatusManager = mApis.getStatusManagerApi();
|
||||
mMogoStatusManager.setAppListUIShow( TAG, true );
|
||||
}
|
||||
|
||||
private void renderAppsList() {
|
||||
@@ -202,7 +201,6 @@ public class AppsPresenter extends Presenter< AppsView > {
|
||||
@Override
|
||||
public void onDestroy( @NonNull LifecycleOwner owner ) {
|
||||
super.onDestroy( owner );
|
||||
mMogoStatusManager.setAppListUIShow( TAG, false );
|
||||
AppsListChangedLiveData.getInstance().release();
|
||||
mView = null;
|
||||
mLauncher.destroy();
|
||||
|
||||
Reference in New Issue
Block a user