Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1896] Android: Window width and height not respected

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-08-16T01:21:17.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsapi
ReporterPaul Dowsett
AssigneeIngo Muschenetz
Created2011-04-15T03:04:57.000+0000
Updated2017-08-16T01:21:17.000+0000

Description

var winView1 = Ti.UI.createWindow({

    backgroundColor:'#b1b1bd',
//  borderRadius:5,
    url:"view1.js",
    modal: true,
//  modal:false,
    title: "View1",
    width: 280,
    height: 300
});
winView1.open();

view1.js

var win = Ti.UI.currentWindow;
var viewView1 = Ti.UI.createView({
    backgroundColor: '#ffb1bd',
    borderRadius:10,
    top:10,
    width:280,
    height:280
});
win.add(viewView1);

Comments

  1. Stephen Tramer 2011-04-15

    Assigning to Don for triage.

  2. Junaid Younus 2012-08-21

    Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120821095711, issue still valid.
  3. Allan Brazute 2013-06-26

    On sdk 3.1, issue still valid. I believe that modal windows shoud respect width/height or at least margin.
  4. Sunila 2014-02-01

    Tried with the latest master and it seems working. Where is the margin defined in the sample code? Here is the code I tried var winView1 = Ti.UI.createWindow({ backgroundColor:'#b1b1bd', modal: true, title: "View1", width: 280, height: 300 }); winView1.open(); var viewView1 = Ti.UI.createView({ backgroundColor: 'red', borderRadius:10, top:10, width:80, height:280 }); winView1.add(viewView1); See the attached image
  5. Lee Morris 2017-08-16

    This is no longer occurring with the following environment; Studio 4.9.1.201707200100 Ti SDK 6.1.2 GA Appc CLI 6.2.3 Ti CLI 5.0.14 Alloy 1.9.13 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source