Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaps #147

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Gaps #147

wants to merge 4 commits into from

Conversation

hncz86
Copy link

@hncz86 hncz86 commented Jan 12, 2016

No description provided.

bauerca and others added 4 commits February 14, 2013 09:10
Remove DragSortListItem class and accompanying method
for creating gaps between list items. A summary:

Prior to this commit, each list item was wrapped in a
lightweight ViewGroup called DragSortListItem. DSLV
would modify the height of the wrapper (leaving the
height of the wrapped layout unchanged) to create blank
spaces between list items so as to indicate the new
position into which the dragged item might be dropped.

The new behavior does away with the DragSortListItem
wrapper and, instead, shifts the list items away from
each other to create the drop/shuffle gaps.
A few advantages over the old method come to mind:

- Removes unnecessary added layer in the View hierarchy.
- Item shuffling avoids layout passes (unless scrolling),
simply calling `invalidate()`.
- Code is more elegant and maintainable (previous hacks
to improve shuffling and scrolling smoothness magically
disappear).
Replace bitmask for customizing each Gap with a
simple minimum height parameter. Bitmask was overkill,
adding unnecessary complication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants