Search code examples
tidesdk

TideSDK keep window set on top (transparent overlay)


I'm looking to make a small app using TideSDK, but would like to have the window sit in the bottom right and always on top of other windows

e.g. like a transparent overlay showing a graph or some information that is always visible regardless of switching focus to other windows

Is this doable?


Solution

  • on the tiapp.xml define:

    <transparent-background>true</transparent-background>
    

    on css define:

    <style type="text/css">
        html, body {
            background : transparent;
        }
    </style>
    

    on your javascript call:

    <script type="text/javascript">
        Ti.UI.currentWindow.setTopMost ( true );
        Ti.UI.currentWindow.moveTo ( display.width-your.app.width, display.height-your.app.height );
    </script>