title: Using a TabListener for triggering Activities with ActionBarSherlock
body: <p>I have had some trouble finding an example I understand for using ActionBarSherlock. I can implement the <code>TabNavigation.java</code> example that comes with the download. I'm not sure how to extend this example so that it triggers a new activity but still keeps the tabs displayed.  Here's the example that I've implemented:</p>
  
  <pre><code>package com.actionbarsherlock.sample.demos;
  
  import android.os.Bundle;
  import android.support.v4.app.FragmentTransaction;
  import android.widget.TextView;
  
  import com.actionbarsherlock.app.ActionBar;
  import com.actionbarsherlock.app.ActionBar.Tab;
  import com.actionbarsherlock.app.SherlockActivity;
  
  public class TabNavigation extends SherlockActivity implements ActionBar.TabListener {
      private TextView mSelected;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          setTheme(SampleList.THEME); //Used for theme switching in samples
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.tab_navigation);
          mSelected = (TextView)findViewById(R.id.text);
  
          getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
          for (int i = 1; i &lt;= 3; i++) {
              ActionBar.Tab tab = getSupportActionBar().newTab();
              tab.setText("Tab " + i);
              tab.setTabListener(this);
              getSupportActionBar().addTab(tab);
          }
      }
  
      @Override
      public void onTabReselected(Tab tab, FragmentTransaction transaction) {
      }
  
      @Override
      public void onTabSelected(Tab tab, FragmentTransaction transaction) {
          mSelected.setText("Selected: " + tab.getText());
      }
  
      @Override
      public void onTabUnselected(Tab tab, FragmentTransaction transaction) {
      }
  }
  </code></pre>
  
  <p>I believe I need to create a new "Listener" class and pass that to the <code>.setTabListener()</code> method. I want to stick with Activities (not Fragments) as I have a pretty complex implementation of ORMLite and I'm not sure how to use ORMLite with Fragments yet.</p>
  
  <p>I want to add a new tab labeled "Profile" which triggers <code>ProfileActivity.class</code>.</p>
  
  <p>Thanks in advance!</p>