title: How to add a project ActionBar ViewPage Swipe using SupportLibrary AppcomptV7?
body: <p>The question is not as complex as it seems.
  I made this design based on some tutorials on the internet.
  I have a tabbed browsing with swipe using SupportLibrary for devices prior to Honeycomb can visualize.</p>
  
  <p>Now I want to add a ActionBar in the application. Also by using the SuportLibrary appcompat.v7.</p>
  
  <p>I've used the appcompat.v7 to create an application with ActionBar compatible with older versions of Android.</p>
  
  <p>What I'm not getting now and join these two navigational structures.</p>
  
  <p>I really want to add to this mu ActionBar project with swipe tabs below:</p>
  
  <p><strong>MainActivity</strong>:</p>
  
  <pre><code>package br.com.wgbn.poemadodiav2;
  
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  import android.support.v4.view.ViewPager;
  import android.support.v7.app.ActionBar;
  import android.view.Menu;
  
  public class MainActivity extends FragmentActivity {
  
      private ActionBar actionBar;
      private ViewPager mViewPager;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          mViewPager = (ViewPager) findViewById(R.id.viewpager);
  
          TitleAdapter titleAdapter = new TitleAdapter(getSupportFragmentManager());
          mViewPager.setAdapter(titleAdapter);
          mViewPager.setCurrentItem(0);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  }
  </code></pre>
  
  <p><strong>TitleAdapter</strong>:</p>
  
  <pre><code>package br.com.wgbn.poemadodiav2;
  
  import android.support.v4.app.Fragment;
  import android.support.v4.app.FragmentManager;
  import android.support.v4.app.FragmentPagerAdapter;
  import android.util.Log;
  
  public class TitleAdapter extends FragmentPagerAdapter{
          private String titles[] = new String[]{"O Poema do Dia","Comentários"};
          private Fragment frags[] = new Fragment[titles.length]; 
  
          public TitleAdapter(FragmentManager fm) {
                  super(fm);
                  frags[0] = new FragmentView1();
                  frags[1] = new FragmentView2();
          }
  
          @Override
          public CharSequence getPageTitle (int position){
                  Log.v("TitleAdapter - getPageTitle=", titles[position]);
                  return titles[position];
          }
  
          @Override
          public Fragment getItem(int position) {
                  Log.v("TitleAdapter - getItem=", String.valueOf(position));
                  return frags[position];
          }
  
          @Override
          public int getCount() {
                  return frags.length;
          }
  
  }
  </code></pre>
  
  <p><strong>activity_main.xml</strong>:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      tools:context=".MainActivity" &gt;
  
      &lt;android.support.v4.view.ViewPager
         android:id="@+id/viewpager"
         android:layout_width="fill_parent"
         android:layout_height="0dp"
         android:layout_weight="1"&gt;
  
              &lt;android.support.v4.view.PagerTabStrip
                  android:id="@+id/pagerTabStrip"
                  android:layout_gravity="bottom"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:background="#cccccc"/&gt;
  
      &lt;/android.support.v4.view.ViewPager&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>This is the image of the app working so far.</p>
  
  <p><img src="https://i.stack.imgur.com/06RB4.png" alt="enter image description here"></p>
  
  <p>I hope you can help me.</p>
  
  <h3>EDIT</h3>
  
  <p>Following the guidance of NikolaDespotoski, decided the issue only changing the extension class for ActionBarActivity!
  Actually I was thinking it had to implement the two things together, without realizing that ActionBarActivity already encompassed both.
  My code looked like this, and it worked:</p>
  
  <p>import android.os.Bundle;
  import android.support.v4.view.ViewPager;
  import android.support.v7.app.ActionBar;
  import android.support.v7.app.ActionBarActivity;
  import android.view.Menu;</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
      // code here
  }
  </code></pre>
  
  <p>Thanks!</p>