开发者

Android Listview: Problem with its height, while dragging up

Sorry for not having proper title to the question,

I have a list view that can implement drag and drop. It implements two directions, up and down. In down direction I have just given more height (60dp normal , more height is 120dp).

The list item contains a textview and an image view. The problem comes up when I drag up, I want to pass the same list height but instead of default behavior [List item grows downwards....] the list item should go upwards and it must have same 120dp height.

This is what happens [Downwards direction]

=========================
TextView


[*this denotes the height is 120dp downwards*]

=========================

This is what I want.[Upwards direction]

========================



[*this denotes the height is 120dp upwards*]

TextView
========================

How ca开发者_StackOverflow社区n it be possible?


can you rephrase your question? what are your requirements? On a semi-related note, all motion events inside of a listview/scrollview are consumed by the scrolling view. It would be hard for you to drag items out of a listview.


Check out this implementation of drag and drop in Music app.


You can also get ideas from Mark Murphy's implementation: cwac-touchlist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