The reason you should create this is because the fragment tabs using the ActionBar is now deprecated. This is a new way to create your action bar using Material Design. for this you need to add the dependencies in the build.gradle file.
compile 'com.android.support:appcompat-v7:21.0.0'
create the toolbar file app_bar.xml, you can specify the name you want.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
Make sure you select a theme in styles.xml with
"Theme.AppCompat.NoActionBar"
mainActivity.xml, ,
<include
android:id="@+id/app_toolbar"
layout="@layout/app_toolbar"/>
MainActivity . , setContentView()
toolbar = (Toolbar) findViewById(R.id.app_toolbar);
setSupportActionBar(toolbar);