ListView ItemSelected not called
See original GitHub issueOn iOS everything works great but on Android the “ItemSelected” of the ListView is not triggered anyway. The Context-Action work perfectly, but when I click on the Content, nothing happens. Do I do something wrong or is this a bug?
<ListView x:Name="SampleList" ItemsSource="{Binding Items}" VerticalOptions="FillAndExpand" HasUnevenRows="true" RefreshCommand="{Binding LoadItemsCommand}" IsPullToRefreshEnabled="true" IsRefreshing="{Binding IsBusy, Mode=OneWay}" CachingStrategy="RecycleElement" ItemSelected="OnItemSelectedAsync" Margin="0, 0, 0, 10">
<ListView.ItemTemplate>
<DataTemplate>
<contextmenu:SideActionBarCell>
<contextmenu:SideActionBarCell.Content>
<ContentView WidthRequest="{Binding Source={x:Reference SampleList}, Path=Width}">
<StackLayout Orientation="Horizontal" Padding="10, 0, 5, 0" HorizontalOptions="FillAndExpand">
<StackLayout Orientation="Vertical" Margin="10, 0, 0, 0" HorizontalOptions="FillAndExpand" VerticalOptions="Center">
<Label Text="{Binding Name}" LineBreakMode="WordWrap" FontSize="15" TextColor="{StaticResource Primary}" FontAttributes="Bold" />
<Label Text="{Binding Herkunft}" LineBreakMode="WordWrap" FontSize="13" TextColor="{StaticResource LightTextColor}" />
</StackLayout>
<Image Source="ic_arrow_right.png" VerticalOptions="Center"/>
</StackLayout>
</ContentView>
</contextmenu:SideActionBarCell.Content>
<contextmenu:SideActionBarCell.ContextTemplate>
<DataTemplate>
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="{StaticResource Primary}">
<ImageButton HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Source="ic_list_more.png" Clicked="OnMore" Margin="15, 0, 15, 0" BackgroundColor="{StaticResource Primary}"/>
</StackLayout>
</DataTemplate>
</contextmenu:SideActionBarCell.ContextTemplate>
</contextmenu:SideActionBarCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ListView's ItemSelected event is not firing when list item is ...
In my real requirement I'm using a grouped ListView where most of the groups don't need swipe actions. When list items count getting...
Read more >ItemSelected/ItemTapped is not called in listview if an item ...
ItemSelected (and ItemTapped) is not called on a listview, if it has label with TapGestureRecognizer: <ListView.ItemTemplate> <DataTemplate>
Read more >ListView Item Selected/Tapped not Working on iOS
We have recently implemented ItemSelected on one of our ListView components. It works fine on Android, but on iOS the list items only ......
Read more >[Code]-MultiSelectable ListView - ItemSelected is not called
When the ListView.SelectedItem changes, the the ItemSelected event will be triggered. But when using IEnumerable object returned from Linq the SelectedItem ...
Read more >iOS ListView item selected event is not firing. Xamarin ...
Listview item selected event is not fired on iOS if ListView container has TapGestureRecognizer bound to it. Reproduction steps:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please forget about my last comment. Now it works.
Very much thanks to you for helping me 😃
@CodeOfDarkness cool)