[TIMOB-1897] Window width and height not respected on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2017-06-05T20:16:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, emulator, feature |
Reporter | Paul Dowsett |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:04:58.000+0000 |
Updated | 2017-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.
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({
});
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.
Duplicate of timob-1896.