Android ViewPager with android:layout_weight="1" is not shown
<p>I want to display a scroll view within ViewPager and action buttons below the ViewPager. So I set <code>android:layout_weight="1"</code> to ViewPager, but it was not displayed, and only action buttons was displayed.</p>

<p>The layout of ViewPager is following.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="match_parent"
    android:layout_width="match_parent"&gt;

    &lt;android.support.v4.view.ViewPager
        android:id="@+id/viewpager"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:layout_weight="1" /&gt;

    &lt;LinearLayout
        android:orientation="vertical"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"&gt;

    &lt;TextView
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:paddingBottom="10dp"
        android:text="この記事の投稿者に" /&gt;

    &lt;LinearLayout
        android:orientation="horizontal"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:gravity="center"&gt;

        &lt;Button
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="メールで問い合わせ" /&gt;

        &lt;Button
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="電話で問い合わせ" /&gt;

    &lt;/LinearLayout&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>The layout within ViewPager is following.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_height="match_parent"
    android:layout_width="match_parent"&gt;

    &lt;ScrollView
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:fillViewport="true"&gt;

        &lt;LinearLayout
            android:orientation="vertical"
            android:layout_height="match_parent"
            android:layout_width="match_parent"&gt;

            &lt;TextView
                android:id="@+id/title"
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:layout_marginTop="10dp"
                android:layout_marginBottom="10dp"
                android:textSize="21sp" /&gt;

            &lt;ImageView
                android:id="@+id/image"
                android:layout_height="200dp"
                android:layout_width="200dp"
                android:layout_marginTop="10dp"
                android:layout_marginBottom="10dp"
                android:layout_gravity="center" /&gt;

            &lt;TextView
                android:id="@+id/price"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_marginTop="10dp"
                android:layout_marginBottom="10dp"
                android:textSize="34sp"
                android:textColor="#FF0000" /&gt;

            &lt;TextView
                android:id="@+id/text"
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:layout_marginTop="10dp"
                android:layout_marginBottom="10dp"
                android:textSize="21sp" /&gt;

        &lt;/LinearLayout&gt;
    &lt;/ScrollView&gt;
&lt;/LinearLayout&gt;
</code></pre>
