[TIMOB-3155] Android: Tableview missing scrollToTop method
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:01:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-11 |
Components | Android |
Labels | android, feature, release-1.7.0, reported-1.5.1, rplist |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T03:38:10.000+0000 |
Updated | 2011-04-17T02:01:03.000+0000 |
Description
See http://developer.appcelerator.com/helpdesk/view/73731">Helpdesk 73731
Attachments
File | Date | Size |
---|---|---|
app.js | 2011-04-15T03:38:11.000+0000 | 722 |
Note that
scrollToIndex()
, which works on android without issue, can in some cases be used as a substitute forscrollToTop()
.In case you need it, the following simple usecase reproduces the issue for
scrollToTop()
:This produces the following exception:
Note, the user has provided a good explanation of why this would be useful, and how the functionality works on iOS:
"The scenario goes like this: I have a tableviewrow with a textfield in it. When the textfield receives focus, the keyboard slides up and hence I need that row to slide up as well and be visible. I could do this on the iPhone using scrollToTop. ScrollToIndex only makes sure that the row with the given index is visible on screen. However, it does not take the keyboard sliding into consideration. Hence, even though the row is technically visible, it could be still be hidden behind the keyboard."
(from [e49e01936563ad375adbaa9db28ed86696e1638c]) [#3155 state:fixed-in-qa] added scrollToTop method for Table View
Added scrollToTop method for Table View in Android
https://github.com/appcelerator/titanium_mobile/commit/e49e01936563ad375adbaa9db28ed86696e1638c"> https://github.com/appcelerator/titanium_mobile/commit/e49e01936563...
Please verify fix with attached app.js. If you click on row 5, you should see row 13 scroll to the top of the table view.
Tested with Titanium SDK version: 1.7.0 (03/17/11 10:02 630a276) on
iPad 4.3
Simulator 4.1
iPhone4 4.3
Clicking on row 5 just slightly moves it does not bring row 13 to top
Tested with Titanium SDK version: 1.7.0 (03/17/11 10:02 630a276) on
Nexus S 2.3.2 puts row 13 into the viewable area but not to top
Emulator 2.1 puts row 13 to top
Emulator 2.1 WVGA800 puts row 13 into the viewable area but not to top
Tested with Titanium SDK version: 1.7.0 (03/17/11 10:02 630a276) on
Nexus S 2.3.2 puts row 13 into the viewable area but not to top --- The screen is high density so it can display a lot more in the view, and having only 24 items bringing 13 to the top will cause white space below which is not allowed. Modifying the test to consist of 45 works as expected.