このようにviewPagerを設置した場合、その下のtextViewが画面に表示されないのはなぜなのでしょうか?heightはwrap_contentを指定しています。
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="com.example.android.sample.keiba.CalcActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/pushRaceOrderButton" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:text="出走表" /> <Button android:id="@+id/pushCalcButton" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:text="予想画面" /> <Button android:id="@+id/pushTotalButton" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:text="スコア一覧" /> <Button android:id="@+id/pushChatButton" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:text="チャット" /> <Button android:id="@+id/pushAccountButton" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="アカウント" /> </LinearLayout> <android.support.v7.widget.Toolbar android:id="@+id/tool_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <Spinner android:id="@+id/raceSpinner" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:paddingLeft="10dp" android:popupBackground="#ccffffff" /> <Spinner android:id="@+id/hourseSpinner" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:paddingLeft="10dp" android:popupBackground="#ccffffff" /> </LinearLayout> </android.support.v7.widget.Toolbar> <!--この下のviewPagerにスクロールをつけて、そのweightをセットする--> <android.support.v4.view.ViewPager android:id="@+id/pager" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <GridLayout android:id="@+id/number_input" android:layout_width="match_parent" android:layout_height="wrap_content" android:columnCount="6" android:rowCount="3"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="1" android:layout_column="1" android:layout_row="1" android:textSize="15sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2" android:layout_column="2" android:layout_row="1" android:textSize="15sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="3" android:layout_column="3" android:layout_row="1" android:textSize="15sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="4" android:layout_column="4" android:layout_row="1" android:textSize="15sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="5" android:layout_column="5" android:layout_row="1" android:textSize="15sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="6" android:layout_column="1" android:layout_row="2" android:textSize="15sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="7" android:layout_column="2" android:layout_row="2" android:textSize="15sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="8" android:layout_column="3" android:layout_row="2" android:textSize="15sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="9" android:layout_column="4" android:layout_row="2" android:textSize="15sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="10" android:layout_column="5" android:layout_row="2" android:textSize="15sp"/> </GridLayout> </LinearLayout>