0
votes

I want to create a window that stays on top regardless if more windows are created later on.

For example consider the following code (Note this is just a simple example to illustrate the problem. My real code wants a to open when some async function is complete):

Alloy.createController('a').getView().open();
Alloy.createController('b').getView().open();

Normally a is opened and then b is opened after it.

However, I want a to stay on top, even after b is opened.

I tried using the modal property, like so:

Alloy.createController('a').getView().open({modal: true});
Alloy.createController('b').getView().open();

However, this only keeps a on top on the iOS platform. It does not keep it on top for Android.

I also tried to add a zIndex property to the Window element in a like so:

<Window zIndex="1000">...</Window>

But it still does not seem to work.

How can I solve this problem?

1

1 Answers

1
votes

You can't do this on android using Window because Window is an Activity and only one Activity is visible at time.

For android you haven't choice you need to transform your Window on View

On iOS try to open a on nomodal and b.zIndex = 1