Android - Window inside of a Window
I tried to add a simple window inside of a window using the Android emulator on Windows Vista.
Should be very easy and work.
I have my full window which works great then I try to add a child window with a height and width smaller than the main window. Then something like this:
var win1 = Titanium.UI.createWindow({
title:'Main Window',
backgroundColor:'#fff'
});
var childWin = Titanium.UI.createWindow({
height:25,
width:25,
backgroundColor:"#FC0"
});
win1.add(childWin);
For some reason the Android emulator throws and error stating that the application has stopped unexpectedly. Please try again and then a button for "Force close". Is this a bug?? or is the emulator not capable of doing this. I can add labels all day but not a simple window?
Also borders are not working in the Android. I may ask this as another question.
2 Answers
-
Accepted Answer
Windows can't be treated as views. You would just open your child window. If you don't need the window features, you should use createView add it to the parent and then add any child views you want to the view.
-
That worked. Thank you. I saw a tutorial for an iPhone using Titanium that used a child window inside of a window. I am assuming this is not the case in Android. I will stick with views then. Thank you.