title: AppCompatPreferenceActivity up button not working
body: <p>I'm trying to make an activity which extends AppCompatPreferenceActivity and implements an up button in the action bar. Visually everything looks fine, but the up button doesn't respond to touch events. The following is my java and xml code:<p>
  <strong>PrefrencesDisplayActivity.java</strong></p>
  
  <pre><code>package com.example.matthew.testsettings;
  
  import android.support.design.widget.AppBarLayout;
  import android.support.design.widget.CoordinatorLayout;
  import android.support.v7.widget.Toolbar;
  import android.widget.ListView;
  import android.widget.RelativeLayout;
  
  import java.util.List;
  
  public class PreferencesDisplayActivity extends AppCompatPreferenceActivity {
      CoordinatorLayout activityRoot;
      AppBarLayout appBarLayout;
      Toolbar toolbar;
      RelativeLayout contentRoot;
      ListView preferencesList;
  
      @Override
      public void onBuildHeaders(List&lt;Header&gt; target) {
          loadHeadersFromResource(R.xml.preferences, target);
          initialiseUI();
      }
  
      private void initialiseUI() {
          // Inflate activity layout from xml
          setContentView(R.layout.activity_preferences_display);
  
          // Get handles to UI elements
          activityRoot = (CoordinatorLayout) findViewById(R.id.prefDisplay_activity_root);
          appBarLayout = (AppBarLayout) findViewById(R.id.prefdisplay_activity_appBarLayout);
          toolbar = (Toolbar) findViewById(R.id.prefDisplay_activity_toolbar);
          contentRoot = (RelativeLayout) findViewById(R.id.prefDisplay_content_root);
          preferencesList = (ListView) findViewById(android.R.id.list);
  
          // Create and configure action bar
          setSupportActionBar(toolbar);
          getSupportActionBar().setDisplayHomeAsUpEnabled(true);
      }
  }
  </code></pre>
  
  <p><p><strong>activity_prefrences_display.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      android:theme="@style/AppTheme.NoActionBar"
      android:id="@+id/prefDisplay_activity_root"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      tools:context="com.example.matthew.testsettings.PreferencesDisplayActivity"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/prefdisplay_activity_appBarLayout"
          android:layout_height="wrap_content"
          android:layout_width="match_parent"
          android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/prefDisplay_activity_toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              android:background="?attr/colorPrimary"
              app:popupTheme="@style/AppTheme.PopupOverlay"/&gt;
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;include layout="@layout/content_preferences_display"/&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p><p><strong>content_preferences_display.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
      android:id="@+id/prefDisplay_content_root"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"
      tools:showIn="@layout/activity_preferences_display"
      tools:context="com.example.matthew.testsettings.PreferencesDisplayActivity"&gt;
  
      &lt;ListView
          android:id="@id/android:list"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><p><strong>AndroidManifest.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest
      package="com.example.matthew.testsettings"
      xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
  
          &lt;activity
              android:name=".MainActivity"
              android:label="@string/app_name"
              android:theme="@style/AppTheme.NoActionBar"&gt;
  
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN"/&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER"/&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;activity
              android:name=".PreferencesDisplayActivity"
              android:label="@string/title_activity_preferences_display"
              android:parentActivityName="com.example.matthew.testsettings.MainActivity"
              android:theme="@style/AppTheme.NoActionBar"&gt;
  
              &lt;meta-data
                  android:name="android.support.PARENT_ACTIVITY"
                  android:value="com.example.matthew.testsettings.MainActivity"/&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p><p>When I open the app and navigate to the preferences activity, the screen looks as it should but pressing the up button does nothing. Can anyone see my mistake?</p>