Search code examples
androidscrollandroid-viewpagerfullscreen

View pager which can scroll from half to fullscreen


I want to implement a viewpager which will initially occupy half of the screen(bottom half),top half will have some other content. The user can scroll the viewpager upwards to fill the screen with view pager content. If he wants to see the initial content at the top half he can scroll down the viewpager again. How can I implement this? Example will be appreciated :)


Solution

  • You should use BottomSheet Fragment for this kind of design

    There is a tutorial available here.