Skip to content

Android Tabbar, clicking 4th tab opens the 5th tab #23732

@Zachary-271

Description

@Zachary-271

Description

When I first open the app, and then I click on the fourth tab, it shows that it's on the 4th tab, while showing the contents of the 5th tab. This only happened to me when I clicked on the 4th tab first, if I click on any other tab first the app behaves as expected. Then, if I continue to click on the other tabs, the correct tab contents are shown, and the app behaves as expected from that point on. If the tabs in my project only have 1 or 2 items in the collectionviews, the bug doesn't occur.

Screen.Recording.2024-07-19.165608.mp4

Tabbar code:

<TabbedPage
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:root="clr-namespace:MauiTabs"
    xmlns:pages="clr-namespace:MauiTabs.Pages"
    x:Class="MauiTabs.Pages.MainPage"
    xmlns:android="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;assembly=Microsoft.Maui.Controls"
    android:TabbedPage.IsSwipePagingEnabled="False"
    android:TabbedPage.ToolbarPlacement="Bottom">
    <NavigationPage
        Title="Home">
        <x:Arguments>
            <pages:UserPage
                Icon="{x:Static root:Constants.FontAwesomeHome}"
                Label="home"
                x:Name="Home"/>
        </x:Arguments>
        <NavigationPage.IconImageSource>
            <FontImageSource
                FontFamily="FontAwesome-Solid"
                Glyph="{x:Static root:Constants.FontAwesomeHome}"/>
        </NavigationPage.IconImageSource>
    </NavigationPage>
    <NavigationPage
        Title="Page 2">
        <x:Arguments>
            <pages:UserPage
                Icon="2"
                Label="page2"
                x:Name="Page2"/>
        </x:Arguments>
        <NavigationPage.IconImageSource>
            <FontImageSource
                FontFamily="FontAwesome-Solid"
                Glyph="2"/>
        </NavigationPage.IconImageSource>
    </NavigationPage>
    <NavigationPage
        Title="Page 3">
        <x:Arguments>
            <pages:UserPage
                Icon="3"
                Label="page3"
                x:Name="Page3"/>
        </x:Arguments>
        <NavigationPage.IconImageSource>
            <FontImageSource
                FontFamily="FontAwesome-Solid"
                Glyph="3"/>
        </NavigationPage.IconImageSource>
    </NavigationPage>
    <NavigationPage
        Title="Page 4">
        <x:Arguments>
            <pages:UserPage
                Icon="4"
                Label="page4"
                x:Name="Page4"/>
        </x:Arguments>
        <NavigationPage.IconImageSource>
            <FontImageSource
                FontFamily="FontAwesome-Solid"
                Glyph="4"/>
        </NavigationPage.IconImageSource>
    </NavigationPage>
    <NavigationPage
        Title="Page 5">
        <x:Arguments>
            <pages:UserPage
                Icon="5"
                Label="page5"
                x:Name="Page5"/>
        </x:Arguments>
        <NavigationPage.IconImageSource>
            <FontImageSource
                FontFamily="FontAwesome-Solid"
                Glyph="5"/>
        </NavigationPage.IconImageSource>
    </NavigationPage>
</TabbedPage>

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.70 SR7

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

No response

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions