Coder Social home page Coder Social logo

alloy-widget-drawermenu's Introduction

DrawerWidget

This is an Appcelerator Alloy widget to implement a nice "drawer-type" menu on you iOS and Android Apps. This new version 2.0 was a bit refactored, simplifying the way you interact with the widget, and adding swipe functionality.

Demo

This Widget exposes two views: drawermenuview and drawermainview

Getting started

This widget simply gives you a container to which you can add two views: the menu view and the main view. Open/Close of the menu can be triggered by either a button you add to your main view, or by swiping with your finger.

Assuming you have a view called menu and a view called main, simply add this to the index.js of your app:

$.drawermenu.init({
    menuview:menu,
    mainview:main,
    duration:200,
    parent: $.index
})

That's all. At this point you have a swipeable area that shows the menu by swiping to the right.

If you add a "menu button" to your main view, simply add an event listener like this:

	var menubutton.addEventListener('click',function(e){
		$.drawermenu.showhidemenu();
	})

ActionBar

In the ActionBar Demo folder you'll find an example of how to trigger the Drawer Menu from the ActionBar

ActionBar Demo

Want to try it for yourself? Download the APK.

Apps

Send me a link to your app, or a pull request of the README.md file to showcase your app using this Widget.

Contribuitors

License

MIT - http://alco.mit-license.org

alloy-widget-drawermenu's People

Contributors

danpe avatar juanumusic avatar ricardoalcocer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.