本文整理汇总了C#中Android.Views.View.StartDrag方法的典型用法代码示例。如果您正苦于以下问题:C# View.StartDrag方法的具体用法?C# View.StartDrag怎么用?C# View.StartDrag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Views.View
的用法示例。
在下文中一共展示了View.StartDrag方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnLongClick
public bool OnLongClick(View view)
{
ClipData data = ClipData.NewPlainText("DragData", "");
view.StartDrag(data,
new Android.Views.View.DragShadowBuilder(view),
(Object)new MoveDragData{ draggedView=view, dragHandler=this}, 0);
return true;
}
示例2: OnLongClick
public bool OnLongClick(View v)
{
View.DragShadowBuilder shadowBuilder = new ToolShadowBuilder(v);
ClipData clipData = ClipData.NewPlainText(v.Id.ToString(), "Outil");
v.StartDrag(clipData, shadowBuilder, v, 0);
return true;
}
示例3: OnTouch
public bool OnTouch(View view, MotionEvent ev)
{
//if (inDrag == false)
//{
inDrag = true;
ClipData data = ClipData.NewPlainText("SpeechDragData", "");
view.StartDrag(data,
new Android.Views.View.DragShadowBuilder(view),
(Object)new SpeechDragData { draggedView = view, dragHandler = this }, 0);
//}
return true;
}
示例4: OnTouch
public bool OnTouch(View view, MotionEvent ev)
{
//if (ev.Action == MotionEvent.ACTION_MOVE)
{
ClipData data = ClipData.NewPlainText("DragData", "");
view.StartDrag(data,
new Android.Views.View.DragShadowBuilder(view),
(Object)new MoveDragData { draggedView = view, dragHandler = this }, 0);
}
return true;
}
示例5: OnTouch
public bool OnTouch(View v, MotionEvent e)
{
if (e.Action == MotionEventActions.Down)
{
View.DragShadowBuilder shadowBuilder = new ToolShadowBuilder(v);
ClipData clipData = ClipData.NewPlainText(v.Id.ToString(), "Outil");
v.StartDrag(clipData, shadowBuilder, v, 0);
return true;
}
else
{
return false;
}
}