Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11331] Android: ScrollView - "ScrollToBottom" method doesn't work on Android

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-02-27T09:01:52.000+0000
Affected Version/sRelease 2.1.4, Release 3.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsmodule_scrollview, parity, qe-and100112, qe-and214, qe-review, qe-testadded
ReporterTamila Smolich
AssigneeShameer Jan
Created2012-10-09T21:43:28.000+0000
Updated2014-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

Comments

  1. Shameer Jan 2013-02-27

    The problem cannot reproduce with release 3.0.2 and master release 3.1.0
  2. Olga Romero 2013-02-27

    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
  3. Olga Romero 2013-03-05

    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
  4. jithinpv 2013-11-19

    anvil test case added PR Link: https://github.com/appcelerator/titanium_mobile/pull/4958

JSON Source