Q:

How to change the actionbars for a tabbed fragment

I have a tabbed fragment I need two different actionbars / same action bar that could like the one shown in the image!
Page 1!
Page 2

A:

After watching both images , you don't need two different actionbar instead have one action bar and two different menu.xml file , when fragment 1 is clicked go to the code of firstFragment class  :
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_one, menu);//here menu_one.xml is called
return true;
}

and on second fragment call this in your secondFragmentclass 
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_two, menu);//here menu_two.xml is called
return true;
}

both menu_one.xml and menu_two.xml will contain different item as per your wish
menu_one.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/someButton"
      android:icon="@drawable/some_button"
      android:title="@string/some_button"
      android:showAsAction="always"/>
</menu>

menu_two.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/someButton2"
      android:icon="@drawable/some_button2"
      android:title="@string/some_button2"
      android:showAsAction="always"/>
</menu>

