[TIMOB-23350] Windows: ScrollView width/height should default to Ti.UI.FILL
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | None |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-05-26T06:33:14.000+0000 |
| Affected Version/s | Release 5.3.0 |
| Fix Version/s | Release 5.4.0 |
| Components | Windows |
| Labels | qe-5.4.0 |
| Reporter | Fokke Zandbergen |
| Assignee | Gary Mathews |
| Created | 2016-05-10T09:57:53.000+0000 |
| Updated | 2016-10-06T06:47:56.000+0000 |
Description
As the [docs](http://docs.appcelerator.com/platform/latest/#!/guide/Layouts,_Positioning,_and_the_View_Hierarchy-section-29004895_Layouts,Positioning,andtheViewHierarchy-AutoSizeBehaviors) and Android and iOS have,
Ti.UI.ScrollView should default to FILL.
The following example demonstrates it does not:
var win = Ti.UI.createWindow();
win.add(Ti.UI.createScrollView({
// width: Ti.UI.FILL, height: Ti.UI.FILL,
backgroundColor: 'green'
}));
win.open();
Remove the comments to see the expected behavior.
Attachments
| File | Date | Size |
|---|---|---|
| expected.jpg | 2016-05-26T00:35:34.000+0000 | 13209 |
master: https://github.com/appcelerator/titanium_mobile_windows/pull/720 Test case taken from TIMOB-23384 which is also caused by this issue. *TEST CASE*
*EXPECTED* !expected.jpg|thumbnail!var win = Ti.UI.createWindow(), scrollView = Ti.UI.createScrollView({ // width: Ti.UI.FILL, height: Ti.UI.FILL, layout: "vertical", backgroundColor: 'red' }), view = Ti.UI.createView({ backgroundColor: 'orange', top: 10, left: 10, height: Ti.UI.SIZE, width: Ti.UI.SIZE }), label = Ti.UI.createLabel({ left: 10, right: 10, color: "green", backgroundColor: 'yellow', text: "this is test text" }); view.add(label); scrollView.add(view); win.add(scrollView); win.open();Verified as fixed, ScrollView size now defaults to Ti.UI.FILL when the width property has not been set. Tested on: Windows 10 Pro Windows Phone 10.0 (Microsoft Lumia 640 LTE) Appc Studio: 4.7.0.201606220541 Ti SDK: 5.4.0.v20160617074028 Appc NPM: 4.2.7-2 Appc Core: 5.4.0-18 Node: v4.4.4 *Closing Ticket.*