Skip to content

feat(android): modern Material 3 bottom navigation for TabView#11212

Closed
NathanWalker wants to merge 1 commit intomainfrom
feat/android-tabview
Closed

feat(android): modern Material 3 bottom navigation for TabView#11212
NathanWalker wants to merge 1 commit intomainfrom
feat/android-tabview

Conversation

@NathanWalker
Copy link
Copy Markdown
Contributor

@NathanWalker NathanWalker commented May 7, 2026

  • androidTabsPosition="bottom" now renders via com.google.android.material.bottomnavigation.BottomNavigationView with the M3 active-indicator pill and an 80dp layout, replacing the bottom-pinned TabLayout.
  • androidTabsPosition="top" is unchanged
  • This makes working with TabView across iOS and Android provide the best of class result on either and consistent experience (with regards to orienting bottom)
ns-material3-android-bottom-tabs.mov

@NathanWalker NathanWalker added this to the 9.1 milestone May 7, 2026
@NathanWalker NathanWalker requested a review from triniwiz May 7, 2026 22:01
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 7, 2026

View your CI Pipeline Execution ↗ for commit 4563f45

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 4m View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-07 22:07:40 UTC

@NathanWalker
Copy link
Copy Markdown
Contributor Author

NathanWalker commented May 7, 2026

This does not supersede or replace community's material components, this just provides the baseline to give best of class on both platforms out of the box since TabView already uses modern iOS API's with glass and on bottom - this now provides consistent expectations to both.

@CatchABus
Copy link
Copy Markdown
Contributor

CatchABus commented May 7, 2026

I think this is a bit sudden and doesn't feel very practical to add a heavy dependency like material just for TabView.
@NathanWalker Core simulated the look 'n feel at a certain point in v6 (BottomNavigation and Tabs?) and there are still some leftover java classes in ui-mobile-base we could probably reuse.

https://github.com/NativeScript/NativeScript/blob/main/packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/BottomNavigationBar.java
https://github.com/NativeScript/NativeScript/blob/main/packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/TabsBar.java

This link is from BottomNavigation back then:

@NathanWalker
Copy link
Copy Markdown
Contributor Author

NathanWalker commented May 7, 2026

  • if can provide alternate way for TabView to provide consistent experience other route, feel free to try in alternate PR
  • TabView provides glass tabs (best of class) on iOS
  • TabView on Android does not match that experience (I'd argue right now it provides worst in class experience)
  • the dependency case is a concern because it brings it in for anyone using core (whether they use TabView or not)

@NathanWalker
Copy link
Copy Markdown
Contributor Author

NathanWalker commented May 7, 2026

I believe only other alternate view is to just remove all ui components from core and make them all ad hoc pick your own one at a time for each project which there’s a good case for that if clear and easy enough to browse best in class options altogether in official docs. Plan bigger move like that for v10 or v11.

@farfromrefug
Copy link
Copy Markdown
Collaborator

I agree 100% with @CatchABus and it was my first thought when I saw the PR.

  • you cant compare IOS design vs material on android. material comes as a dependency and not included In android by default. I think there are multiple reasons for that, one being faster Releasing cycle. However if we follow the basics of core following the platform and other features coming as plugins it should not be in core. And I think it should NOT be in core. Material.components are here exactly for that. And we can still create templates with them added by default
  • that dependency is huge and with the things we keep on adding N is becoming a fat framework which it should not. I always said that (I think the same with the runtimes). And I even think I am the one which had it removed in N 6 or something. and remember N still does not support correct tree shaking and proguard yet without tricky integration like I do. If we did things would be a bit different even though still mean longer build for no reason for everyone not using it.

I do believe this PR should not get in.

@NathanWalker
Copy link
Copy Markdown
Contributor Author

Let's close this, we'll continue chats in discord on the ui decoupling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants