Skip to content Skip to sidebar Skip to footer

Android Google-play-liked Listview

Im new to android and practicing with an UI like googleplay apps, this is default view of the list : when i scroll the list view up , the action bar got scrolled up and disappear

Solution 1:

you can define your layout structure like following :

<FrameLayout><GridVieworRecyclerView/><MenuBarid="menuBar2"visibility="gone"/></FrameLayout>

to making the grid be able to scroll with the TitleBar and MenuBar, we should add a Header with GridView, of course RecyclerView would be easier to do this than GridView. the Header layout's structure would be like this :

<LinearLayoutorientation="vertical"><TitleBar/><MenuBarid="menuBar1"/></LinearLayout>

Once the menuBar1 fully scroll off to invisible, display the menuBar2, also synchronizing the menu state between both. The menuBar2 will appearing on top of that LinearLayout. when user scrolling to top and the menuBar1 just visible, hide the menuBar2.

how to determine if a View is fully invisible? the View.getLocalVisibleRect() would tell for this.

Solution 2:

Check How do the animation hiding the ActionBar and keeping tabs?

It suggests that you use https://github.com/ksoichiro/Android-ObservableScrollView.

Post a Comment for "Android Google-play-liked Listview"