Skip to content

[.Net10][Andriod] Flyitem with tab, Extra space on top of bottom tab bar while navigating back. #33444

@JyotheeshKummara

Description

@JyotheeshKummara

Description

Before Navigation
Image
After Navigation

Image

Using the FlyoutItem + Tab for the bottom navigation bar in home screen. Once navigate to another page and hide the navigation bar and navigate back to home page then show Navigation bar. Then it is showing the extra space. Refer the Screenshots.

AppShell.xaml.cs

<FlyoutItem x:Name="flyoutItem"
            FlyoutDisplayOptions="AsSingleItem"
            FlyoutItemIsVisible="false"
            Route="home">

    <Tab Title="Home">

        <ShellContent x:Name="homeShellContent"
                  FlyoutItemIsVisible="False"
               ContentTemplate="{DataTemplate local:MainPage}"/>
    </Tab>

    <Tab x:Name="myDevicesTab"
  Title="Second Page"
  Route="MyDevices">
        <ShellContent Title="Second page shell"
               ContentTemplate="{DataTemplate local:SecondPage}"/>
    </Tab>
</FlyoutItem>

MainPage.xaml.cs:

namespace BottomTabExtraSpaceIssueFixed
{
public partial class MainPage : ContentPage
{
int count = 0;

    public MainPage()
    {
        InitializeComponent();
    }

    private void OnCounterClicked(object? sender, EventArgs e)
    {
        Navigation.PushAsync(new ThirdPage());
    }
}

}

Third Page






Steps to Reproduce

  1. Create a bottom navigation bar using Flyoutitem with 2 tabs using tab control.
  2. And create a two pages for two tabs and third page to navigate.
  3. Create a button in tab page and navigate to third page and hide the tabs
  4. Navigate back to home page and show the tabs
  5. Here you get extra space on top of the tabs. if you switch the tabs again it comes to normal.

Link to public reproduction project repository

No response

Version with bug

10.0.10

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

No response

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions