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.58k stars 471 forks source link

[Bug] Hard to select ListView's items when used in TabViewItem #1835

Open ghuynguyen opened 2 years ago

ghuynguyen commented 2 years ago

Description

When using ListView in TabViewItem, after change tab, it's hard to select ListView's items

Link to Reproduction Sample

https://github.com/ghuynguyen/tabview_bug

Steps to Reproduce

  1. Switch to Tab 2
  2. Switch back to Tab 1
  3. Select an item in ListView

Expected Behavior

Item selected by 1 tap

Actual Behavior

Item selected by multi tap

Basic Information

Workaround

Refresh the list at TAB 1 when switch to TAB 2 and vice versa.

Reproduction imagery

Animation

dungngo27696 commented 2 years ago

i have same issue, any updates on this ?

ghuynguyen commented 2 years ago

Update: This bug only appears on Android. Works fine on iOS

MeinLiX commented 1 year ago

Workaround In my case, using the MVVM pattern, when the TAB index changes (TabView.SelectedIndex), it is sufficient to update the ItemSource of the ListView by calling OnPropertyChanged(nameof(ListItemSource)), for example, when the ListView is specified as: ItemSource="{Binding ListItemSource}". This allows fixing the bug depicted in the video issue for android too.