Hi,
recently, i detected some strange behavior on the swiping-feature of the telerik list. I have definded a list im Xaml like the following one:
<
telerikDataControls:RadListView
IsItemSwipeEnabled
=
"True"
SwipeThreshold
=
"300"
SwipeOffset
=
"300, 0, 300, 0"
ItemSwipeCompleted
=
"OnItemSwipeCompleted"
>
....
</
telerikDataControls:RadListView
>
I now discovered, that the SwipeOffset seems to be ignored in UWP and Android, as I am able to swipe the ViewCell-Content to the left (or right) without stopping at the defined offset. As i defined some buttons in as swipe background (one button left, one button right), i am able to see both buttons at the same time as the swipe does not stop.I intended to either see the left button by swiping right or see the right button by swiping left - but I did not to expect seeing both buttons as there is no swipe stop. In iOS all seems to work fine, as the swipe stops at the above defined thickness (SwipeOffset)
Another strange thing, I discovered is, that the ItemSwipeCompleted event is always triggered - regardless of which value is set in SwipeThreshold. Again - this issue does only evolve in Android / UWP -> in iOS all seems fine :)
So far I use a workaround for "using" the SwipeThreshold
public
void
OnItemSwiping(
object
sender, ItemSwipingEventArgs e)
{
var list = sender
as
Telerik.XamarinForms.DataControls.RadListView;
var threshold = list.SwipeThreshold;
if
(Math.Abs(e.Offset) < threshold
//Workaround, to not accept swiping, when it does not meet the Threshold
{
list.EndItemSwipe();
return
;
};
}
Is there anything, we I do about the both issues? As I found a workaround for the SwipeThreshold, I am especially interested in a solution for "stopp" swiping at the SwipeOffset.
Again thank you very much in advance!
Best regards,
Ivo