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

How to handle xp.ui Navigation window inside nl.fokkezb.drawer on Android?

$
0
0

Hi there,

I am facing the curious Android problem that when I put NavigationWindow (using xp.ui) inside drawer widget the center window would not open. Left and right window of drawer module works great but center window is not shown.

Here is my code:

index.xml
<Alloy>
    <Widget id="drawer" src="nl.fokkezb.drawer">
 
        <Window module="xp.ui" role="leftWindow" id="leftPanel">
            <Label>I am left</Label>
        </Window>
 
        <NavigationWindow module="xp.ui" role="centerWindow" id="nav">
            <Window id="centerPanel">
                <LeftNavButton>
                    <Button onClick="toggle">Left</Button>
                </LeftNavButton>
 
        <Label onClick="openDetail">I am center</Label>
 
        <RightNavButton>
                    <Button onClick="toggle">Right</Button>
                </RightNavButton>
            </Window>
        </NavigationWindow>
 
        <Window module="xp.ui" role="rightWindow" id="rightPanel">
            <Label>I am right</Label>
        </Window>
 
    </Widget>
</Alloy>
### index.js
$.drawer.open();
 
function toggle(e) {
    var fn = 'toggle' + e.source.title + 'Window';
    $.drawer[fn]();
}
 
function openDetail() {
 
    var detail = Alloy.createController('detail').getView();
 
    $.nav.openWindow(detail);
}

Have everyone faced the similar problem? Why this is not work?

Thanks


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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