2016-09-23 6 views
0

私はtablayoutをスクロールする必要がありますが、このコードを書くときはtablayoutは見えません。TabLayoutのVIEWPagerを使ったScrollView

TabLayoutの項目のスクロールテキストに対して、このコードを編集するにはどうすればよいですか?

<ScrollView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"> 
    <android.support.v4.view.ViewPager 
     android:id="@+id/book_viewpager" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content"> 

     <android.support.design.widget.TabLayout 
      android:id="@+id/book_tab_layout" 
      app:tabGravity="fill" 
      android:layout_height="wrap_content" 
      android:layout_width="match_parent"> 

      <android.support.design.widget.TabItem 
       android:id="@+id/book_description_tab_item" 
       android:text="@string/book_description" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" /> 

      <android.support.design.widget.TabItem 
       android:id="@+id/book_reviews_tab_item" 
       android:text="@string/book_reviews" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" /> 

      <android.support.design.widget.TabItem 
       android:id="@+id/book_related_titles_tab_item" 
       android:text="@string/book_related_titles" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" /> 

     </android.support.design.widget.TabLayout> 
    </android.support.v4.view.ViewPager> 
</ScrollView> 

</LinearLayout> 
... 
+0

あなたはandroid:layout_width = "match_parent"にScrollViewsの幅を設定しようとしましたか? – Marijan

+0

はい、私はすべての幅と高さを試してください – rkovtiuk

答えて

1

ScrollViewの代わりに使用android.support.v7.widget.NestedScrollView。 とapp:layout_behaviour = "@文字列/ appbar_scrolling_view_behavior"

+0

親愛なる多くの親愛なる – deepak4666

関連する問題