I'm new to xamarin and I'm trying to disable swipe by creating a custom Viewpager but I cant find touch listener interface in Viewpager. Is there any way to do this?
public class CustomViewPager : ViewPager
{
Context _context;
public CustomViewPager(Context context) : base(context)
{
_context = context;
}
public CustomViewPager(Context context, IAttributeSet arg1) : base(context, arg1)
{
_context = context;
}
public bool IsPagerDisabled { get; set; }
/*public override Boolean OnTouchEvent(MotionEvent event)
{
if (!IsPagerDisabled)
{
return base.OnTouchEvent(event);
}
else
{
return false;
}
}*/
}