Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23350] Windows: ScrollView width/height should default to Ti.UI.FILL

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2016-05-26T06:33:14.000+0000
Affected Version/sRelease 5.3.0
Fix Version/sRelease 5.4.0
ComponentsWindows
Labelsqe-5.4.0
ReporterFokke Zandbergen
AssigneeGary Mathews
Created2016-05-10T09:57:53.000+0000
Updated2016-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

FileDateSize
expected.jpg2016-05-26T00:35:34.000+000013209

Comments

  1. Gary Mathews 2016-05-26

    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*
       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();
       
    *EXPECTED* !expected.jpg|thumbnail!
  2. Harry Bryant 2016-06-27

    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.*

JSON Source