title: How to implement in an android application Navigation Drawer + the brand-new Toolbar?
body: <p>I've started to develop an android application, which consist of the following:</p>
  
  <ul>
  <li>MainActivity: extends FragmentActivity.</li>
  <li>Several fragments: extending android.support.v4.app.Fragment each one.</li>
  </ul>
  
  <p>MainActivity starts with the application and it has an ActionBarDrawer (it was a requirement of the client to implement a drawer-like menu). Besides, MainActivity makes fragment transaction: when X option within the drawer is clicked, MainActivity replaces and sets the desired Fragment (a default fragment is set when the application starts).</p>
  
  <p>This picture ilustrates it:
  <img src="https://i.stack.imgur.com/OPM9J.png" alt="screenshoot of my application, with the drawer opened"></p>
  
  <p>My classes:</p>
  
  <pre><code>public class MainActivity extends FragmentActivity {
  
  private DrawerLayout mDrawerLayout;
  private ListView mDrawerList;
  // that is the one which is deprecated: ActionBarDrawerToggle mDrawerToggle:
  private ActionBarDrawerToggle mDrawerToggle;
  
  private CharSequence mDrawerTitle;
  private CharSequence mTitle;
  private String[] mDrawerMenuTitles;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  ...
  
  
  public class FragmentEuskalmet extends Fragment implements    android.widget.AdapterView.OnItemSelectedListener {
  </code></pre>
  
  <p>activity_main.xml layout:</p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/drawer_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;!-- The main content view --&gt;
  &lt;FrameLayout
      android:id="@+id/content_frame"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  
  &lt;!-- The navigation drawer --&gt;
  &lt;ListView android:id="@+id/left_drawer"
      android:layout_width="240dp"
      android:layout_height="match_parent"
      android:layout_gravity="start"
      android:choiceMode="singleChoice"
      android:divider="@android:color/transparent"
      android:dividerHeight="0dp"
      android:background="#111"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>drawer_list_item.xml layout:</p>
  
  <pre><code>&lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@android:id/text1"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:textAppearance="?android:attr/textAppearanceListItemSmall"
  android:gravity="center_vertical"
  android:paddingLeft="16dp"
  android:paddingRight="16dp"
  android:textColor="#fff"
  android:background="?android:attr/activatedBackgroundIndicator"
  android:minHeight="?android:attr/listPreferredItemHeightSmall"/&gt;
  </code></pre>
  
  <p>I've realised that with the release of Android 5.0, ActionBar has been deprecated. So my question is the following: how to change my application to support the new Toolbar, using its new navigation drawer (replacing the deprecated one) and maintaining my Fragment usage within the MainActivity (using FragmentActivity)?</p>
  
  <p>Thanks in advance for your appreciated help!</p>