private void prepareActionBar() {
   ActionBar mActionBar = getSupportActionBar();
   mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
   mActionBar.setDisplayHomeAsUpEnabled(true);
   mActionBar.setDisplayShowHomeEnabled(false);
   mActionBar.setTitle(R.string.local);
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
      setTheme(R.style.Theme_Sherlock_Light);
    }

    super.onCreate(savedInstanceState);
    setContentView(R.layout.footer);

    viewPager = (ViewPager) findViewById(R.id.pager);
    viewPager.setOnPageChangeListener(onPageChangeListener);
    viewPager.setAdapter(new PagerAdapters(getSupportFragmentManager()));

    actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    actionBar.setDisplayShowTitleEnabled(true);

    Tab tab = actionBar.newTab().setText("Categories").setTabListener(new TabListnr());

    actionBar.addTab(tab);

    tab = actionBar.newTab().setText("My Posts").setTabListener(new TabListnr());

    actionBar.addTab(tab);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.year_browser);
    // set the home button in actionbar
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionBar.setTitle("Courses by Year");

    ActionBar.Tab year1Tab = actionBar.newTab().setText("Year 1");
    ActionBar.Tab year2Tab = actionBar.newTab().setText("Year 2");
    ActionBar.Tab year3Tab = actionBar.newTab().setText("Year 3");
    ActionBar.Tab year4Tab = actionBar.newTab().setText("Year 4");
    ActionBar.Tab year5Tab = actionBar.newTab().setText("Year 5");

    Fragment year1Frag = new Year1Fragment();
    Fragment year2Frag = new Year2Fragment();
    Fragment year3Frag = new Year3Fragment();
    Fragment year4Frag = new Year4Fragment();
    Fragment year5Frag = new Year5Fragment();

    year1Tab.setTabListener(new YearTabsListener(year1Frag));
    year2Tab.setTabListener(new YearTabsListener(year2Frag));
    year3Tab.setTabListener(new YearTabsListener(year3Frag));
    year4Tab.setTabListener(new YearTabsListener(year4Frag));
    year5Tab.setTabListener(new YearTabsListener(year5Frag));

    actionBar.addTab(year1Tab);
    actionBar.addTab(year2Tab);
    actionBar.addTab(year3Tab);
    actionBar.addTab(year4Tab);
    actionBar.addTab(year5Tab);
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {

    requestWindowFeature(Window.FEATURE_PROGRESS);

    super.onCreate(savedInstanceState);

    setContentView(R.layout.webview);

    ActionBar ab = getSupportActionBar();
    ab.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    ab.setDisplayShowTitleEnabled(true);
    ab.setDisplayHomeAsUpEnabled(true);

    mWebView = (WebView) findViewById(R.id.webView);
    mWebView.getSettings().setUserAgentString(Constants.USER_AGENT);
    mWebView.getSettings().setBuiltInZoomControls(true);
    mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);

    // load URL if one was provided in the intent
    String url = getIntent().getStringExtra("url");
    if (url != null) {
      loadUrl(url);
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // If we get created for the first time we get our data from the intent
    Bundle data = savedInstanceState != null ? savedInstanceState : getIntent().getExtras();
    session = (Session) data.getSerializable(Session.IDENTIFIER);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    ActionBar.Tab tab =
        getSupportActionBar()
            .newTab()
            .setText(R.string.info)
            .setTabListener(
                new TabListener<NodeListFragment>(this, "NodeList", NodeListFragment.class));
    actionBar.addTab(tab);

    if (session.getResult() != null) {
      tab =
          getSupportActionBar()
              .newTab()
              .setText(R.string.Result)
              .setTabListener(new TabListener<InfoFragment>(this, "Info", InfoFragment.class));
      actionBar.addTab(tab);
    }

    if (savedInstanceState != null)
      getSupportActionBar()
          .selectTab(getSupportActionBar().getTabAt(savedInstanceState.getInt("Tab", 0)));
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.data_layout);

    d_pb_ll = (LinearLayout) findViewById(R.id.data_progressbar_ll);
    dataUsedText = (TextView) findViewById(R.id.dataUsedText);
    mProgress = (ProgressBar) findViewById(R.id.percentDataUsed);
    dell = (LinearLayout) findViewById(R.id.data_error);
    detv = (TextView) findViewById(R.id.tv_failure);
    deb = (Button) findViewById(R.id.button_send_data);
    actionbar = getSupportActionBar();
    actionbar.setTitle("Data Usage");
    actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    actionbar.setHomeButtonEnabled(true);
    actionbar.setDisplayHomeAsUpEnabled(true);

    graph = (XYPlot) findViewById(R.id.mySimpleXYPlot);
    graph.setOnTouchListener(this);
    graph.setMarkupEnabled(false);

    labels = new Long[288];
    downdata = new Float[288];
    totaldata = new Float[288];

    httpclient = ConnectionHelper.getThreadSafeClient();
    httpclient.getCookieStore().clear();
    BasicClientCookie cookie =
        new BasicClientCookie("AUTHCOOKIE", ConnectionHelper.getPNAAuthCookie(this, httpclient));
    cookie.setDomain(".pna.utexas.edu");
    httpclient.getCookieStore().addCookie(cookie);
    new fetchDataTask(httpclient).execute();
    new fetchProgressTask(httpclient).execute();
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (getIntent().hasExtra("template_story")) {
      templateStory = true;
    }

    if (getIntent().hasExtra("template_path")) {
      templateJsonPath = getIntent().getStringExtra("template_path");
    }

    if (getIntent().hasExtra("story_mode")) {
      storyMode = getIntent().getIntExtra("story_mode", Project.STORY_TYPE_VIDEO);
    }

    mContext = getBaseContext();

    setContentView(R.layout.activity_scene_editor_no_swipe);

    // Set up the action bar.
    final ActionBar actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionBar.setDisplayHomeAsUpEnabled(true);

    // For each of the sections in the app, add a tab to the action bar.
    actionBar.addTab(actionBar.newTab().setText(R.string.tab_add_clips).setTabListener(this));
    actionBar.addTab(actionBar.newTab().setText(R.string.tab_order).setTabListener(this));
    actionBar.addTab(actionBar.newTab().setText(R.string.tab_publish).setTabListener(this));

    showHelp();
  }
  /**
   * Sets the activity that is enhanced with a tab bar
   *
   * <p>This method must be run on the UI thread!
   */
  public void setSherlock(ActionBarSherlock sherlock) {
    if (this.sherlock != null && this.sherlock != sherlock)
      throw new IllegalStateException("May only set ActionBarSherlock instance of tab bar once");

    this.sherlock = sherlock;

    final ActionBar actionBar = sherlock.getActionBar();

    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionBar.setDisplayShowHomeEnabled(false);
    actionBar.setDisplayShowTitleEnabled(false);
  }
  @Override
  protected void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    ActionBar actionBar = this.getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionBar.setDisplayHomeAsUpEnabled(true);

    setContentView(R.layout.contact_selection_activity);

    setupContactsTab();
    setupGroupsTab();
    setupRecentTab();
  }
