[TIMOB-2721] Android: implement the "contentOffset" property for the "scroll" event in TableView
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2013-01-23T18:46:47.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | 2013 Sprint 02 API, 2013 Sprint 02 |
Components | Android |
Labels | api, insight, parity |
Reporter | Rick Blalock |
Assignee | Ping Wang |
Created | 2011-04-15T03:27:47.000+0000 |
Updated | 2014-01-29T07:51:35.000+0000 |
Description
In the blog post here: http://developer.appcelerator.com/blog/2010/05/how-to-create-a-tweetie-like-pull-to-refresh-table.html"> http://developer.appcelerator.com/blog/2010/05/how-to-create-a-twee...
The scroll event listener references a contentOffset property which has x / y coord. props. contentOffset is undefined in our 1.6 SDK for Android only. contentOffset is present in 1.5.x for Android (works for iOS either way).
To my knowledge this has never been implemented in Android. I went back through the 1.5 source and could not find any reference to contentOffset and it doesn't appear that tableview is even firing a scroll event.
I'm changing the title and tags to correctly denote this as a feature request. Please review the ticket submission guidelines as this ticket violates most of them.
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/76652">http://developer.appcelerator.com/helpdesk/view/76652
klist'd and rplist'd
There's also no contentOffset for ScrollViews. Can we get this added at the same time? Request is coming from customer. http://support.appcelerator.com/tickets/APP-633921/
+1 for implementing this for ScrollView.
up up up!
One may work around using the following Droid properties of Scroll event (firstVisibleItem, totalItemCount, visibleItemCount) - Tested on 2.1.0.GA:
app.js
It looks like fixing this would require keeping track of row heights. Here's a post from stack overflow: http://stackoverflow.com/questions/10808387/android-getting-exact-scroll-position-in-listview This would be possible if every TableView started at the top and then scrolled down. However, a TableView can be programmatically scrolled to any row. In this case the height of proceeding rows may not be known yet.
There is no notion of Y scroll for a ListView in Android simply because the total height of the content is unknown. Only the height of the displayed content is known. I don't think it is possible to implement this feature on Android.
Mark the ticket as Won't Fix since the native Android does not support it.