I have an Android / iOS app developed using Alloy and the Titanium 3.5.1 GA. I'm using the GenyMotion emulator for testing and have encountered an issue with setting an opacity or transparency on a window.
I'm adding a window to display a date picker that I'd like to overlay on top of the current window. I've already configured the app so that the Android action bar does not appear above the windows using the Android theming support. When I create the new window it still displays the action bar so long as any of the following are true: - The window has an opacity set - The window has a backgroundColor set to 'transparent' - The window has a height and width set to something less than the parent window
To provide an example - I'm using the XML below for the view:
<Alloy> <Window id="dateWindow" platform="android,ios"> <View id="popupView"> <Picker id="pickDate" type="Ti.UI.PICKER_TYPE_DATE" minDate="2014,4,1" maxDate="May 1, 2014 12:00:00" value="2014-04-15T12:00:00"></Picker> <Button id="btnSave" onClick="saveDate">Set</Button> </View> </Window> </Alloy>If I use the following TSS the action bar appears:
"#btnSave": { top: '10dp' } "#dateWindow": { height: Titanium.UI.FILL, layout: 'vertical', opacity: '.5', width: Titanium.UI.FILL } "#pickDate": { top: '10%' } "#popupView": { backgroundColor: '#404040', height: Titanium.UI.SIZE, layout: 'vertical', width: Titanium.UI.SIZE }If I remove the opacity property from #dateWindow then the action bar does not appear. If I change the #dateWindow height and width to
Titanium.UI.SIZE I just get a black window. Not sure why that is...