This is a migrated thread and some comments may be shown as answers.

2019.2.619.1 ListView break RadListView.ItemSwipeContentTemplate for Android

1 Answer 85 Views
ListView
This is a migrated thread and some comments may be shown as answers.
IanV
Top achievements
Rank 1
Veteran
IanV asked on 27 Jun 2019, 06:20 PM

iOS is fine

2019.2.619.1 ListView break RadListView.ItemSwipeContentTemplate for Android

2019.2.603.1 works

 

On Android with 619, the swipe doesn't hold, it just jumps back. The menu button disappears instantly on swipe. Reverting to 603 works.

 

        <telerikDataControls:RadListView                 x:Name="list"                 IsVisible="{Binding IsLoading, Converter={StaticResource NegateBooleanConverter}}"                 ItemsSource="{Binding Items}"                 BackgroundColor="White"                 IsPullToRefreshActive="{Binding IsBusy}"                 IsPullToRefreshEnabled="True"                 SelectionMode="None"                                  IsItemSwipeEnabled="True"                                 ItemSwiping="List_OnItemSwiping"                                 ItemSwipeCompleted="List_OnItemSwipeCompleted"                                 SwipeOffset="80, 0, 80, 0"                                 SwipeThreshold="80"                                 Margin="0,0">             <!-- COMMANDS -->             <!-- COMMANDS -->             <!-- COMMANDS -->             <telerikDataControls:RadListView.Commands>                 <commands:ListViewUserCommand Id="PullToRefreshRequested" Command="{Binding RefreshCommand}" />                 <commands:ListViewUserCommand Id="ItemTap" Command="{Binding ItemTappedCommand}" />             </telerikDataControls:RadListView.Commands>             <!-- STYLES -->             <!-- STYLES -->             <!-- STYLES -->                       <telerikDataControls:RadListView.ItemStyle>                 <telerikListView:ListViewItemStyle BackgroundColor="White"                                                    TextCellTextColor="Transparent"                                                    BorderColor="LightGray"                                                    BorderWidth="2"                                                    BorderLocation="Bottom" />             </telerikDataControls:RadListView.ItemStyle>             <telerikDataControls:RadListView.ItemTemplate>                 <DataTemplate x:DataType="notifications:NotificationItem">                     <telerikListView:ListViewTemplateCell>                         <telerikListView:ListViewTemplateCell.View >                             <Grid Margin="10,20,10,10"   >                                 <Grid.ColumnDefinitions>                                     <ColumnDefinition Width="35"></ColumnDefinition>                                     <ColumnDefinition Width="*"></ColumnDefinition>                                     <ColumnDefinition Width="Auto"></ColumnDefinition>                                 </Grid.ColumnDefinitions>                                 <Grid.RowDefinitions>                                     <RowDefinition Height="*"></RowDefinition>                                     <RowDefinition Height="1"></RowDefinition>                                 </Grid.RowDefinitions>                                 <Image Source="{Binding Image}" Grid.Column="0" Opacity="{Binding ImageOpacity}"                                                                 VerticalOptions="Start" WidthRequest="30"                                                             AutomationId="{Binding Key}"                                                             HeightRequest="30">                                 </Image>                                 <StackLayout Grid.Column="1" Spacing="3">                                     <Label Text="{Binding Title}" Style="{StaticResource TextSize4ListView}"></Label>                                     <Label Text="{Binding Description}" LineBreakMode="WordWrap" MaxLines="2"                                            Style="{StaticResource TextSize2}">                                     </Label>                                 </StackLayout>                                 <Label Grid.Column="2" Text="{Binding CreateDate, StringFormat='{}{0:MMM dd, yyyy}'}"                                        Style="{StaticResource TextSize1}" VerticalOptions="Start">                                 </Label>                             </Grid>                         </telerikListView:ListViewTemplateCell.View>                     </telerikListView:ListViewTemplateCell>                 </DataTemplate>             </telerikDataControls:RadListView.ItemTemplate>             <!-- SWIPE -->             <!-- SWIPE -->             <!-- SWIPE -->             <telerikDataControls:RadListView.ItemSwipeContentTemplate>                 <DataTemplate>                     <Grid    Margin="0"       Padding="0"       ColumnSpacing="0"       RowSpacing="0"       BackgroundColor="White">                         <Grid.ColumnDefinitions>                             <ColumnDefinition Width="80" />                             <ColumnDefinition Width="*" />                             <ColumnDefinition Width="80" />                         </Grid.ColumnDefinitions>                                            <!-- EDIT -->                         <!-- EDIT -->                         <!-- EDIT -->                         <Grid Grid.Column="0"                               BackgroundColor="{StaticResource ErrorColor}"                               Grid.ColumnSpacing="0"                               Grid.RowSpacing="0"                               Padding="0"                               Margin="0,0">                             <telerikInput:RadButton CornerRadius="0"                                                     HorizontalOptions="FillAndExpand"                                                     VerticalOptions="FillAndExpand"                                                     BackgroundColor="Transparent"                                                     Style="{StaticResource FontAwesomeFontIcon}"                                                     Text="{x:Static local:FontAwesomeFont.Trash}"                                                      TextColor="White"                                                     FontSize="{Binding UIButtonSize}"                                                     Command="{Binding BindingContext.DeleteCommand, Source={x:Reference list}}"                                                     CommandParameter="{Binding}"                                                     Clicked="OnButtonClicked"/>                         </Grid>                         <Grid Grid.Column="2"       BackgroundColor="{StaticResource ErrorColor}"       Grid.ColumnSpacing="0"       Grid.RowSpacing="0"       Padding="0"       Margin="0,0">                             <telerikInput:RadButton CornerRadius="0"                         HorizontalOptions="FillAndExpand"                         VerticalOptions="FillAndExpand"                         BackgroundColor="Transparent"Style="{StaticResource FontAwesomeFontIcon}"                         Text="{x:Static local:FontAwesomeFont.Trash}"  TextColor="White"                         FontSize="{Binding UIButtonSize}"                         Command="{Binding BindingContext.DeleteCommand, Source={x:Reference list}}"                         CommandParameter="{Binding}"                         Clicked="OnButtonClicked"/>                         </Grid>                     </Grid>                 </DataTemplate>             </telerikDataControls:RadListView.ItemSwipeContentTemplate>         </telerikDataControls:RadListView>

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 02 Jul 2019, 11:48 AM
Hi Ian,

Thank you for sending the snippet. 

The reason for the reported behavior is that the SwipeThreshold and SwipeOffset properties of the ListView are equal. There is a discussion regarding this in our public feedback portal, please refer to the link below for more details:
https://feedback.telerik.com/xamarin/1416623-swipe-no-longer-works-when-offset-and-threshold-are-equal

Let me know if you have any additional questions on this.

Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ListView
Asked by
IanV
Top achievements
Rank 1
Veteran
Answers by
Yana
Telerik team
Share this question
or