[AC-2480] Setting width to Ti.UI.SIZE in tss doesn't work for views containing label only
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-02-21T22:12:48.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | n/a |
Reporter | levani |
Assignee | Ritu Agrawal |
Created | 2014-02-09T09:16:56.000+0000 |
Updated | 2016-03-08T07:41:32.000+0000 |
Description
I have the following xml markup:
<View id="cancel" class="buttonStyle" left="7">
<Label class="buttonLbl">something</Label>
</View>
and the following tss code in app.tss:
".buttonStyle": {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
borderWidth: "0.6",
borderColor: "white",
borderRadius: 4,
}
".buttonLbl": {
top: 5, bottom: 5, left: 10, right: 10,
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
touchEnabled: false,
color: "white",
font: {
fontSize: 12
}
}
As you see the width of .buttonStyle is set to Ti.UI.SIZE but I get the following result:
!http://i.imgur.com/fs67jqx.png!
but if I set width inside xml like this:
<View id="cancel" width="Ti.UI.SIZE" class="buttonStyle" left="7">
<Label class="buttonLbl">something</Label>
</View>
then I get:
!http://i.imgur.com/bhuaEci.png!
I have not been able to reproduce this issue with the following environment: CLI 3.2.1 + SDK 3.2.1 + Alloy 1.3.1 I get the same behavior irrespective of if I specify width in xml file or tss file. index.js
index.tss
index.xml
I managed to solve the problem and this doesn't appear to be a bug. Please close/delete this bug report. Thanks!
Closing based on reporters comment.