title: Layout inside horizontalScrollView that is the size of the screen
body: <p>I am new to android and have been looking for a solution to this but so far no luck. I would like to create a layout that is something like the picture below.</p>
  
  <p>I would like to have a linearLayout that is the size of the screen.Then have another linearLayout that is also the size of the screen but off screen. I can then scroll between the two virtual "screens". </p>
  
  <p><a href="https://i.stack.imgur.com/hWIA5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hWIA5.png" alt="enter image description here"></a></p>
  
  <p>There is an interesting article that explained how to extend the scrollView class so that I could get a cool snapping effect, so if I can get this to work, my app will feel much like scrolling between home screens.</p>
  
  <p>I have read about weights and also about scrollView's fillViewport="true". I am afraid that I don't understand how these can be used with a horizontalScrollView to have the linearLayouts fill the screen. I have attempted all kinds of combinations of fill_parent and wrap_content but to no avail.</p>
  
  <p>As I see it, this functionality will not hurt the portability of the app between devices that have different screens as long as I build the sub views (the elements in each "screen") with screen variability in mind.</p>
  
  <p>Here is a simple example of the XML I was trying:</p>
  
  <pre><code>&lt;HorizontalScrollView
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/HorizontalScrollView01"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:fillViewport="true"&gt;
  
  &lt;LinearLayout 
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  
      &lt;LinearLayout 
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"&gt;
  
          &lt;EditText
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:id="@+id/txtTestBox"
              &gt;
          &lt;/EditText&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout 
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;Button
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="Button 1"
          /&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;/HorizontalScrollView&gt;
  </code></pre>
  
  <p>Unfortunately, that does not even get close to what I am looking for. Hopefully this can be done...</p>
  
  <p>Thanks for any help or suggestions.</p>