Hey all,

Have some nitpicky scrolling issues in ListView that I don't expect
many people to know the answer to, but if there are any experts in
ListView, your help would be greatly appreciated.

I'm doing a ListView of contacts such that one contact, the contact
that the viewer is currently looking at, has a larger view than the
other contacts, example shown below.

|*********
| Contact
|*********
| CONTACT
|
|*********
| Contact
|*********

I have it set up so that if you move up and down with the trackball,
the expanded contact changes such that moving down on the trackball
will produce this result:

|*********
| Contact
|*********
| Contact
|*********
| CONTACT
|
|*********

This seems to work great for the contacts that fit into the first
screen, but once you use your finger to scroll to a different part of
the list, I seem to run into a semi-annoying problem when moving the
trackball.

The comments in the ListView code describes what should happen when I
move the trackball down:

             * Case 1: Scrolling down.
             */

            /*
             *     Before           After
             *    |       |        |       |
             *    +-------+        +-------+
             *    |   A   |        |   A   |
             *    |   1   |   =>   +-------+
             *    +-------+        |   B   |
             *    |   B   |        |   2   |
             *    +-------+        +-------+
             *    |       |        |       |
             *
             *    Try to keep the top of the previously selected item
where it was.
             *    oldSel = A
             *    sel = B
             */

This works perfectly for the list of contacts displayed on the initial
screen.  However, once I move to another portion of the list, it seems
that the list is keeping the bottom of the previously selected item
where it was, and not the top.  So, something like this:

            /*
             *     Before           After
             *    |       |        |       |
             *    +-------+       +-------+
             *    |   A   |        |   A   |
             *    |   1   |   =>  |        |
             *    +-------+       +-------+
             *    |   B   |        |   B   |
             *    +-------+       |   2    |
             *    |       |        +-------+
             */

(If this ascii doesn't display correctly, I'll post another example in
my reply.)

In this case, the position of the second selected contact is
determined by the BOTTOM of the previously selected contact, giving
the ListView a "jumpy" feeling and allowing me to only view ~3
contacts before having to use my finger to move to the next screen.

It's a problem that's not a gamestopper, but something that can hurt
the user experience of the application.

Anyway, I know that this is a pretty advanced use case, so if there's
anyone that can help me out with this, I would be very grateful.

Thanks,

James
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to