Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23385] iOS: Vertical View of width Ti.UI.SIZE does not scale to fit contents correctly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 5.4.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterGary Mathews
AssigneeVijay Singh
Created2016-05-16T19:43:47.000+0000
Updated2018-08-09T09:00:49.000+0000

Description

According to http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View "_Titanium.UI.SIZE specifies that the view should adjust this size to fit its contents, such as a label's text or a view's children._" However, this test code shows the view width scaling to fit its parent.
var win = Ti.UI.createWindow({backgroundColor:'green'});
var view = Ti.UI.createView({
    backgroundColor: 'yellow',
    layout: "vertical",
    top: 10,
    left: 10,
    height: Ti.UI.SIZE,
    width: Ti.UI.SIZE,
});

var label = Ti.UI.createLabel({
    left: 10,
    right: 10,
    color: "blue",
    text: "this is test text"
});

view.add(label);

win.add(view);
win.open();

Attachments

FileDateSize
ios.png2016-05-16T19:45:21.000+000025718

Comments

No comments

JSON Source