timroes / SwipeToDismissUndoList

An Android library to enable swipe to dismiss and undo functionality on ListViews.
250 stars 72 forks source link

variable-height lines don't show up correctly #21

Closed slisznia closed 11 years ago

slisznia commented 11 years ago

Some of the elements in my listview take up twice the space than the rest (I have 1- and 2-line items).

When adding items to SwipeTo.. widget I sometimes get:

1) taller items chopped to "single-line height." 2) shorter items using up "two-line height" -- this happens specially after I remove a taller item and the shorter one "fills in" the place of taller one. The listview doesn't collapse the vertical space.

Second problem is that the UNDO message never goes away, unless I interact with the listview in any way, like scrolling up/down.

Version tested: commit 4e1f96884acd77d5c4fc1ababd146bf24b8fa9c4 Date: Mon Jul 22 03:36:21 2013 -0700

Tested on Android 4.2.1, Nexus 10.

timroes commented 11 years ago

I will have a look at the line height What you descibed as "second" problem is not a bug, but a usability feature. Especially in previous versions - but of course still possible - a user might swipe away accidentally an item. We could now start the timer, the user might get interrupted (by something outside the Android world, also known as RL), and miss to hit the undo button that disappear. The timer starts when the user interacts with the screen, so we can be sure he has his attention still on the screen. As long as the user don't touch the screen, I don't see any sense in starting the timer, since the undo message won't disturb much, as long as the user doesn't interact with your app.

But since most developer find that confusing I might introduce a switch for that to get rid of it. Until then you can have a look at some fork if you want to see a version without that behavior. I also might check beforehand if also users (and not just developers) find that confusing, so it might take some time (and still some other bugs to fix, and unfortunately not so much time at the moment).

slisznia commented 11 years ago

Probability of the user getting preempted to another activity while the UNDO is in effect AND by accident is very low. Consider the alternative scenario, which is quite common:

The actual problem I'm having, and I'd classify it as a bug, is that the UNDO dialog shows up above other UI widget on my screen which now cannot be clicked because the UNDO message covers it. Clicking anywhere within the UNDO message doesn't make it disappear either.

So now the user is confused -- he doesn't want to undo his deletion. He wants the message to go away, but it doesn't. And, the user cannot click on the widget underneath the pop-up.

Svarozic commented 11 years ago

Slisznia I had same problem with height of 2 different type of elements in ListView. I made ticket there: https://github.com/timroes/SwipeToDismissUndoList/issues/19 Maybe it can help you.