Using the design tablayout + viewpager material the tablayout material everything works fine, but if I try to set the parent view as ScrollView so that the whole screen can scroll once when the user tries to see the contents of the tab fragments, because the fragment contains a listview, so it becomes very low on small ones devices. After adding scrollview my fragments of viewpager are not displayed? How to overcome in this situation?
<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:fillViewport="true"> <android.support.design.widget.CoordinatorLayout android:id="@+id/tabanim_maincontent" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/tabanim_appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.design.widget.TabLayout android:id="@+id/tabanim_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" /> </android.support.design.widget.AppBarLayout> <android.support.v4.view.ViewPager android:id="@+id/tabanim_viewpager" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> </android.support.design.widget.CoordinatorLayout> </ScrollView>
I tried to use CoOrdinator without layout, none of them work
android android-viewpager android-tablayout android-coordinatorlayout
Erum Aug 29 '15 at 16:05 2015-08-29 16:05
source share