How to Set the Title and Subtitle for the Action Bar

1. Add an Action Bar.

2. Open the MainActivity.java file and add the line below to the imports section.

 import android.app.ActionBar;

3. Also, in the MainActivity.java file add the below code to the onCreate method.

ActionBar ab = getActionBar(); //needs  import android.app.ActionBar;
ab.setTitle("My Title");
ab.setSubtitle("sub-title");

4. Compile and run!

Resources:
http://stackoverflow.com/questions/14297178/setting-action-bar-title-and-subtitle