title: scrollview not scrolling android
body: <p>The ScrollView item is not doing what it should: I can´t scroll. </p>
  
  <p>The code below is a part from a fragment, with splitted screen (thats why I use weight=1). The content of the RelativeLayout is added via code dynamically. The content appears correctly, it is more that could fit onto the screen, so it should be possible to scroll. </p>
  
  <p>I tried out several things: </p>
  
  <ul>
  <li>changing RelativesLayout-height to wrap-content</li>
  <li>adding fillViewport="true" to the ScrollView</li>
  <li>scrollview not as root element</li>
  </ul>
  
  <p>THE LAYOUT FILE OF THE FRAGMENT</p>
  
  <blockquote>
  <pre><code>  &lt;LinearLayout
      android:id="@+id/schichten"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="tuerk.fabian.polarfuchs.AllgemeineInfosFragment"&gt;
  
      &lt;ScrollView
          android:layout_weight="1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:fillViewport="true" &gt;
  
          &lt;RelativeLayout android:id="@+id/schichten_upper_half"
              android:isScrollContainer="true"
              android:layout_height="wrap_content"
              android:layout_width="match_parent"
              android:paddingLeft="@dimen/activity_horizontal_margin"
              android:paddingRight="@dimen/activity_horizontal_margin"/&gt;
  
      &lt;/ScrollView&gt;
  </code></pre>
  </blockquote>
  
  <p>THE LAYOUT FILE OF THE CONTENT THAT IS DYNAMICALLY ADDED TO THE FRAGMENT (INTO @+id/schichten_upper_half)</p>
  
  <blockquote>
    
    
    <p></p>
  
  <pre><code>&lt;RelativeLayout
      android:layout_height="wrap_content"
      android:layout_width="wrap_content"
      android:layout_centerHorizontal="true"&gt;
  
      &lt;TextView
          android:id="@+id/schichten_ansicht_haerte"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="FA"
          android:textSize="20sp"
          android:paddingRight="10sp"
          android:layout_centerVertical="true"/&gt;
  
      &lt;TextView
          android:id="@+id/schichten_ansicht_von_height"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="10 cm"
          android:layout_toRightOf="@+id/schichten_ansicht_haerte"/&gt;
  
      &lt;TextView
          android:id="@+id/schichten_ansicht_bis_height"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="10 cm"
          android:layout_below="@id/schichten_ansicht_von_height"
          android:layout_toRightOf="@+id/schichten_ansicht_haerte"/&gt;
  
      &lt;TextView
          android:id="@+id/schichten_ansicht_naesse"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="4"
          android:textSize="20sp"
          android:paddingLeft="10sp"
          android:layout_centerVertical="true"
          android:layout_toRightOf="@+id/schichten_ansicht_bis_height"/&gt;
  
      &lt;ImageView
          android:id="@+id/schichten_ansicht_1st_grain_form"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/df"
          android:paddingLeft="10sp"
          android:layout_toRightOf="@id/schichten_ansicht_naesse"/&gt;
  
      &lt;ImageView
          android:id="@+id/schichten_ansicht_2nd_grain_form"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/df"
          android:layout_toRightOf="@id/schichten_ansicht_1st_grain_form"/&gt;
  
      &lt;TextView
          android:id="@+id/schichten_ansicht_durchmesser_von"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="0.1 "
          android:layout_centerVertical="true"
          android:paddingLeft="10sp"
          android:layout_toRightOf="@+id/schichten_ansicht_2nd_grain_form"/&gt;
  
      &lt;TextView
          android:id="@+id/schichten_ansicht_durchmesser_bis"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="- 0.3 mm"
          android:layout_centerVertical="true"
          android:layout_toRightOf="@+id/schichten_ansicht_durchmesser_von"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
    
    <p></p>
  </blockquote>
  
  <p>THE LAYOUT FILE OF THE ACITIVITY</p>
  
  <blockquote>
    <p>
    </p>
  
  <pre><code>&lt;android.support.design.widget.AppBarLayout
      android:id="@+id/appbar"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:paddingTop="@dimen/appbar_padding_top"
      android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:background="?attr/colorPrimary"
          app:layout_scrollFlags="scroll|enterAlways"
          app:popupTheme="@style/AppTheme.PopupOverlay"&gt;
  
      &lt;/android.support.v7.widget.Toolbar&gt;
  
      &lt;android.support.design.widget.TabLayout
          android:id="@+id/tabs"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;android.support.v4.view.ViewPager
      android:id="@+id/container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/fab"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="end|bottom"
      android:layout_margin="@dimen/fab_margin"
      app:srcCompat="@android:drawable/ic_dialog_email" /&gt;
  </code></pre>
    
    <p></p>
  </blockquote>