wolverine2k / andtweet

Automatically exported from code.google.com/p/andtweet
Apache License 2.0
0 stars 0 forks source link

Improve tweet list scrolling in large lists #48

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The position memory brought about an interesting problem: when AndTweet checks 
for tweets in the background and the user neglects to open the application up 
to scroll to the top the position in the timeline will be at the very bottom 
and the user has to scroll through hours of tweets. This can be especially 
cumbersome if the user follows 500+ accounts.

Possible solutions:

Add a button/menu option/click area to immediately bring the user to the top of 
the list. This can be a click on the title bar for instance.

Once scrolling starts, display a scroll handle similar to the handle used in 
the Android Contacts application. That way the user could quickly scroll to the 
top of the list. This also introduces the option of overlaying a relative time 
as the user scrolls so that they can see how many days/hours they are behind.

Recommended changes:

Whenever the user posts an update, jump to the top of the list.

Questions:

When the user switches view-port from portrait to landscape for instance, is 
the position stored prior to this operation so that the application will 
remember this when restarting the list activity?

Original issue reported on code.google.com by torgny.b...@gmail.com on 5 Aug 2010 at 2:31

GoogleCodeExporter commented 8 years ago
1. About scrolling:
I looked into the Contact application (com.android.contacts):
- See com.android.contacts.ContactsListActivity for implementation
- Scrolling is implemented using ScrollView layout container 
http://developer.android.com/reference/android/widget/ScrollView.html
I think adding scrolling without labels ("overlaying a relative time") is 
simple.

These labels (for "sections" - different time periods in our case) are 
implemented in e.g.: 
com.android.contacts.ContactsListActivity.ContactItemListAdapter.bindSectionHead
er(View, int, boolean).

2. "Whenever the user posts an update, jump to the top of the list."
I don't think this is good for everybody. Personally I want to stay at the same 
position after posting an update, because I want to read and maybe reply to 
other tweets as well  :-)

3. "When the user switches view-port from portrait to landscape for instance, 
is the position stored prior to this operation so that the application will 
remember this when restarting the list activity?"
I've just tested this on current revision: works Ok.

Original comment by yvo...@gmail.com on 6 Aug 2010 at 10:26

GoogleCodeExporter commented 8 years ago
I was wrong about ScrollView, but I was right that adding that large autohiding 
handle (it's called "fast scroll thumb") is simple  :-)
I had to add  android:fastScrollEnabled="true" to the ListView element of the 
Layout - and it works!

What's about "indexing" of the tweets in the list:
"There's an SDK sample on this:  platforms\android-?.?\samples\ApiDemos
\src\com\example\android\apis\view\List9.java"
(from 
http://www.mail-archive.com/android-developers@googlegroups.com/msg77516.html)

Original comment by yvo...@gmail.com on 6 Aug 2010 at 5:19

GoogleCodeExporter commented 8 years ago
I'm testing this "fast scroll thumb" on my device... and I really don't like 
that it's present almost always - even when I don't want to "scroll fast" :-(
So I made a trick: the fast scroll is set to off OnResume and is set ON only 
when scroll mode is fling... so the "Fast scroll thumb" a little less annoying 
:-)
Please see "Revision 452e489464".

BTW I saw that "indexing" in ApiDemos - it is exactly what Torgny proposed.
(in the application select: Views -> Lists -> 9. Array (Overlay)  )

Original comment by yvo...@gmail.com on 6 Aug 2010 at 7:08

GoogleCodeExporter commented 8 years ago
We have the fast scroll thumb implemented, all we need now is the overlay that 
displays the relative time of the tweets being scrolled so that the user can 
quickly go back say three hours in their timeline and start reading there.

Original comment by torgny.b...@gmail.com on 16 Aug 2010 at 1:36