Example #10
0
  @Override
  protected void onCreate(Bundle arg0) {
    // TODO Auto-generated method stub
    super.onCreate(arg0);
    setContentView(R.layout.activity_balance);
    HeadBar headBar = (HeadBar) findViewById(R.id.HeadBar);

    headBar.setTitle("已支付报单详情报单查询");
    headBar.setRightType(BtnType.empty);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    tabController = new TabController();
    headBar.setWidgetClickListener(this);
  }
Example #11
0
  private void fillTabs() {
    mActionBar.removeAllTabs();
    mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    mActionBar.setSubtitle(
        StringUtils.isBlank(mSelectBranchTag) ? mRepository.getMasterBranch() : mSelectBranchTag);

    mAdapter = new RepositoryAdapter(getSupportFragmentManager());
    mPager = (ViewPager) findViewById(R.id.pager);
    mPager.setAdapter(mAdapter);

    mPager.setOnPageChangeListener(
        new OnPageChangeListener() {

          @Override
          public void onPageScrollStateChanged(int arg0) {}

          @Override
          public void onPageScrolled(int arg0, float arg1, int arg2) {}

          @Override
          public void onPageSelected(int arg0) {
            mActionBar.getTabAt(arg0).select();
          }
        });

    Tab tab =
        mActionBar
            .newTab()
            .setText(R.string.about)
            .setTabListener(new TabListener<SherlockFragmentActivity>(this, 0 + "", mPager));
    mActionBar.addTab(tab, mCurrentTab == 0);

    tab =
        mActionBar
            .newTab()
            .setText(R.string.repo_files)
            .setTabListener(new TabListener<SherlockFragmentActivity>(this, 1 + "", mPager));
    mActionBar.addTab(tab, mCurrentTab == 1);

    tab =
        mActionBar
            .newTab()
            .setText(getResources().getQuantityString(R.plurals.commit, 2))
            .setTabListener(new TabListener<SherlockFragmentActivity>(this, 2 + "", mPager));
    mActionBar.addTab(tab, mCurrentTab == 2);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (savedInstanceState != null) {
      mCount = savedInstanceState.getInt(STATE_COUNT);
      mSortName = savedInstanceState.getString(STATE_SORT_NAME);
    }

    final ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayShowTitleEnabled(false);
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    ArrayAdapter<CharSequence> mSpinnerAdapter =
        ArrayAdapter.createFromResource(this, R.array.plays_filter, R.layout.sherlock_spinner_item);
    mSpinnerAdapter.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item);
    actionBar.setListNavigationCallbacks(mSpinnerAdapter, this);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    app = TRAApplication.getApp();
    TAG = getClass().getName();
    // Log.i("SWall",TAG+":onCreate");
    defaultRequestData = new Bundle();
    defaultRequestData.putString(
        ServiceManager.Constants.KEY_USER_NAME, getCurrentAccount().userName);

    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
      actionBar.setCustomView(R.layout.title_bar);
      actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
      actionBar.setIcon(R.drawable.icon);
      actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
      actionBar.setDisplayShowCustomEnabled(true);
      actionBar.setBackgroundDrawable(getResources().getDrawable((R.color.bg)));
    }

    UmengUpdateAgent.setUpdateAutoPopup(false);
    UmengUpdateAgent.setDialogListener(
        new UmengDialogButtonListener() {

          @Override
          public void onClick(int status) {
            switch (status) {
              case UpdateStatus.Update:
                break;
              case UpdateStatus.Ignore:
                break;
              case UpdateStatus.NotNow:
                break;
            }
          }
        });
    //        if(isIgnoredOnce) {
    //            UmengUpdateAgent.update(this);
    //        }
    UmengUpdateAgent.setUpdateListener(this);
    UmengUpdateAgent.update(app.getApplicationContext());

    showQuitButton();

    setBackConfirm(false);
  }
  /** Set up action bar navigation list and listener callbacks */
  private void setupActionBarNavigation() {
    // set up spinner adapter for navigation list
    Cursor accountsCursor = mAccountsDbAdapter.fetchAllRecordsOrderedByFullName();

    SpinnerAdapter mSpinnerAdapter =
        new QualifiedAccountNameCursorAdapter(
            getSupportActionBar().getThemedContext(),
            R.layout.sherlock_spinner_item,
            accountsCursor);
    ((ResourceCursorAdapter) mSpinnerAdapter)
        .setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    actionBar.setListNavigationCallbacks(mSpinnerAdapter, mTransactionListNavigationListener);
    actionBar.setDisplayHomeAsUpEnabled(true);

    updateNavigationSelection();
  }
  private void prepareActionBar() {
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowTitleEnabled(false);

    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    mSpinnerAdapter =
        new ArrayAdapter<CharSequence>(
            this, android.R.layout.simple_spinner_dropdown_item, locations);
    actionBar.setListNavigationCallbacks(
        mSpinnerAdapter,
        new ActionBar.OnNavigationListener() {
          @Override
          public boolean onNavigationItemSelected(int itemPosition, long itemId) {
            return true;
          }
        });
  }
