コード例 #1
0
 @Override
 public void onResume() {
   super.onResume();
   if (isFresh) {
     buildUI();
   }
 }
コード例 #2
0
  @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);
  }
コード例 #3
0
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   mDrawerToggle.onConfigurationChanged(newConfig);
 }
コード例 #4
0
 @Override
 protected void onPostCreate(Bundle savedInstanceState) {
   super.onPostCreate(savedInstanceState);
   // Sync the toggle state after onRestoreInstanceState has occurred.
   mDrawerToggle.syncState();
 }
コード例 #5
0
 @Override
 public void onPause() {
   mMini.removeOnMiniControllerChangedListener(mCastManager);
   super.onPause();
 }
コード例 #6
0
 @Override
 public void onResume() {
   super.onResume();
   handleIntent(getIntent());
 }
コード例 #7
0
 @Override
 public void onDestroy() {
   super.onDestroy();
   AppLogger.getLogger().Info("HomeScreen Activity: onDestroy");
   MainApplication.getAudioService().Terminate();
 }
コード例 #8
0
 @Override
 public void onPause() {
   super.onPause();
   AppLogger.getLogger().Info("HomeScreen Activity: onPause");
   //        mMini.removeOnMiniControllerChangedListener(mCastManager);
 }