xamarin / XamarinCommunityToolkit

The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
MIT License
1.59k stars 474 forks source link

[Bug] TabView Tab Indicator width reverts to item width on selected tab change #947

Open shaun-h opened 3 years ago

shaun-h commented 3 years ago

Description

When TabIndicatorWidth is set the indicator does get given the width requested, but when a different tab is selected to the current tab the indicator width gets set the tab item width.

Steps to Reproduce

  1. Create a TabView with 2 or more tabs
  2. Set the tabview to have a TabIndicatorWidth="10"
  3. Run the application and change the selected tab

Expected Behavior

TabIndicator stays the same width as TabIndicatorWidth on selection change

Actual Behavior

TabIndicator width sometimes reverts to tab item width on selection change

Basic Information

Workaround

No workaround known

Reproduction imagery

https://user-images.githubusercontent.com/1880053/108593441-cd00cd00-73c7-11eb-955e-66f3089fef55.mov

Reproduction Link

TabVIewRepro.zip

hnabbasi commented 3 years ago

I am seeing the same issue in v1.0.3

Kapusch commented 3 years ago

Same in 1.1.0-pre2

stavroaudi commented 3 years ago

Any updates? Still doesn't work on 1.2.0-pre2

stavroaudi commented 3 years ago

I noticed that this is related to another issue. I have a TabView, and 2 TabViewItems, and have set IsSwipeEnabled to False. Inside the first TabViewItem I have a SwipeViewItem where you swipe left to delete an item. On the first try, the swipe to delete works, but if I dimiss it and swipe again to show the delete button, the tab indicator width is reset and it swipes to the second TabViewItem instead of executing the SwipeViewItem to show the delete button.

khushal247 commented 3 years ago

I am facing same issue on Android

stavroaudi commented 3 years ago

This needs a fix or at least a workaround