阅读背景:

使用滚动RecyclerView时如何在ViewPager中隐藏工具栏?

来源:互联网 

I've got a toolbar in a view-pager (tabbed toolbar with horizontal swipe navigation) and each tab has its own fragment with a recyler_view. I now want to hide the toolbar when my recyler_view scrolls. In my fragment i added the on scroll-listener and want to call there a method in its activity class to hide the toolbar. The toolbar is created in the activity. How can I call this method from my fragment? or would it be better to implement this hiding method in my fragment itself. But then how can i "contact" my toolbar, that is created in the activity and not in the fragment. I have found solutions, but none of them talks about a recylcer_view in a fragment and view-pager for tabbed navigation. Would be great if you can help me...I've got a toolbar in a view-pager (tabbed tool




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: