title: View in ScrollView isn't matching parent as configured
body: <p>I've got a ViewPager and an ActionBar with tabs. One of these tabs has a ListView and when I tap on one of the options in that ListView, I add a child Fragment which is the detail view for that row. </p>
  
  <p>That detail view is a ScrollView with a LinearLayout inside it. The ScrollView is <code>match_parent/match_parent</code> and the LinearLayout inside it is <code>width=match_parent</code> and <code>height=wrap_content</code>. On a phone-sized emulator, the detail view fills the screen as desired, but on a tablet, the detail view only covers part of the width of the screen... even though the width of the ScrollView and the width of the LinearLayout are both match_parent.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/rootView" style="@style/RootScrollView"&gt;
  
      &lt;LinearLayout android:id="@+id/scrollContentView" style="@style/ScrollViewContent"&gt;
          ...
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>Here is the style for the scroll view:</p>
  
  <pre><code>&lt;style name="RootScrollView"&gt;
      &lt;item name="android:layout_width"&gt;match_parent&lt;/item&gt;
      &lt;item name="android:layout_height"&gt;match_parent&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>Here is the style for the content LinearLayout:</p>
  
  <pre><code>&lt;style name="ScrollViewContent"&gt;
      &lt;item name="android:layout_width"&gt;match_parent&lt;/item&gt;
      &lt;item name="android:layout_height"&gt;wrap_content&lt;/item&gt;
      &lt;item name="android:paddingLeft"&gt;15dp&lt;/item&gt;
      &lt;item name="android:paddingRight"&gt;15dp&lt;/item&gt;
      &lt;item name="android:orientation"&gt;vertical&lt;/item&gt;
      &lt;item name="android:background"&gt;@drawable/image_legal_paper_tile&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>The content view has a repeated background <code>image_legal_paper_tile</code> which is this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;bitmap xmlns:android="http://schemas.android.com/apk/res/android"
      android:src="@drawable/legal_paper_tile" 
      android:gravity="fill_horizontal"
      android:tileMode="repeat" /&gt;
  </code></pre>
  
  <p>So, the image should stretch horizontally and repeat which creates a yellow legal paper pad in the background.</p>
  
  <p>This is what the list and the detail view look like the phone emulator:</p>
  
  <p><img src="https://i.stack.imgur.com/CqMEh.png" alt="enter image description here"></p>
  
  <p>This is what the list and detail view look like on a real tablet. The yellow legal pad fragment SHOULD be filling the entire width of the screen, but it's not.</p>
  
  <p><img src="https://i.stack.imgur.com/Jk5Mx.jpg" alt="enter image description here"></p>
  
  <p>EDIT:</p>
  
  <p>Here is the background legal paper image:</p>
  
  <p><img src="https://i.stack.imgur.com/B5gyS.png" alt="enter image description here"></p>
  
  <p>It's 320px wide. The phone emulator is 480px wide and the image stretches, correctly, to fill the width of the screen. It then repeats vertically as intended. However, it's not stretching to fill the width of the screen on the tablet.</p>
  
  <p>The width shown on the tablet is NOT the native size of the image, because it changes size based on the content. When the fragment first loads, it is one width. Then I fill in the fields and execute the calculation which adds some text at the bottom of the content view. That text is wider than the existing content and so when the text is set the width of the fragment increases to support the wider content.</p>
  
  <p>So, in short, no, the width on the tablet is not the native size of the image. The image IS stretching, just not stretching all the way.</p>