Devlight / Devlight/InfiniteCycleViewPager
viewpager item size dynamically with listview scroll
- Dominant language
- Java
- Stars
- 5.7k
- Forks
- 821
- PR merge metrics
- No merged PRs in 30d
Description
I have a listview below a viewpager and in the initial state (when nothing has been scrolled), the viewpager shows only one item with a 10dp "preview" of the next and previous items (I have achieved this by setting a negative page margin:viewPager.setPageMargin(-48);). What I am trying to do is, on scrolling down the listview:
1) the listview should "push" the viewpager up, decreasing its height up to a certain point. On reaching that point (some minHeight for the viewpager), the listview should scroll normally with the smaller sized viewpager above it.
2) The next and the previous items in the viewpager should pull inside (towards the central item) and in the final state, three items of the viewpager should be fully displayed. (Images below to illustrate this)

Final state (minHeight of viewpager achieved)

Can anyone help me to achieve this ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.