pakerfeldt / android-viewflow

A horizontal view scroller library for Android
1.78k stars 694 forks source link

#37 #41

Closed nfrancois closed 13 years ago

pakerfeldt commented 13 years ago

It doesn't really work as I would expect a multi title indicator to function. First of all, I guess we have to agree on how it would work. From your example, when I start scrolling to the right, A moves to the left as expected, but it continues to move all the way to the left. Then when I release to make it snap to B, A is instantly moved to its "expected" position (i.e. to the left of the centered B). And at the same time, when B is to be scrolled to the left, it first, instantly moves to the far end from where the animation starts and continues to the middle.

This is how I would expect it to work: When I scroll to the right, the A (in the indicator) would move to the left but halt when it hits its new position. Continuing scrolling to the right and B, C and D (in the indicator) would eventually move to the left and halt when each title hits its position. And at the same time, E would move in from the far right.

nfrancois commented 13 years ago

It's true my titles movement is weird If I understand well your idea :

The begin state is : |............A...B...C...D| And the movement is : |...........A....B...C...D| |..........A.....B...C...D| |.........A......B...C...D| |........A.......B...C...D| <- A stop moving |........A......B...C...D.| |........A.....B...C...D..| |........A....B...C...D...| |.......A...B...C...D...E| <- Final position

What do you think of this : |............A...B...C...D| |...........A...B...C...D.| |..........A...B...C...D..| |.........A...B...C...D...| |........A...B...C...D...E| and with more titles : |A...B...C...D...E...F...G| |A..B...C...D...E...F....G| |A.B...C...D...E...F.....G| |AB...C...D...E...F......G| |B...C...D...E...F...G...H|

It's close to 1 side titles case : full left and full right titles just move when another title hit them.

pakerfeldt commented 13 years ago

I think your first example here aligns best with how the title flow indicator works today (as well as how they work in other examples, like Googles own implementation of this "workspaces" pattern).

pakerfeldt commented 13 years ago

I'm gonna close this issue. Please feel free to post another pull request if you solve it.