title: PreferenceFragmentCompant showing null in onCreatePreferences on rootKey
body: <p>I am having a problem with <code>PreferenceFragmentCompat</code> while trying to develop <code>nested</code> settings for my <code>android</code> application. I have <code>Fragment</code> called Settings <code>Fragment</code> where I have following method:</p>
  
  <pre><code>@Override
      public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
          Log.d("KEY", rootKey + "KEY");
          setPreferencesFromResource(R.xml.pref_main, rootKey);
      }
  </code></pre>
  
  <p>However, when I run the application I always get null to Logcat. Here is my pref_main.xml which have nested PreferencesScreen. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;PreferenceScreen
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:key="test"&gt;
      &lt;PreferenceScreen
          android:key="button_voicemail_category_key"
          android:title="test"
          android:persistent="false"&gt;
          &lt;EditTextPreference
              android:defaultValue="Default value"
              android:key="edit_text_preference_1"
              android:selectAllOnFocus="true"
              android:singleLine="true"
              android:title="Edit text preference" /&gt;
      &lt;/PreferenceScreen&gt;
  
      &lt;CheckBoxPreference
          android:defaultValue="true"
          android:key="check_box_preference_1"
          android:title="Check box preference" /&gt;
  &lt;/PreferenceScreen&gt;
  </code></pre>
  
  <p>Do you have any idea where the problem lies, because I tried many different things but couldn't find a solution for the problem.</p>
  
  <p>I am looking forward to your response!</p>