[TIMOB-11331] Android: ScrollView - "ScrollToBottom" method doesn't work on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-02-27T09:01:52.000+0000 |
Affected Version/s | Release 2.1.4, Release 3.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | module_scrollview, parity, qe-and100112, qe-and214, qe-review, qe-testadded |
Reporter | Tamila Smolich |
Assignee | Shameer Jan |
Created | 2012-10-09T21:43:28.000+0000 |
Updated | 2014-06-19T12:43:33.000+0000 |
Description
Description:
"ScrollToBottom" method doesn't work on Android. Touching anywhere on the screen should scroll to the bottom, as it does on iOS.
Not a regression, the behavior exists as far back as 2.0.0 at least.
Steps:
1. Run the following code:
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var scroll = Ti.UI.createScrollView({
contentHeight: '2000',
scrollType: 'vertical'
});
scroll.add(Ti.UI.createLabel({
text: 'Welcome to the top! Touch anywhere to scroll to bottom.', textAlign: 'center',
color: '#000',
width: Ti.UI.SIZE, height: Ti.UI.SIZE,
top: 0
}));
scroll.add(Ti.UI.createLabel({
text: 'Welcome to the bottom!', textAlign: 'center',
color: '#000',
width: Ti.UI.SIZE, height: Ti.UI.SIZE,
bottom: 0
}));
scroll.addEventListener('click', function (evt) {
if (!scroll.scrollToBottom) {
alert('Whoops! scrollToBottom() does not exist on this platform.');
}
else {
scroll.scrollToBottom();
}
});
win.add(scroll);
win.open();
2. Touch anywhere on the screen to scroll to the bottom.
Expected result:
The scroll view should scroll to the bottom
Actual result:
Nothing happens
The problem cannot reproduce with release 3.0.2 and master release 3.1.0
Cannot reproduce. Tested with: Titanium Studio, build: 3.0.2.201302191606 Titanium SDK, build: 3.0.2.GA Devices: Android 2.2 Emulator Nexus 7 Android version 4.2 GalaxyS3 Android version 4.0.4
Closing as Cannot reproduce. Tested with: Titanium Studio, build: 3.0.2.201302191606 Titanium SDK, build: 3.1.0.v20130303194855 Devices: Android 2.2 Emulator Nexus 7 Android version 4.2 GalaxyS3 Android version 4.0.4
anvil test case added PR Link: https://github.com/appcelerator/titanium_mobile/pull/4958