Collapsible NavigationBar on scrolling inside a TabBar
See original GitHub issueContinuing from https://github.com/grahammendick/navigation/issues/339#issuecomment-570185443.
Relevant questions:
For a bare-basic support, from what i understood, two new container views will need to be introduced. The overall
CoordinatorLayout
view that wraps everything and the newCollapsingToolbarLayout
view that will have the existingToolbar
as a direct last-child descendent.So will that mean that the
NavigationBar
class will now have to extend CoordinatorLayout and notAppBarLayout
? And then use theaddView
method to add the required hierarchy?public class NavigationBarView extends CoordinatorLayout { private IconResolver iconResolver; Toolbar toolbar; AppBarLayout appBarLayout; CollapsingToolbarLayout collapsingToolbarLayout; ..... public NavigationBarView(Context context) { super(context); toolbar = new Toolbar(context); appBarLayout = new AppBarLayout(context); collapsingToolbarLayout = new CollapsingToolbarLayout(context); addView(appBarLayout, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); addView(collapsingToolbarLayout, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); addView(toolbar, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); ......
Please let me know if my thinking is correct
Issue Analytics
- State:
- Created 4 years ago
- Comments:44 (44 by maintainers)
Top Results From Across the Web
Collapsing navigation bar with pag… | Apple Developer Forums
When a navigation view is scrolled, common behaviour in iOS is for the large navigation title to collapse into the navigation bar.
Read more >Flutter TabBar and SliverAppBar that hides when you scroll ...
When you scroll down, the bar should hide by moving off the screen (but tabs should stay), and when you scroll back up,...
Read more >Flutter : Collapsing Toolbar — Sliver App Bar - Medium
The Collapsing Toolbar is UI component widely used in our applications today. ... by scrolling upwards, the content changes and becomes a navigation...
Read more >Flutter Tutorial - How To Show/Hide AppBar On Scroll [2021 ...
To Show/Hide AppBar on scroll in Flutter use a SliverAppBar to create a Flutter collapsing toolbar animation.Click here to Subscribe to ...
Read more >Starbucks in Swift: Collapsible Header (Ep.2) - YouTube
Starbucks in Swift: Scroll Views, Stack Views, and Tiles (Ep. · SwiftUI Animated Sticky Header - Xcode 13 - SwiftUI Tutorial · SwiftUI...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I hope you don’t give up on this because it would be a great addition to the Navigation router. But it does need a lot more research so I’m happy to close this while you concentrate your efforts elsewhere. Thanks again for all your hard work
Ok, you do some more research and I’ll give it a go too. Don’t worry, we’ll get there!