Project: titanium
Issue TIMOB-17491: Android: contentOffset property of UI.ScrollView not accessible
The contentOffset property (reflecting what's currently visible in a ScrollView), is undefined on Android. Documentation of [UI.ScrollView|(http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ScrollView-property-contentOffset] says it's available on Android since 0.9, however in version 3.3.0 GA it (still?) doesn't work. h4. Notes * contentOffset is not set manually anywhere in the test code * I'm talking about UI.ScrollView, not tableview or listview h3. How to reproduce Create a ScrollView {code:title=test.xml|borderStyle=solid}	{code} In the controller, try to get the value of the property : {code:title=test.js|borderStyle=solid} alert($.myscrollview.contentOffset.x); {code} h3. Actual result On iOS : the value is properly displayed and reflects any scrolling (manual or not) done on the ScrollView On Android : a runtime error occurs with the following message : {panel:title=Runtime Error} Message: Uncaught TypeError: Cannot read property 'x' of undefined Source: alert($.myscrollview.contentOffset.x); {panel} h3. Expected result Both iOS & Android should produce the same result. Looking at the source of [TiUIScrollView.java|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollView.java] we see that indeed the property is supposed to be updated upon scrolling. However the property is not accessible from JavaScript on Android. (Could it be a problem in the proxy?)
Story points: 3