~openerp-dev/openerp-mobile/openerp-mobile-10

« back to all changes in this revision

Viewing changes to doc/build/html/_sources/getting-started/library/drawer_menus/index.txt

  • Committer: Dharmang Soni (OpenERP)
  • Date: 2014-04-07 07:55:14 UTC
  • Revision ID: dpr@tinyerp.com-20140407075514-c0f0i2qm9k6cbrx4
[REMOVE] removed documentation from base framework

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. OpenERP Mobile documentation master file, created by
2
 
   sphinx-quickstart on Tue Mar 25 14:15:37 2014.
3
 
   You can adapt this file completely to your liking, but it should at least
4
 
   contain the root `toctree` directive.
5
 
 
6
 
Drawer Menu
7
 
===========
8
 
 
9
 
Menus are based on each module of android app. It contains different layout parameter to display different type of menu.
10
 
 
11
 
To generate different menu items with icon, tag color and badge we use different constructors.
12
 
 
13
 
.. code-block:: java
14
 
 
15
 
    @Override
16
 
    public List<DrawerItem> drawerMenus(Context context) {
17
 
            List<DrawerItem> menu = new ArrayList<DrawerItem>();
18
 
 
19
 
            menu.add(new DrawerItem(TAG, "Sample Menus", true));
20
 
            menu.add(new DrawerItem(TAG, "Simple Menu", 8, 0, object("all")));
21
 
            menu.add(new DrawerItem(TAG, "Color Menu", 100, "#cc0000", object("all")));
22
 
            menu.add(new DrawerItem(TAG, "Icon Menu", 10, R.drawable.ic_action_about, object("")));
23
 
            return menu;
24
 
    }
25
 
    
26
 
.. image:: images/drawer_menu.png
27
 
    :width: 400px