Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24260] Android: ScrollView.scrollTo not behave like iOS (Parity)

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2017-03-08T08:16:23.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandorid, scrollview
ReporterHazem Khaled
AssigneeFrankie Merzadyan
Created2016-12-26T12:55:34.000+0000
Updated2017-03-24T18:36:10.000+0000

Description

ScrollView.scrollTo not behave like iOS, no animation, while ScrollToBottom animates well both iOS and Android.
var win = Ti.UI.createWindow();

var scrollView = Ti.UI.createScrollView({
    layout: 'vertical'
});
win.add(scrollView);

// scrollToBottom animates well both iOS and Android
var button1 = Ti.UI.createButton({
    title: 'scrollToBottom',
    top: 10
});
button1.addEventListener('click', function() {
    scrollView.scrollToBottom();
});
scrollView.add(button1);

// scrollToBottom don't animate on Android
var button2 = Ti.UI.createButton({
    title: 'scrollTo 350, 350',
    top: 10
});
button2.addEventListener('click', function() {
    scrollView.scrollTo(0, 350);
});
scrollView.add(button2);


for (var i = 0; i < 20; i++) {
    scrollView.add(Ti.UI.createLabel({
        text: 'Text' + i,
        width: 120,
        top: 10
    }));
}

win.open();

Comments

  1. Frankie Merzadyan 2017-03-08

    [~hazemkhaled] I do not see a problem. Scroll view animates scrolling to bottom of list in both iOS and Android. Tested using latest SDK version on iPhone 7 Plus - iOS 10 and Google Nexus 6P - API 24.
  2. Hans Knöchel 2017-03-08

    Resolving as dupe of TIMOB-17954.
  3. Lee Morris 2017-03-24

    Closing ticket as duplicate with reference to the linked issues.

JSON Source