Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to equally space menu items of BottomNavigationView using Shell in Android Tablets #23606

Open
MohdIB opened this issue Jul 15, 2024 · 9 comments
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout p/3 Work that is nice to have platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@MohdIB
Copy link

MohdIB commented Jul 15, 2024

Description

I've set up this MAUI Shell project and removed one item from the BottomNavigationView. Once removed the remaing three items are concentrated in the center. This issue is easily noticeable in tabs of large display size.

Having four items makes it seem to be equally spaced in potrait mode but technically not as in Landscape mode, the menu items are centered even for four items. Tried implementing a CustomShellRenderer for android but no expected output.

This issue is observed only in android devices and not not in iOS (The items are equally spaced by default)

Screenshot 2024-07-11 at 5 25 28 PM

Steps to Reproduce

  1. Clone the attached .NET Shell project
  2. Remove one ShellContent item from AppShell.xaml
  3. Build the application in an android tablet of size greater or equal to 10 inches.
  4. Observe the Bottom Navigation Menu Items.

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/tree/main/8.0/Fundamentals/Shell

Version with bug

8.0.60 SR6

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 9 and up

Did you find any workaround?

No.

Relevant log output

No response

@MohdIB MohdIB added the t/bug Something isn't working label Jul 15, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@RoiChen001 RoiChen001 added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Jul 15, 2024
@RoiChen001
Copy link

RoiChen001 commented Jul 15, 2024

This problem cannot be reproduced at Android platform on the latest 17.11.0 Preview 3.0(8.0.40 & 8.0.60).
image (4)

@MohdIB
Copy link
Author

MohdIB commented Jul 15, 2024

Remove one menu item (e.g. bears) and see that the items are not equally spaced. The three items will be centered.

Having four items makes it seem to be equally spaced visually.
In landscape mode, having four items too makes them positioned centered.
Xaminals Four Items Centered

@dotnet-policy-service dotnet-policy-service bot removed the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Jul 15, 2024
@RoiChen001 RoiChen001 added the s/verified Verified / Reproducible Issue ready for Engineering Triage label Jul 15, 2024
@RoiChen001
Copy link

Can repro this issue at Android platform on the latest 17.11.0 Preview 3.0(8.0.40 & 8.0.60).

@PureWeen PureWeen added this to the Backlog milestone Jul 15, 2024
@PureWeen PureWeen added the p/3 Work that is nice to have label Jul 15, 2024
@PureWeen
Copy link
Member

Interesting, we set the visibility mode to LabelVisibilityLabeled which I was thinking would equally space everything

@MohdIB
Copy link
Author

MohdIB commented Jul 16, 2024

I tried to set the visibility mode to LabelVisibilityLabeled in the shell custom render, this issue still existed.

@MohdIB
Copy link
Author

MohdIB commented Jul 18, 2024

Not able to equally space menu items of BottomNavigationView using Shell in Android Tablets even after using many ways in Shell Custom Renderer for Android.

Commenting to highlight the urgency of this issue.

@MohdIB
Copy link
Author

MohdIB commented Jul 23, 2024

@PureWeen, Any update or help on this open issue as i am unable to get a work around to equally space menu items of BottomNavigationView using shell in Android Tablets.

@samhouts samhouts added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label Aug 28, 2024
@kubaflo
Copy link
Contributor

kubaflo commented Dec 16, 2024

Hi, @MohdIB, I'm not sure it is possible with the BottomNavigationView. Currently, the BottomNavigationView in the MAUI app behaves like the native Android one generated by Android Studio, and Android doesn't seem to provide a property that would let developers to evenly distribute icons across the full width of the view

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout p/3 Work that is nice to have platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants