{"action":"created","issue":{"url":"https://api.github.com/repos/henrytao-me/smooth-app-bar-layout/issues/155","repository_url":"https://api.github.com/repos/henrytao-me/smooth-app-bar-layout","labels_url":"https://api.github.com/repos/henrytao-me/smooth-app-bar-layout/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/henrytao-me/smooth-app-bar-layout/issues/155/comments","events_url":"https://api.github.com/repos/henrytao-me/smooth-app-bar-layout/issues/155/events","html_url":"https://github.com/henrytao-me/smooth-app-bar-layout/issues/155","id":184818243,"number":155,"title":"Is it possible to touch the ViewPager inside CollapsingToolbarLayout and scroll it?","user":{"login":"ssung99","id":15084536,"avatar_url":"https://avatars2.githubusercontent.com/u/15084536?v=4","gravatar_id":"","url":"https://api.github.com/users/ssung99","html_url":"https://github.com/ssung99","followers_url":"https://api.github.com/users/ssung99/followers","following_url":"https://api.github.com/users/ssung99/following{/other_user}","gists_url":"https://api.github.com/users/ssung99/gists{/gist_id}","starred_url":"https://api.github.com/users/ssung99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssung99/subscriptions","organizations_url":"https://api.github.com/users/ssung99/orgs","repos_url":"https://api.github.com/users/ssung99/repos","events_url":"https://api.github.com/users/ssung99/events{/privacy}","received_events_url":"https://api.github.com/users/ssung99/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-24T11:44:57Z","updated_at":"2018-04-30T15:49:56Z","closed_at":null,"author_association":"NONE","body":"I want to touch ViewPager inside CollapsingToolbarLayout, vertical scroll \nPlease help me\n\nIt is my .xml file\n\n<android.support.design.widget.CoordinatorLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:fitsSystemWindows=\"true\">\n\n```\n<me.henrytao.smoothappbarlayout.widget.NestedScrollView\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n  ...\n</me.henrytao.smoothappbarlayout.widget.NestedScrollView>\n\n<me.henrytao.smoothappbarlayout.SmoothAppBarLayout\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"400dp\">\n    <android.support.design.widget.CollapsingToolbarLayout\n        android:id=\"@+id/collapsing_toolbar\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:layout_scrollFlags=\"scroll|exitUntilCollapsed\"\n        app:layout_collapseParallaxMultiplier=\"0.7\"\n        app:contentScrim=\"@color/white\">\n        <ViewPager\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            app:layout_collapseMode=\"parallax\"\n            app:layout_collapseParallaxMultiplier=\"0.7\"/>\n    </android.support.design.widget.CollapsingToolbarLayout>\n</me.henrytao.smoothappbarlayout.SmoothAppBarLayout>\n```\n\n...\n\n</android.support.design.widget.CoordinatorLayout>\n"},"comment":{"url":"https://api.github.com/repos/henrytao-me/smooth-app-bar-layout/issues/comments/385440888","html_url":"https://github.com/henrytao-me/smooth-app-bar-layout/issues/155#issuecomment-385440888","issue_url":"https://api.github.com/repos/henrytao-me/smooth-app-bar-layout/issues/155","id":385440888,"user":{"login":"KevinLeigh","id":32452072,"avatar_url":"https://avatars1.githubusercontent.com/u/32452072?v=4","gravatar_id":"","url":"https://api.github.com/users/KevinLeigh","html_url":"https://github.com/KevinLeigh","followers_url":"https://api.github.com/users/KevinLeigh/followers","following_url":"https://api.github.com/users/KevinLeigh/following{/other_user}","gists_url":"https://api.github.com/users/KevinLeigh/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinLeigh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinLeigh/subscriptions","organizations_url":"https://api.github.com/users/KevinLeigh/orgs","repos_url":"https://api.github.com/users/KevinLeigh/repos","events_url":"https://api.github.com/users/KevinLeigh/events{/privacy}","received_events_url":"https://api.github.com/users/KevinLeigh/received_events","type":"User","site_admin":false},"created_at":"2018-04-30T15:49:56Z","updated_at":"2018-04-30T15:49:56Z","author_association":"NONE","body":"It is possible to have a view pager in collapsing toolbar layout with both collapsing toolbar layout and view pager scrolling functionality to work properly, below I have the following view hierarchy:\r\n\r\n```\r\n <CoordinatorLayout>\r\n      <AppBarLayout>\r\n          <CollapsingToolbarLayout>\r\n               <FrameLayout>\r\n                    <ViewPager id=\"@+id/viewPager\"/>\r\n                    <View id=\"@+id/interceptView\"/>\r\n                </FrameLayout>\r\n          </CollapsingToolbarLayout>\r\n     </AppBarLayout>\r\n</CoordinatorLayout>\r\n```\r\n\r\nAnd then the code is:\r\n\r\n```\r\nView viewPager = findViewById(R.id.viewPager);\r\nfindViewById(R.id.interceptView).setOnTouchListener((v, event) -> {\r\n    viewPager.onTouchEvent(event);\r\n    return true;\r\n});\r\n```\r\n"}}
{"actor":{"display_login":"KevinLeigh"}}