问题描述
因此,下面的xaml具有名为HotelReservationoption_Tapped
的方法背后的代码,该方法仅在Android中不触发。我正在为Syncfusion.Xamarin.SFListView
使用版本18.3.0.40。
使用Xamarin.Forms v4.8.0.560
<StackLayout x:Name="ActiveList" IsVisible="{Binding IsActiveListVisible}" Padding="0" Spacing="0" Margin="0" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<syncfusion:SfListView AutoFitMode="Height" ItemsSource="{Binding ReservationListActive}" SelectionBackgroundColor="Transparent" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Margin="0,10,0">
<syncfusion:SfListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout>
<ScrollView VerticalOptions="FillAndExpand">
<Grid>
<Grid.RowDeFinitions>
<RowDeFinition Height="*"/>
<RowDeFinition Height="Auto"/>
</Grid.RowDeFinitions>
<StackLayout Grid.Row="0" Margin="20,9,20,14" Orientation="Horizontal">
<StackLayout Orientation="Vertical" Spacing="6">
<Label Text="{Binding HotelName}" TextColor="{StaticResource LabelColor}" FontSize="18"/>
<StackLayout Orientation="Horizontal" Spacing="9">
<Image Source="calendarPageEmpty1"/>
<Label Text="{Binding HotelName}" TextColor="{StaticResource LightGrey2}" FontSize="14"/>
</StackLayout>
</StackLayout>
<Image HorizontalOptions="EndAndExpand" Source="dots.png" HeightRequest="20" WidthRequest="20" BackgroundColor="Transparent">
<Image.GestureRecognizers>
<TapGestureRecognizer Tapped="HotelReservationoption_Tapped" CommandParameter="{Binding HotelID}"/>
</Image.GestureRecognizers>
</Image>
</StackLayout>
<BoxView Grid.Row="1" HeightRequest="1" Color="{StaticResource LineColor}"/>
</Grid>
</ScrollView>
</StackLayout>
</ViewCell>
</DataTemplate>
</syncfusion:SfListView.ItemTemplate>
</syncfusion:SfListView>
</StackLayout>
有人知道此控件特定于Android的任何错误吗?
解决方法
我们已经基于Android中的代码段测试了简单的ListView示例。请从此处找到可行的示例。
示例:https://www.syncfusion.com/downloads/support/directtrac/general/ze/3015061347217706
如果您仍然遇到相同的问题,能否请您检查样本并返回原样?如果没有,请修改示例并共享设备配置详细信息。