Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ public static void Initialize()
{
}

public override bool OnInterceptTouchEvent(MotionEvent ev)
{
RequestDisallowInterceptTouchEvent(Element.HaveToDisallowInterceptTouchEvent);
return base.OnInterceptTouchEvent(ev);
}

protected override void OnElementChanged(ElementChangedEventArgs<CollectionView.RenderedViews.CollectionView> e)
{
base.OnElementChanged(e);
Expand Down
12 changes: 12 additions & 0 deletions Sharpnado.CollectionView/RenderedViews/CollectionView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ public class CollectionView : View
typeof(CollectionView),
1);

public static readonly BindableProperty HaveToDisallowInterceptTouchEventProperty = BindableProperty.Create(
nameof(HaveToDisallowInterceptTouchEvent),
typeof(bool),
typeof(CollectionView),
false);

public CollectionView()
{
// default layout is VerticalList
Expand Down Expand Up @@ -365,6 +371,12 @@ public int ColumnCount
set => SetValue(ColumnCountProperty, value);
}

public bool HaveToDisallowInterceptTouchEvent
{
get => (bool)GetValue(HaveToDisallowInterceptTouchEventProperty);
set => SetValue(HaveToDisallowInterceptTouchEventProperty, value);
}

public Func<ViewCell, Task> PreRevealAnimationAsync { get; set; }

public Func<ViewCell, Task> RevealAnimationAsync { get; set; }
Expand Down