Example #16
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    pager = new ViewPager(this);
    pager.setId(3843989);
    setContentView(pager);

    ActionBar ab = getSupportActionBar();
    ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    ta = new TabsAdapter(this, pager);
    ta.addTab(ab.newTab().setText(R.string.tab_countdown), CountdownFragment.class, null);
    ta.addTab(ab.newTab().setText(R.string.tab_news), ContentFragment.class, null);
    ta.addTab(ab.newTab().setText(R.string.tab_chat), ChatFragment.class, null);

    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
    pager.setCurrentItem(getIntent().getIntExtra("page", sp.getInt("last_page", 0)));
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.movies_activity);

    final ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayShowTitleEnabled(false);
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    ArrayAdapter<CharSequence> mActionBarList =
        ArrayAdapter.createFromResource(this, R.array.movie_lists, R.layout.sherlock_spinner_item);
    mActionBarList.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item);
    actionBar.setListNavigationCallbacks(mActionBarList, this);

    // try to restore previously set nav item
    final SharedPreferences prefs =
        PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
    final int navItem = prefs.getInt(AppPreferences.KEY_NAVSELECTION, 0);
    actionBar.setSelectedNavigationItem(navItem);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ActionBar actionbar = getSupportActionBar();
    actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionbar.setTitle("PROFILE");
    Tab frag1tab = actionbar.newTab().setText("LOGIN");
    Tab frag2tab = actionbar.newTab().setText("REGISTER");

    Fragment fragment1 = new LoginFragment();
    Fragment fragment2 = new RegistrationFragment();

    frag1tab.setTabListener(new MyTabListener(fragment1));
    frag2tab.setTabListener(new MyTabListener(fragment2));

    actionbar.addTab(frag1tab);
    actionbar.addTab(frag2tab);
  }
