AndreiMisiukevich/TouchEffect

[iOS] ListView items with TouchEff.NativeAnimation stop being tappable when user slides finger and it exits the native animation

Closed this issue · 3 comments

TouchView 4.1.78
iOS 14.0.1
XF 4.8.0 sr3
Rg.Plugins.Popup 2.0.0.3

I've got a page with a list of items, structured as shown below (simplified to the basics)
If I put a finger on an item, it'll change colour slightly (as per NativeAnimation setting on iOS).
If I then move the finger slightly, the NativeAnimation effect goes away, which is expected, as it starts switching into scrolling the list.
You can now observe that:

  • the item you were pressing down on will still produce the NativeAnimation when touched.
  • the item you were pressing down on will no longer be tappable (ItemTapped doesn't get triggered?)
  • other items will still work fine, and you can break as many items as you want by following the same steps as above.

The weird part is that I've got another page with a similar ListView and on that other page (which is not a popup page) and I can't reproduce the issue there at all.
Unfortunately I am unable to debug the iOS app at the moment, so I can only report on what I can see, and not on is happening under the hood.

Any ideas on what might be happening?

<popup:PopupPage>	
	<Grid>
		<ListView BindingContext="{Binding}"
				  HasUnevenRows="True"
				  HorizontalOptions="Fill"
				  HorizontalScrollBarVisibility="Never"
				  IsPullToRefreshEnabled="False"
				  ItemTapped="Item_Tapped"
				  ItemsSource="{Binding Items}"
				  SelectionMode="None"
				  SeparatorVisibility="None"
				  VerticalOptions="Start">
			<ListView.ItemTemplate>
				<DataTemplate>
					<ViewCell>
						<ViewCell.View>
							<Grid BackgroundColor="{DynamicResource ThemedItem}"
								  ColumnDefinitions="Auto,*,Auto"
								  RowDefinitions="Auto"
								  RowSpacing="0"
								  touch:TouchEff.NativeAnimation="True">
								<Label Grid.Row="0"
									   Grid.Column="0"
									   LineBreakMode="TailTruncation"
									   Text="{Binding Number}"
									   VerticalOptions="Center" />

								<Label Grid.Row="0"
									   Grid.Column="1"
									   LineBreakMode="TailTruncation"
									   Text="{Binding Title}"
									   VerticalOptions="Center" />
								<Label Grid.Column="2"
									   Text="edit"
									   VerticalOptions="Center" />
							</Grid>
						</ViewCell.View>
					</ViewCell>
				</DataTemplate>
			</ListView.ItemTemplate>
		</ListView>
	</Grid>
</popup:PopupPage>

Frankly speaking, I have no idea why it can happen :(

I'm sure I can find several workarounds for this but if I have the chance to debug this behaviour in the future I'll have a look.
From your answer I assume you've come across this issue as well - not sure I'll be able to do any better but I can try :)

edit: my first idea to get this working more reliably is to switch the itemTapped event to a toucheff command on the item itself, and after a very brief experiment it does appear to work, but requires more code changes than what I hoped to get when just adding the touch effect. Might also be picking up other issues when trying to make things prettier, which is always a risk.

Please use TouchEff command instead ItemTapped event in this scenario 👍
I think this workaround is enough for now