通过拖放的Andr​​oid项目添加到扩展列表视图 [英] adding items to expandable list view by drag and drop android

查看:171
本文介绍了通过拖放的Andr​​oid项目添加到扩展列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过拖放添加项目到扩展列表拖放?例如如果你拖放一些文本应该在扩展列表添加。

how to add items to the expandable list by drag and drop ?e.g If you drag and drop some text it should be added in expandable list.

推荐答案

您需要绘制自定义组件看到这个页面了解更多信息:

You would need to draw a custom component see this page for more information:

http://developer.android.com/guide/topics/ UI /自定义components.html

您将需要重写绘制方法和绘制自己的列表视图,以及你曾经从拖动物品的位置。这是一个复杂的任务,可能会令人望而生畏,但我真的没有见过有人做一拖之前的Andr​​oid下降。您可能是第一个!

You would need to override the draw method and draw your own list view as well as where ever your dragging your items from. This is a complicated task and may seem daunting but I haven't really seen anyone do a drag and drop on android before. You may be the first!

如果您需要简单地重新排序列表视图,那么你应该看看这个主题:

If you need to simply reorder your listview then you should check out this thread:

<一个href=\"http://stackoverflow.com/questions/3141144/reordering-of-listview-items-by-drag-and-drop-using-android\">reordering通过拖动列表视图项目拖放采用了android

这篇关于通过拖放的Andr​​oid项目添加到扩展列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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