Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Bug] Nested tabview will show wrong tabviewitem content #1463

Open
@xiedongweo

Description

@xiedongweo

Description

I'm using a TabView(named as tab1) control on the MainPage. The TabView has five TabViewItem. In third TabViewItem, its content is a ContentView, and in this view, it has another one TabView(named as tab2) control.

So, the strange issue is coming.

When I set the SelectedIndex for the tab1, for example, I set the SelectedIndex to 3. Then it should show the fourth TabViewItem content. But the actual behavior is the TabStrip has locate to the correct postion(at 3 index), but the TabViewItem content will show the fifth TabViewItem content.

I've spent a long time to do troubleshoots on this issue. For the time being, I found that if the 'tab2' TabView is in front of the position that I want to set. then the issue will occur.

Steps to Reproduce

  1. clone my demo to local and open it in visual studio 2019
  2. deploy it to your android phone
  3. click the 'device' button on the first tabviewitem

Expected Behavior

It should show device view.

Actual Behavior

The tabstrip locate to the correct position, but the tabviewitem content show the 'setting' view.

video

Basic Information

Sometimes this strange behavior doesn't occur, but most of the time it will be wrong. Please try it more often. You could kill the app process and start it again.

  • Version with issue:
  • Last known good version:
  • IDE: Visual Studio 2019 Version 16.9.6
  • Platform Target Frameworks:
    • iOS:
    • Android: Android 11.0 (R)
    • UWP:
  • Android Support Library Version:
  • Nuget Packages: 1.1.0
  • Affected Devices:

Workaround

Reproduction imagery

Screenshoot

Reproduction Link

https://github.com/xiedongweo/xamarin-samples

Metadata

Metadata

Assignees

No one assigned

    Labels

    a/TabViewbugSomething isn't working. Breaky break.excellent-report 🥇s/unverifiedThis issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions