Xamarin.forms: [Android] Bottom Tab Bar with a navigation page is hiding content

Created on 8 Jun 2018  路  6Comments  路  Source: xamarin/Xamarin.Forms

Description

The tab bar overlaps the pages content when it's a NavigationPage

Steps to Reproduce

```C#
TabbedPage page = new TabbedPage();

        page.On<Android>().SetToolbarPlacement(PlatformConfiguration.AndroidSpecific.ToolbarPlacement.Bottom);
        page.BarBackgroundColor = Color.Transparent;

        Func<ContentPage> createPage = () =>
        {
            Grid grid = new Grid();
            grid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Star });
            grid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
            grid.Children.Add(new Label() { Text = "candy", BackgroundColor = Color.Purple });

            var bottomLabel = new Label() { Text = "Bottom" };
            Grid.SetRow(bottomLabel, 1);
            grid.Children.Add(bottomLabel);

            var contentPage = new ContentPage()
            {
                Content = grid,
                Icon = "coffee.png"
            };
            return contentPage;

        };


        page.Children.Add(new NavigationPage(createPage()));
        page.Children.Add((createPage()));

        page.Children.Add(new ContentPage() { Icon = "calculator.png" });

        return page;

```

Expected Behavior

The content frame when the navigation bar is on the bottom should be measured correctly when the page has a navigation page

Actual Behavior

The content shows up below the navigation bar

Basic Information

  • Version with issue: 3.1
layout Android bug

All 6 comments

Is there any workaround for this?

@PureWeen Is there nightly build which includes the fix? I'd like to try it.
The last build I found was on May, 19: https://myget.org/feed/xamarinforms-ci/package/nuget/Xamarin.Forms

This still seems to be an issue in the stable 3.1.0 release. Am I missing something?

The issue still exist in 3.1.0 package

@ben-powley @pfedotovsky I had same issue but then I cleaned solution , restarted IDE, cleaned again and it works properly now

Thanks @dstarec !

Following those steps made it work for me.

Was this page helpful?
0 / 5 - 0 ratings