Created
December 22, 2014 06:06
-
-
Save Namib/b5eb49560f476c18df7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var thisWin=$.index; | |
var main=$.firstview; | |
// store drawermenu and main in global variable for easy access from menu | |
Alloy.CFG.drawermenu=$.drawermenu; | |
Alloy.CFG.main=main; | |
Alloy.CFG.contactus = $.secondview; | |
Alloy.CFG.thisWin = thisWin; | |
var menu=Alloy.createController('menu').getView(); | |
$.drawermenu.init({ | |
menuview:menu, | |
mainview:main, | |
duration:200, | |
parent: thisWin | |
}); | |
thisWin.addEventListener('open',function(e){ | |
var actionBarHelper = require('com.alcoapps.actionbarhelper')(thisWin); | |
actionBarHelper.setIcon('/[email protected]'); | |
actionBarHelper.setTitle('Demo'); | |
actionBarHelper.setUpAction(function(e){ | |
$.drawermenu.showhidemenu(); | |
}); | |
actionBarHelper.displayHomeAsUp(false); | |
}); | |
thisWin.open(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Alloy> | |
<Window class="container"> | |
<Require type="widget" src="com.alcoapps.drawermenu" id="drawermenu"/> | |
<!--Home screen--> | |
<View id = "firstview" title="" fullscreen="false" backgroundImage="/images/background_home_3.png" backgroundRepeat="false" visible="true"> | |
<Label id="welcomeLabel" text="Welcome"/> | |
<Label id="promotionsLabel" text="LATEST OFFERS"/> | |
<ScrollableView id="scrollableView" ></ScrollableView> | |
</View> | |
<!--Contact us screen--> | |
<View id="secondview" title="" backgroundImage="/images/InternalScreen.png" backgroundRepeat="false" visible="false"> | |
<Label id="LblLocal" text = "contact us"/> | |
<Button id="buttonbrach" /> | |
<Button id="buttonFeedback"/> | |
<Button id="buttonAbout"/> | |
</View> | |
</Window> | |
</Alloy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment