android PagerTabStrip to start from left and not center
<p>i have a pager tab strip in my project and when run on emulator or device it starts center like this </p>

<p><a href="https://i.stack.imgur.com/nEx2D.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nEx2D.jpg" alt="enter image description here"></a></p>

<p>what i would like to achieve is to have the tab start left like this </p>

<p><a href="https://i.stack.imgur.com/NYxZH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NYxZH.png" alt="enter image description here"></a></p>

<p>I have tried layout graviity left in my xml but this is not working for me and i can't put my finger on how to resolve this, here is my xml with the pager tab strip.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"&gt;


    &lt;android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/pager"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
        tools:context=".MainActivity" &gt;

        &lt;android.support.v4.view.PagerTabStrip
            android:layout_width="wrap_content"
            android:layout_height="50dp"
            android:background="@drawable/gradient_bg"
            android:textColor="#fff"
            android:textSize="20sp"
            android:id="@+id/tab_strip"
            android:focusableInTouchMode="false"&gt;



        &lt;/android.support.v4.view.PagerTabStrip&gt;


&lt;/android.support.v4.view.ViewPager&gt;




&lt;/LinearLayout&gt;</code></pre>
</div>
</div>
</p>

<p>java code</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>import android.graphics.Color;
import android.graphics.drawable.AnimationDrawable;
import android.media.MediaPlayer;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.PagerTabStrip;
import android.support.v4.view.ViewPager;
import android.os.Bundle;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;


public class MainActivity extends FragmentActivity {

    //adview


    ViewPager pager;
PagerTabStrip tab_strp;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_tab);
        ma_pager_adapter mapager=new ma_pager_adapter(getSupportFragmentManager());
        pager=(ViewPager)findViewById(R.id.pager);
        pager.setAdapter(mapager);
tab_strp=(PagerTabStrip)findViewById(R.id.tab_strip);
tab_strp.setTextColor(Color.WHITE);

     //   tab_strp.setTextSize(14,14);
       // tab_strp.setTabIndicatorColor(Color.WHITE);

        final MediaPlayer mp = MediaPlayer.create(this, R.raw.firsteps);
        mp.start();

    }

    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        if(hasFocus){
            ImageView welcomeText = (ImageView)findViewById(R.id.btsMainTextImage);
            //welcomeText.animate().rotation(1440f).setDuration(2000);


        }
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.share) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }




}</code></pre>
</div>
</div>
</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import java.util.Locale;


//final MediaPlayer mp = MediaPlayer.create(this, R.raw.short_whoosh2);

    public ma_pager_adapter(FragmentManager fm) {
        super(fm);


    }
   //final MediaPlayer mp = MediaPlayer.create(this, R.raw.short_whoosh2);



    @Override
    public Fragment getItem(int i) {
        
        switch (i) {
            case 0:
                tab1 t1 = new tab1();
                return t1;
            case 1:
                tab2 t2 = new tab2();
                return t2;
            case 2:
                tab4 t4 = new tab4();
                return t4;
            case 3:
                tab3 t3 = new tab3();
                return t3;
            case 4:
                tab5 t5 = new tab5();
                return t5;

        }
        return null;
    }



    @Override
    public int getCount() {
        return 5;
    }//set the number of tabs





    @Override
    public CharSequence getPageTitle(int position) {
       Locale l = Locale.getDefault();
        switch (position) {
            case 0:

                return "Tab1";
            case 1:

                return "Tab2";
            case 2:

               return "Tab3";

            case 3:

                return "Tab4";

            case 4:

                return "Tab5";

        }
        return null;
    }



}</code></pre>
</div>
</div>
</p>