title: PagerSlidingTabStrip cannot help me change tab Indicator color [Android]
body: <p>I have followed the example</p>
  
  <p><a href="https://github.com/astuetz/PagerSlidingTabStrip" rel="nofollow">https://github.com/astuetz/PagerSlidingTabStrip</a></p>
  
  <p>by extracting the resources xml attributes and Pager class to implement into my class such that the tab indicator color is not pale blue but other colors by setting SetIndicator</p>
  
  <p>When it comes tto the implementation, it seems that I cannot change the color as wished. Would you please tell me how to import the library project or other ways such that I can change the tab indicator color? </p>
  
  <p>The below is my code:</p>
  
  <pre><code>import android.os.Bundle;
  import android.app.ActionBar;
  import android.app.ActionBar.Tab;
  import android.app.ActionBar.TabListener;
  import android.app.FragmentTransaction;
  import android.graphics.Color;
  import android.graphics.drawable.ColorDrawable;
  import android.support.v4.app.FragmentActivity;
  import android.support.v4.view.ViewPager;
  import android.view.Menu;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  
  public class MainActivity extends FragmentActivity implements TabListener {
  
      private ViewPager viewPager;
      private TabsPagerAdapter mAdapter;
      private ActionBar actionBar;
      // Tab titles
      private String[] tabs ;
      private PagerSlidingTabStrip strip;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          // Initilization
  
          strip = (PagerSlidingTabStrip) findViewById(R.id.tabs);
          viewPager = (ViewPager) findViewById(R.id.pager);
          actionBar = getActionBar();     
          actionBar.setBackgroundDrawable(new ColorDrawable(Color.BLACK));
          mAdapter = new TabsPagerAdapter(getSupportFragmentManager());
  
          viewPager.setAdapter(mAdapter);     
          actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);        
          strip.setIndicatorColor(Color.parseColor("#00ffbf"));
      //  strip.setShouldExpand(true);
          //strip.setIndicatorColor(Color.parseColor("#00ffbf"));
      //  strip.setViewPager(viewPager);
  
  
          // Adding Tabs
          tabs = this.getResources().getStringArray(R.array.options);
  
          for (String tab_name : tabs) {
  
  
              actionBar.addTab(actionBar.newTab().setText(tab_name)
                      .setTabListener(this));
          }
  
          /**
           * on swiping the viewpager make respective tab selected
           * */
          viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
  
              @Override
              public void onPageSelected(int position) {
                  // on changing the page
                  // make respected tab selected
                  actionBar.setSelectedNavigationItem(position);
                  //actionBar.getTabAt(position).getCustomView().setBackgroundColor(Color.parseColor("#00ffbf"));
              }
  
              @Override
              public void onPageScrolled(int arg0, float arg1, int arg2) {
              }
  
              @Override
              public void onPageScrollStateChanged(int arg0) {
              }
          });
  
  
      }
  
      @Override
      public void onTabReselected(Tab tab, FragmentTransaction ft) {
      }
  
      @Override
      public void onTabSelected(Tab tab, FragmentTransaction ft) {
          // on tab selected
          // show respected fragment view
  
          viewPager.setCurrentItem(tab.getPosition());
          //  tab.set
          //  
  
      }
  
      @Override
      public void onTabUnselected(Tab tab, FragmentTransaction ft) {
      }
  
      @Override
      protected void onResume() {
          super.onResume();
          //      mSensorManager.registerListener(mSensorListener, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);
      }
  
      @Override
      protected void onPause() {
          super.onPause();
          //      mSensorManager.unregisterListener(mSensorListener);     
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.main, menu);
          return super.onCreateOptionsMenu(menu);
      }
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // The action bar home/up action should open or close the drawer.
          // ActionBarDrawerToggle will take care of this.
          /*  if (mDrawerToggle.onOptionsItemSelected(item)) {
              return true;
          }*/
          // Handle action buttons
          switch(item.getItemId()) {
          /*      case R.id.action_profile:
              startActivity(new Intent(MainActivity.this, Profile.class));
              return true;*/
  
          default:
              return super.onOptionsItemSelected(item);
          }
      }
  
  }
  </code></pre>