Example #19
0
  private void initListNav() {
    ArrayList<String> items = new ArrayList<String>();
    ArrayAdapter<String> nav = null;
    ActionBar bar = getSupportActionBar();

    for (int type : MAP_TYPE_NAMES) {
      items.add(getString(type));
    }

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
      nav =
          new ArrayAdapter<String>(
              bar.getThemedContext(), android.R.layout.simple_spinner_item, items);
    } else {
      nav = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, items);
    }

    nav.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    bar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    bar.setListNavigationCallbacks(nav, this);
  }
Example #20
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (getSupportFragmentManager().findFragmentById(android.R.id.content) != null) {
      FragmentManager fragMgr = getSupportFragmentManager();
      FragmentTransaction ft = fragMgr.beginTransaction();
      ft.detach(getSupportFragmentManager().findFragmentById(android.R.id.content));
      ft.commit();
    }

    tracker = GoogleAnalyticsTracker.getInstance();

    // Start the tracker in manual dispatch mode...
    tracker.startNewSession(Keys.ANALYTICS_KEY, this);
    // setup action bar for tabs
    ActionBar actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);

    Tab friendsTab =
        actionBar
            .newTab()
            .setText(R.string.friends_tabtitle)
            .setTabListener(
                new TabListenerList<FriendListFragment>(this, "friends", FriendListFragment.class));
    actionBar.addTab(friendsTab, true);

    Tab groupsTab =
        actionBar
            .newTab()
            .setText(R.string.groups_tabtitle)
            .setTabListener(
                new TabListenerList<GroupListFragment>(this, "groups", GroupListFragment.class));
    actionBar.addTab(groupsTab, true);

    actionBar.setSelectedNavigationItem(0);
  }
  private void setupActionBar() {
    ActionBar actionBar = getActionBar();
    if (actionBar == null) return;

    actionBar.setDisplayShowTitleEnabled(false);
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);

    ActionBar.OnNavigationListener navigationListener =
        new ActionBar.OnNavigationListener() {
          @Override
          public boolean onNavigationItemSelected(int itemPosition, long itemId) {
            ReaderTag tag = (ReaderTag) getActionBarAdapter().getItem(itemPosition);
            if (tag != null) {
              setCurrentTag(tag.getTagName());
              AppLog.d(T.READER, "tag chosen from actionbar: " + tag.getTagName());
            }
            return true;
          }
        };

    actionBar.setListNavigationCallbacks(getActionBarAdapter(), navigationListener);
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    ActionBar bar = getSupportActionBar();
    bar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    bar.setDisplayShowHomeEnabled(false);
    bar.setDisplayShowTitleEnabled(false);

    String state = Environment.getExternalStorageState();
    if (!(Environment.MEDIA_MOUNTED.equals(state)
        || Environment.MEDIA_MOUNTED_READ_ONLY.equals(state))) {
      setResult(-1);
      finish();
    }

    setContentView(R.layout.directory);

    list = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, android.R.id.text1);
    filter = (FileFilter) getIntent().getExtras().getParcelable("filter");
    setupUI();
    setDirView();
  }
