拖动两个片段之间下降? [英] drag and drop between two fragments?

查看:128
本文介绍了拖动两个片段之间下降?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个特别的要求,我需要在一个屏幕拖动的元素,然后另一个片段变得可见,我可以放下拖动视图。

I have a particular requirement where i need to drag a element in one screen then another fragment becomes visible where i can drop the dragged view .

什么是实现这一目标的最佳途径?我不知道如何实现提前两个片段.Thanks之间的这种行为!

what is the best way to achieve this ? I am not sure how to achieve this behavior between two fragments .Thanks in advance!

推荐答案

我们需要了解的基本情况是,这些常数拖放既适用于活动和片段

THE basics we need to understand is these constants for drag and drop both applicable for activity and fragments

DragEvent.ACTION_DRAG_STARTED

DragEvent.ACTION_DRAG_ENTERED

DragEvent.ACTION_DRAG_EXITED

DragEvent.ACTION_DROP

DragEvent.ACTION_DRAG_ENDED

现在你需要做的片段上可见DragEvent.ACTION_DRAG_ENTERED或启动 上述呼叫以下链接适当解释

now you need to make fragment VISIBLE ON DragEvent.ACTION_DRAG_ENTERED OR STARTED above calls are properly explained following links

http://www.vogella.com/tutorials/AndroidDragAndDrop/article.html

下面IAM让你有几个不错的链接...

Here iam leaving you with few good links....

https://开头blahti .word press.com / 2012/03/03 /改进,拖放换的GridView /

这篇关于拖动两个片段之间下降?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