Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1897] Window width and height not respected on Android

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2017-06-05T20:16:47.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, emulator, feature
ReporterPaul Dowsett
AssigneeIngo Muschenetz
Created2011-04-15T03:04:58.000+0000
Updated2017-06-05T20:16:47.000+0000

Description

When creating a modal window, with width and height specified, a full screen window is produced. This use case demonstrates the problem:
var winView1 = Ti.UI.createWindow({
    backgroundColor:'#b1b1bd',
//  borderRadius:5,
    url:"view1.js",
    modal: true,
//  modal:false,
    title: "View1",
    width: 280,
    height: 300
});
winView1.open();</code>
var win = Ti.UI.currentWindow;
var viewView1 = Ti.UI.createView({
    backgroundColor: '#ffb1bd',
    borderRadius:10,
    top:10,
    width:280,
    height:280
});
win.add(viewView1);
Furthermore, if borderRadius is used, an exception is produced. I'll raise that in another ticket, but the code above also demonstrates this if the createWindow borderRadius property is uncommented above.

Comments

  1. z3nd 2011-04-15

    Hi,

    I have found a workaround to this bug. It still needs to be fixed though.

    Basically you have to specify the window's windowSoftInputMode property to any of the Ti.UI.Andorid.SOFT_INPUT_XXX operating modes. Doing so will force the window into a heavyweight window. This will bring your newly created window below the status bar instead of behind it.

    Example:

    var win = Ti.UI.createWindow({

       exitOnClose: false,
       url:'main/details.js',
       backgroundImage:'../images/Background.png',
       width: stageWidth,
       height: 'auto',
       windowSoftInputMode: Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE,
       

    });

  2. Paul Dowsett 2011-06-09

    This is a blocker according to the severity definitions, as there is no workaround - ie there is no way to achieve a modal (fullscreen, navbarhidden etc) or blurred modal effect for a window with dimensions defined. Note: This is another of my tickets where Ralf marked himself as the reporter. Hence, restoring myself as reporter.
  3. Junaid Younus 2012-08-21

    Duplicate of timob-1896.

JSON Source