[TIMOB-24260] Android: ScrollView.scrollTo not behave like iOS (Parity)
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2017-03-08T08:16:23.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | andorid, scrollview |
| Reporter | Hazem Khaled |
| Assignee | Frankie Merzadyan |
| Created | 2016-12-26T12:55:34.000+0000 |
| Updated | 2017-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();
[~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.
Resolving as dupe of TIMOB-17954.
Closing ticket as duplicate with reference to the linked issues.