Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Why does the picker UI change when added to window with no (transparent) background?

$
0
0

Hello All,

I'm working with an existing application which loads new sections of content into new windows. I have hunch that there's probably a better way to do this architecturally, but for now I'm trying to keep rebuilding time to a minimum.

Here's the issue: I'm attempting to load a new window above an existing window. I'd like the top window to have a transparent background so the background image on the first window is visible. I've been able to get this part working by leaving the backgroundColor property of the top window blank and, oddly, setting the opacity property of the top window to 1. The problem, though, is that when I successfully make the background of the top window transparent, the UI of the picker completely changes. You can see the UI changes in the images below. The lobby photo is the background image on the first layer. In the code below the background of the first layer is simply orange in case someone wants to reproduce the issue without worrying about the image path.

![With Opacity](https://dl.dropboxusercontent.com/u/6180213/titanium/ui-with-background-opacity.png "With Background Opacity")

![Without Opacity](https://dl.dropboxusercontent.com/u/6180213/titanium/ui-without-background-opacity.png" Without Background Opacity")

I've attempted to reduce the code here to the bare minimum required to reproduce the issue I'm experiencing.

var layer1Window = Titanium.UI.createWindow({  
    backgroundColor: 'orange'
});
 
var layer2Window = Titanium.UI.createWindow({
    //opacity: 1 // Setting opacity to 1 allows for transparent background, but changes picker UI.  
});
 
var picker = Titanium.UI.createPicker({
    type: Titanium.UI.PICKER_TYPE_TIME
});
 
layer2Window.add(picker);
layer1Window.open();
layer2Window.open();
Application type: Mobile Titanium SDK: Titanium SDK version 3.3.0.GA Platform & version: Android Device: Ployer - Momo Mini Host Operating System: OSX 10.9.4 Studio: Titanium Studio, build: 3.3.0.201407100905

If there's anything else which might be relevant, just say the word.

Thanks in advance for any help.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>