Example #23
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    bookId = getIntent().getIntExtra(EXTRA_bookId, -1);
    chapter_1 = getIntent().getIntExtra(EXTRA_chapter, 0);
    verse_1 = getIntent().getIntExtra(EXTRA_verse, 0);

    ActionBar actionBar = getSupportActionBar();

    if (getResources().getBoolean(R.bool.screen_sw_check_min_600dp) == false) {
      // The following two options trigger the collapsing of the main action bar view.
      actionBar.setDisplayShowHomeEnabled(false);
      actionBar.setDisplayShowTitleEnabled(false);
    }

    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionBar.addTab(
        actionBar
            .newTab()
            .setTag(tab_dialer)
            .setText(R.string.goto_tab_dialer_label)
            .setTabListener(
                new TabListener<GotoDialerFragment>(
                    this,
                    "dialer",
                    GotoDialerFragment.class,
                    GotoDialerFragment.createArgs(bookId, chapter_1, verse_1)))); // $NON-NLS-1$
    actionBar.addTab(
        actionBar
            .newTab()
            .setTag(tab_direct)
            .setText(R.string.goto_tab_direct_label)
            .setTabListener(
                new TabListener<GotoDirectFragment>(
                    this,
                    "direct",
                    GotoDirectFragment.class,
                    GotoDirectFragment.createArgs(bookId, chapter_1, verse_1)))); // $NON-NLS-1$
    actionBar.addTab(
        actionBar
            .newTab()
            .setTag(tab_grid)
            .setText(R.string.goto_tab_grid_label)
            .setTabListener(
                new TabListener<GotoGridFragment>(
                    this,
                    "grid",
                    GotoGridFragment.class,
                    GotoGridFragment.createArgs(bookId, chapter_1, verse_1)))); // $NON-NLS-1$

    if (savedInstanceState == null) {
      // get from preferences
      int tabUsed = Preferences.getInt(Prefkey.goto_last_tab, 0);
      if (tabUsed >= 1 && tabUsed <= 3) {
        actionBar.setSelectedNavigationItem(tabUsed - 1 /* to make it 0-based */);
      }
    } else {
      actionBar.setSelectedNavigationItem(savedInstanceState.getInt(INSTANCE_STATE_tab, 0));
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    if (Conf.codePoint == null) finish();

    this.point = Conf.codePoint;

    myTimer2 = new Timer();
    uiHandler2 = new Handler();

    myTimer3 = new Timer();
    uiHandler3 = new Handler();

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_map);

    // add bar
    actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    // add 1st tab
    tab1 = actionBar.newTab();
    tab1.setText(" 1 ");
    tab1.setTabListener(this);
    actionBar.addTab(tab1);

    // add 2nd tab
    tab2 = actionBar.newTab();
    tab2.setText(" 2 ");
    tab2.setTabListener(this);
    actionBar.addTab(tab2);

    // add 3nd tab
    tab3 = actionBar.newTab();
    tab3.setText(" 3 ");
    tab3.setTabListener(this);
    actionBar.addTab(tab3);

    // add 4nd tab
    tab4 = actionBar.newTab();
    tab4.setText(" 4 ");
    tab4.setTabListener(this);
    actionBar.addTab(tab4);

    actionBar.hide();

    // UPDATE STATUS
    myTimer2.schedule(
        new TimerTask() {
          @Override
          public void run() {
            uiHandler2.post(
                new Runnable() {
                  @Override
                  public void run() {
                    updateUpdateInfo();
                  }
                });
          };
        },
        0L,
        1L * 1000);

    isOnline();
  }