Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27283] Android: Add "contentSize" property to Ti.UI.ScrollView "scroll" event

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2019-10-02T15:28:45.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.3.0
ComponentsAndroid
Labelsandroid, event, parity, scrollview
ReporterMichael Gangolf
AssigneeGary Mathews
Created2019-07-26T15:51:00.000+0000
Updated2019-10-02T15:28:45.000+0000

Description

Parity for contentSize inside the scroll event of a ScrollView. iOS has this since 5.2.0. *Example:*

var win = Ti.UI.createWindow({backgroundColor: '#fff'});
var view1 = Ti.UI.createView({width:20,height:1020,backgroundColor:"#f00",top:0});
var scrollView = Ti.UI.createScrollView({height:Ti.UI.FILL,width:Ti.UI.FILL});
var ldi = Ti.Platform.displayCaps.logicalDensityFactor;
scrollView.addEventListener("scroll",function(e){
	console.log("contentSize", e.contentSize);
})
win.add(scrollView);
scrollView.add(view1);

win.open();
Will output height: 1020 (height of the red view) and your screen width.

Comments

  1. Michael Gangolf 2019-07-26

    PR: https://github.com/appcelerator/titanium_mobile/pull/11082
  2. Keerthi Mahalingam 2019-09-06

    FR passed.Waiting on Jenkins
  3. Christopher Williams 2019-09-09

    merged to master for 8.3.0 target
  4. Ebenezer Boateng 2019-10-02

    Improvement verified in SDK version 8.3.0.v20191001072347. Ble to see the following in the console:
        {"width":411,"height":1020}
       

JSON Source