title: PreferenceScreen get "ScrollView can host only one direct child" after returning on
body: <p>I get this error and I do not understand why ...</p>
  
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
                    java.lang.IllegalStateException: ScrollView can host only one direct child
                        at android.widget.ScrollView.addView(ScrollView.java:261)
                        at android.support.design.widget.BaseTransientBottomBar.showView(BaseTransientBottomBar.java:444)
                        at android.support.design.widget.BaseTransientBottomBar$1.handleMessage(BaseTransientBottomBar.java:185)
                        at android.os.Handler.dispatchMessage(Handler.java:101)
                        at android.os.Looper.loop(Looper.java:164)
                        at android.app.ActivityThread.main(ActivityThread.java:6541)
                        at java.lang.reflect.Method.invoke(Native Method)
                        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
  </code></pre>
  
  <p>I get this error when I return to my parameter screen. </p>
  
  <p>The first time I go on everything is good, I click on a preference (THIS_ONE) that opens a viewpager with fragments, I do my things and when I click on the arrow back to return to my screen preferably I get this error. </p>
  
  <p>The problem is that I do not implements myself ScrollView, I leave Android managed this. How to fix this problem?</p>
  
  <pre><code>&lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:custom="http://schemas.android.com/apk/res-auto"
      android:key="@string/preferenceScreen"&gt;
  
      &lt;PreferenceCategory android:title="dfqg"&gt;
  
          &lt;CheckBoxPreference
              android:key="fsdcv"
              android:title="dfg"
              android:summary="fdg"
              android:defaultValue="false"/&gt;
  
          &lt;CheckBoxPreference
              android:key="dfqg"
              android:title="fdgfd"
              android:defaultValue="false" /&gt;
  
          &lt;CheckBoxPreference
              android:key="dfg"
              android:title="dfgdf"
              android:defaultValue="true"/&gt;
  
          &lt;com.*.NumberPickerDialogPreference
              android:key="gdfg"
              android:defaultValue="0"
              android:max="40"
              android:title="dfgdfg"
              android:summary="dfgdfg"
              custom:min="0"
              android:persistent="true" /&gt;
  
      &lt;/PreferenceCategory&gt;
  
      &lt;PreferenceCategory android:title="dfg"&gt;
  
          &lt;Preference
              android:key="THIS_ONE"
              android:title="fdgfd" /&gt;
  
          &lt;CheckBoxPreference
              android:key="fdsf"
              android:title="sdfsdf" /&gt;
  
      &lt;/PreferenceCategory&gt;
  
      &lt;PreferenceCategory android:title="sdfsdf"&gt;
  
  
          &lt;Preference
              android:title="sdfsdf"
              android:key="sdfsd"&gt;
  
          &lt;/Preference&gt;
  
          &lt;Preference
              android:title="sdfdsf"
              android:summary="sdfsdf"
              android:key="fdf"&gt;
  
          &lt;/Preference&gt;
  
      &lt;/PreferenceCategory&gt;
  
      &lt;PreferenceCategory
          android:title="fdsf"
          android:key="fd"
          android:enabled="false"&gt;
          &lt;Preference
              android:title="sdfsdf"
              android:key="sdf"&gt;&lt;/Preference&gt;
          &lt;Preference
              android:title="sdfdf"
              android:key="fd"&gt;&lt;/Preference&gt;
      &lt;/PreferenceCategory&gt;
  
      &lt;PreferenceCategory
          android:title="sdfdsf"
          android:key="fdsf"&gt;
          &lt;CheckBoxPreference
              android:title="dfsfsd"
              android:summary="sdfdsf"
              android:key="fdsfdsf"&gt;&lt;/CheckBoxPreference&gt;
          &lt;Preference
              android:title="sdfs"
              android:summary="sdfsdfsdf"
              android:key="cds"&gt;&lt;/Preference&gt;
  
      &lt;/PreferenceCategory&gt;
  &lt;/PreferenceScreen&gt;
  </code></pre>