Android的工具栏+ Tab键布局+抽屉,隐藏的工具栏滚动时,采取TabLayout顶端
我有一个连接到它的抽屉的活动。抽屉每个菜单是一个片段,菜单中的一个下我与 TabLayout
片段,每个选项卡包含一个 RecyclerView
。
所以,现在,当我滚动 RecyclerView
,标签布局是越来越隐蔽,但工具栏
仍然在顶部。我需要的是工具栏
来获得隐藏( scrollFlags:滚动| enterAlways
)和 TabLayout
应显示在顶部得到。
I have activity which has drawer attached to it. Each menu of the drawer is a fragment, and under one of the menu I have a fragment with TabLayout
, and each tab contains a RecyclerView
.
So now, when I scroll the RecyclerView
, tab layout is getting hidden but ToolBar
remains at the top. What I need is to ToolBar
to get hidden(scrollFlags:scroll|enterAlways
), and TabLayout
should get shown at the top.
所以目前的设置是:
活动附带DrawerLayout
- >片段与TabLayout
- >标签片段1 RecyclerView
- >标签片段2 RecyclerView
减code更有效
您好@Vishal我发现你太多。因为我也是前一段时间寻找这个话题。
Hello @Vishal i have found too much for you. because i am also searching this topic before some time.
我发现一个名为辉煌的图书馆 MaterialViewPager 这是完全定制你想要什么滚动模式隐藏。
I have found one brilliant library named MaterialViewPager this is fully customize with what you want to hide in scroll mode.
查看 https://www.youtube.com/watch?v=r95Tt6AS18c
See the video on https://www.youtube.com/watch?v=r95Tt6AS18c