@Override public void onResume() { super.onResume(); if (isFresh) { buildUI(); } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_homescreen); mViewPager = (ViewPager) findViewById(R.id.vpEhsViewPager); AppLogger.getLogger().Info("HomeScreen Activity: onCreate"); drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); drawer.setFocusableInTouchMode(false); NavigationMenuFragment fragment = (NavigationMenuFragment) getSupportFragmentManager().findFragmentById(R.id.left_drawer); if (fragment != null && fragment.isInLayout()) { fragment.setDrawerLayout(drawer); } mDrawerToggle = new ActionBarDrawerToggle( this, drawer, R.string.abc_action_bar_home_description, R.string.abc_action_bar_up_description) { /** Called when a drawer has settled in a completely closed state. */ public void onDrawerClosed(View view) { super.onDrawerClosed(view); // getActionBar().setTitle(mTitle); } /** Called when a drawer has settled in a completely open state. */ public void onDrawerOpened(View drawerView) { super.onDrawerOpened(drawerView); // getActionBar().setTitle(mDrawerTitle); } }; drawer.setDrawerListener(mDrawerToggle); mMini = (MiniController) findViewById(R.id.miniController1); mCastManager.addMiniController(mMini); }
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); mDrawerToggle.onConfigurationChanged(newConfig); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Sync the toggle state after onRestoreInstanceState has occurred. mDrawerToggle.syncState(); }
@Override public void onPause() { mMini.removeOnMiniControllerChangedListener(mCastManager); super.onPause(); }
@Override public void onResume() { super.onResume(); handleIntent(getIntent()); }
@Override public void onDestroy() { super.onDestroy(); AppLogger.getLogger().Info("HomeScreen Activity: onDestroy"); MainApplication.getAudioService().Terminate(); }
@Override public void onPause() { super.onPause(); AppLogger.getLogger().Info("HomeScreen Activity: onPause"); // mMini.removeOnMiniControllerChangedListener(mCastManager); }