Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23225] Windows: Ti.UI.SIZE is not working properly on Windows Phone on a container with child views.

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-06-14T18:41:41.000+0000
Affected Version/sRelease 5.2.2
Fix Version/sRelease 6.0.0
ComponentsWindows
LabelsTi.UI.SIZE, Windows, Windows-Phone
ReporterNiels Kok
AssigneeKota Iguchi
Created2016-04-08T10:02:07.000+0000
Updated2016-09-02T16:15:11.000+0000

Description

Ti.UI.SIZE is not working properly on Windows Phone on a container with child views. index.xml
<Alloy>
    <Window title="Example">
        <View id="imageContainer">
            <ImageView id="large" />
            <ImageView id="small" />
        </View>
    </Window>
</Alloy>
index.tss
"Window" : {
	backgroundColor: "white"
}
"#imageContainer" : {
	height: Ti.UI.SIZE, width: Ti.UI.FILL
}
"#large" : {
	image: 'images/large.png',
	height: Ti.UI.SIZE, width: Ti.UI.FILL
}
"#large[platform=android]" : {
	image: '../../images/large.png'
}
"#small" : {
	top: 0, right: 0,
	image: 'images/small.png',
	height: Ti.UI.SIZE, width: 100
}
"#small[platform=android]" : {
	image: '../../images/small.png'
}

Attachments

FileDateSize
8f1bdc96-2ce1-11e6-9627-6e99aaca5e2a.png2016-08-01T01:24:21.000+00002211
Android.png2016-04-08T09:57:05.000+000053739
iOS.png2016-04-08T09:57:05.000+000027719
Windows.png2016-04-08T09:56:41.000+000014926

Comments

  1. Kota Iguchi 2016-06-08

    https://github.com/appcelerator/titanium_mobile_windows/pull/740
  2. Kota Iguchi 2016-08-01

    *Classic app example*
       var win = Ti.UI.createWindow({ backgroundColor: 'green' });
       
       var view = Ti.UI.createView({
           height: Ti.UI.SIZE,
           width: Ti.UI.SIZE,
           backgroundColor: 'orange'
       });
       
       var img1 = Ti.UI.createView({
           height: 100, width: Ti.UI.FILL,
           backgroundColor:'gray'
       });
       var img2 = Ti.UI.createView({
           height: 50, width: 50,
           top: 0, right: 0,
           backgroundColor: 'red'
       });
       
       view.add(img1);
       view.add(img2);
       win.add(view);
       
       win.open();
       
    !8f1bdc96-2ce1-11e6-9627-6e99aaca5e2a.png|thumbnail!
  3. Ewan Harris 2016-09-02

    Verified using: OS: Windows 10 Pro Appc core: 6.0.0-37 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160901034311 TI.UI.SIZE now works correctly for a view with child views Closing ticket

JSON Source