Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27284] Android: Add scrollstart/scrollend to ScrollView

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.1.0
Fix Version/sn/a
Componentsn/a
Labelsandroid, scrollview
ReporterMichael Gangolf
AssigneeShak Hossain
Created2019-07-26T17:02:17.000+0000
Updated2019-07-29T10:05:51.000+0000

Description

Addding scrollstart and scrollend events to ScrollView. *Example:*
var win = Ti.UI.createWindow({backgroundColor: '#fff'});
var view1 = Ti.UI.createView({width:20,height:1520,backgroundColor:"#f00",top:0,borderWidth:1,borderColor:"#000"});
var scrollView = Ti.UI.createScrollView({height:Ti.UI.FILL,width:Ti.UI.FILL});
var ldi = Ti.Platform.displayCaps.logicalDensityFactor;
scrollView.addEventListener("scrollend",function(e){
	console.log("scrollend");
})
scrollView.addEventListener("scrollstart",function(e){
	console.log("scrollstart");
})
win.add(scrollView);
scrollView.add(view1);

win.open();

it is based on: https://stackoverflow.com/a/24883303/5193915 and will use a Runnable with 100ms to check if the scroll event is called or not. Possible PR: https://github.com/m1ga/titanium_mobile/commit/8f133bb49f66e2780338fae6125e945d13648eb3 It needs iOS parity and it is up for discussion if that approach is usable or if it will create some performance problems

Comments

No comments

JSON Source