本文整理汇总了C#中RecyclerView.FindChildViewUnder方法的典型用法代码示例。如果您正苦于以下问题:C# RecyclerView.FindChildViewUnder方法的具体用法?C# RecyclerView.FindChildViewUnder怎么用?C# RecyclerView.FindChildViewUnder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecyclerView
的用法示例。
在下文中一共展示了RecyclerView.FindChildViewUnder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnInterceptTouchEvent
public bool OnInterceptTouchEvent(RecyclerView rv, MotionEvent e)
{
View child = rv.FindChildViewUnder(e.GetX(), e.GetY());
if (child != null && clickListener != null && gestureDetector.OnTouchEvent(e))
{
clickListener.OnClick(child, rv.GetChildPosition(child));
}
return false;
}
示例2: OnInterceptTouchEvent
public bool OnInterceptTouchEvent(RecyclerView rv, MotionEvent e)
{
View childView = rv.FindChildViewUnder(e.GetX(), e.GetY());
if (childView != null && this.gestureDetector.OnTouchEvent(e))
{
this.OnClick(rv, childView, rv.GetChildAdapterPosition(childView));
}
return false;
}
示例3: RecyclerTouchListener
public RecyclerTouchListener(Context context, RecyclerView recyclerView, IOnClickListener clickListener)
{
this.clickListener = clickListener;
var gestureListener = new GenericOnGestureListener();
gestureListener.ActionOnLongPress = (e) =>
{
View child = recyclerView.FindChildViewUnder(e.GetX(), e.GetY());
if (child != null && clickListener != null)
{
clickListener.OnLongClick(child, recyclerView.GetChildPosition(child));
}
};
gestureListener.FuncOnSingleTapUp = (e) => true;
gestureDetector = new GestureDetector(context, gestureListener);
}