blob: 268b3af2c6877bebaa6453a2cf5fce4150816ec1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
using System;
namespace Xamarin.Forms.Platform.Android
{
public static class VisualElementExtensions
{
public static IVisualElementRenderer GetRenderer(this VisualElement self)
{
if (self == null)
throw new ArgumentNullException("self");
IVisualElementRenderer renderer = Platform.GetRenderer(self);
return renderer;
}
public static bool ShouldBeMadeClickable(this View view)
{
for (var i = 0; i < view.GestureRecognizers.Count; i++)
{
IGestureRecognizer gesture = view.GestureRecognizers[i];
if (gesture is TapGestureRecognizer || gesture is PinchGestureRecognizer || gesture is PanGestureRecognizer)
{
return true;
}
}
return false;
}
}
}
|