{"action":"opened","issue":{"url":"https://api.github.com/repos/nuuneoi/Lab-Android-DesignLibrary/issues/3","labels_url":"https://api.github.com/repos/nuuneoi/Lab-Android-DesignLibrary/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/nuuneoi/Lab-Android-DesignLibrary/issues/3/comments","events_url":"https://api.github.com/repos/nuuneoi/Lab-Android-DesignLibrary/issues/3/events","html_url":"https://github.com/nuuneoi/Lab-Android-DesignLibrary/issues/3","id":97811757,"number":3,"title":"How to use ViewPager in NestedScrollView?","user":{"login":"Prostoplus","id":12115164,"avatar_url":"https://avatars.githubusercontent.com/u/12115164?v=3","gravatar_id":"","url":"https://api.github.com/users/Prostoplus","html_url":"https://github.com/Prostoplus","followers_url":"https://api.github.com/users/Prostoplus/followers","following_url":"https://api.github.com/users/Prostoplus/following{/other_user}","gists_url":"https://api.github.com/users/Prostoplus/gists{/gist_id}","starred_url":"https://api.github.com/users/Prostoplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prostoplus/subscriptions","organizations_url":"https://api.github.com/users/Prostoplus/orgs","repos_url":"https://api.github.com/users/Prostoplus/repos","events_url":"https://api.github.com/users/Prostoplus/events{/privacy}","received_events_url":"https://api.github.com/users/Prostoplus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-28T22:03:17Z","updated_at":"2015-07-28T22:03:17Z","closed_at":null,"body":"Hello. I have a problem with scrolling ViewPager in NestedScrollView (or ScrollView).\r\nMy code:\r\n<android.support.v4.widget.DrawerLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\"\r\n    android:id=\"@+id/drawerLayout\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    tools:context=\"com.inthecheesefactory.lab.designlibrary.activity.CodeLabActivity\">\r\n\r\n    <android.support.design.widget.CoordinatorLayout\r\n        android:id=\"@+id/rootLayout\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"match_parent\">\r\n\r\n\r\n        <android.support.design.widget.AppBarLayout\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:theme=\"@style/ThemeOverlay.AppCompat.Dark.ActionBar\">\r\n\r\n\r\n            <android.support.design.widget.CollapsingToolbarLayout\r\n                android:id=\"@+id/collapsingToolbarLayout\"\r\n                android:layout_width=\"match_parent\"\r\n                android:layout_height=\"match_parent\"\r\n                app:contentScrim=\"?attr/colorPrimary\"\r\n                app:layout_scrollFlags=\"scroll|enterAlways\">\r\n\r\n\r\n                <ImageView\r\n                    android:layout_width=\"match_parent\"\r\n                    android:layout_height=\"match_parent\"\r\n                    android:layout_gravity=\"center_horizontal|center_vertical\"\r\n                    android:background=\"#123456\"\r\n                    android:scaleType=\"centerCrop\"\r\n                    android:src=\"@drawable/nav_header_bg\" />\r\n\r\n                <android.support.v7.widget.Toolbar\r\n                    android:id=\"@+id/toolbar\"\r\n                    android:layout_width=\"match_parent\"\r\n                    android:layout_height=\"?attr/actionBarSize\"\r\n                    app:layout_collapseMode=\"pin\"\r\n                    app:popupTheme=\"@style/ThemeOverlay.AppCompat.Light\"\r\n                    app:theme=\"@style/ThemeOverlay.AppCompat.Dark.ActionBar\" />\r\n\r\n\r\n            </android.support.design.widget.CollapsingToolbarLayout>\r\n\r\n            <android.support.design.widget.TabLayout\r\n                android:id=\"@+id/tabLayout\"\r\n                android:layout_width=\"match_parent\"\r\n                android:layout_height=\"?attr/actionBarSize\"\r\n                android:minHeight=\"?attr/actionBarSize\"\r\n                app:layout_collapseMode=\"pin\"\r\n                app:tabContentStart=\"0dp\"\r\n                app:tabMode=\"scrollable\"\r\n                app:theme=\"@style/ThemeOverlay.AppCompat.Dark.ActionBar\" />\r\n\r\n\r\n        </android.support.design.widget.AppBarLayout>\r\n\r\n\r\n        <android.support.v4.widget.NestedScrollView\r\n            android:id=\"@+id/nestedScrollViewContent\"\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"match_parent\"\r\n            android:background=\"#ffff0d02\"\r\n            android:fillViewport=\"true\"\r\n            app:layout_behavior=\"@string/appbar_scrolling_view_behavior\">\r\n\r\n            <LinearLayout\r\n                android:id=\"@+id/container\"\r\n                android:minHeight=\"600dp\"\r\n                android:layout_width=\"match_parent\"\r\n                android:layout_height=\"match_parent\"\r\n                android:orientation=\"vertical\">\r\n\r\n                <android.support.v4.view.ViewPager\r\n                    android:id=\"@+id/viewpager\"\r\n                    android:layout_width=\"match_parent\"\r\n                    android:layout_height=\"0dp\"\r\n                    android:layout_weight=\"1\"\r\n                    android:background=\"#ff00ffd5\"\r\n                     />\r\n            </LinearLayout>\r\n\r\n        </android.support.v4.widget.NestedScrollView>\r\n\r\n    </android.support.design.widget.CoordinatorLayout>\r\n\r\n    <android.support.design.widget.NavigationView\r\n        android:id=\"@+id/navigation\"\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"match_parent\"\r\n        android:layout_gravity=\"start\"\r\n        app:headerLayout=\"@layout/nav_header\"\r\n        app:itemIconTint=\"@color/nav_item_icon_tint_color\"\r\n        app:itemTextColor=\"@color/nav_item_text_color\"\r\n        app:menu=\"@menu/navigation_drawer_items\" />\r\n</android.support.v4.widget.DrawerLayout>\r\n"}}