Best code examples for Android SubMenu class (android.view.SubMenu)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SubMenu class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android SubMenu examples from Open Source projects
This code example shows how to use the following methods: add, getItem
234:	final MenuItem subMenuItem = subMenu.getItem(); 
235:	final MenuItem item1 = subMenu.add(0, 1, 0, "item1"); 
236:	final MenuItem item2 = subMenu.add(0, 2, 0, "item2"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setHeaderTitle
268:	this.subMenu.setHeaderTitle(getTitle()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: add
34:	file.add(0,ITEM_NEW_FILE,0,"н¨"); 
35:	file.add(0,ITEM_OPEN_FILE,0,"´ò¿ª"); 
36:	file.add(0,ITEM_CLOSE,0,"¹Ø±Õ"); 
37:	file.add(0,ITEM_SAVE,0,"±£´æ"); 
38:	file.add(0,ITEM_SAVE_ALL,0,"±£´æÈ«²¿"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: add
148:	sm.add(0, 0, 0, "CM Subitem 1"); 
149:	sm.add(0, 0, 0, "CM Subitem 2"); 
150:	sm.add(0, 0, 0, "CM Subitem 3"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: add, setIcon
63:	mapSubMenu.setIcon(android.R.drawable.ic_menu_mapmode); 
-
65:	MenuItem trafficItem = mapSubMenu.add(1, firstItem, firstItem, 
-
69:	MenuItem satelliteItem = mapSubMenu.add(1, firstItem + 1, 
-
72:	MenuItem streetViewItem = mapSubMenu.add(1, firstItem + 2, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: add
116:	settingMenu.add(0, MENU_SETTINGS_CYCLES, 0, "Cycles"); 
117:	settingMenu.add(0, MENU_SETTINGS_FRAMESKIP, 0, "Frameskip"); 
118:	settingMenu.add(0, MENU_SETTINGS_MEMORY_SIZE, 0, "Memory Size"); 
119:	settingMenu.add(0, MENU_SETTINGS_SOAP_VIDEO, 0, "Soap Video") 
-
121:	settingMenu.add(0, MENU_SETTINGS_AUDIO_ENABLED, 0, "Audio Enabled") 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: add, setGroupCheckable
36:	subMenuFile.add(COLOR_MENU_GROUP, RED, Menu.NONE, "Red"); 
37:	subMenuFile.add(COLOR_MENU_GROUP, GREEN, Menu.NONE, "Green"); 
38:	subMenuFile.add(COLOR_MENU_GROUP, BLUE, Menu.NONE, "Blue"); 
39:	subMenuFile.setGroupCheckable(COLOR_MENU_GROUP, true, false); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: add
116:	settingMenu.add(0, MENU_SETTINGS_CYCLES, 0, "Cycles"); 
117:	settingMenu.add(0, MENU_SETTINGS_FRAMESKIP, 0, "Frameskip"); 
118:	settingMenu.add(0, MENU_SETTINGS_MEMORY_SIZE, 0, "Memory Size"); 
119:	settingMenu.add(0, MENU_SETTINGS_SOAP_VIDEO, 0, "Soap Video") 
-
121:	settingMenu.add(0, MENU_SETTINGS_AUDIO_ENABLED, 0, "Audio Enabled") 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: add, setIcon
98:	mapSubMenu.setIcon(android.R.drawable.ic_menu_mapmode); 
-
100:	MenuItem trafficItem = mapSubMenu.add(1, firstItem, firstItem, "Traffic"); 
-
103:	MenuItem satelliteItem = mapSubMenu.add(1, firstItem+1, firstItem+1, "Satellite"); 
-
105:	MenuItem streetViewItem = mapSubMenu.add(1, firstItem+2, firstItem+2, "Street View"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: add, getItem
234:	final MenuItem subMenuItem = subMenu.getItem(); 
235:	final MenuItem item1 = subMenu.add(0, 1, 0, "item1"); 
236:	final MenuItem item2 = subMenu.add(0, 2, 0, "item2"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add, setGroupCheckable
50:	subMenu4.add(2, Menu.NONE, Menu.NONE, "Opzione 1"); 
51:	subMenu4.add(2, Menu.NONE, Menu.NONE, "Opzione 2"); 
52:	subMenu4.add(2, Menu.NONE, Menu.NONE, "Opzione 3"); 
53:	subMenu4.setGroupCheckable(2, true, true); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getItem
66:	ca.idi.tecla.lib.menu.SubMenu mSubMenu = new ca.idi.tecla.lib.menu.SubMenu(subMenu); 
-
68:	ca.idi.tecla.lib.menu.MenuItem mItem = addMenuItemToMap(subMenu.getItem()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add, getItem
139:	order.add(Menu.NONE, 1, 1, "������"); 
140:	order.add(Menu.NONE, 2, 2, "������ʱ��"); 
141:	order.add(Menu.NONE, 3, 3, "��������"); 
142:	order.getItem().setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add
26:	file.add(0,Item1,0,"н¨"); 
27:	file.add(0,Item2,0,"±£´æ"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add
157:	subMenu.add(base, base+2, base+2, "sub item1"); 
158:	subMenu.add(base, base+3, base+3, "sub item2"); 
159:	subMenu.add(base, base+4, base+4, "sub item3"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add, setGroupCheckable
57:	subMenu.add(1, 1, 0, "Green").setChecked(true); 
58:	subMenu.add(1, 2, 0, "Red"); 
59:	subMenu.add(1, 3, 0, "Blue"); 
60:	subMenu.add(1, 4, 0, "Yellow"); 
61:	subMenu.add(1, 5, 0, "Grey"); 
62:	subMenu.add(1, 6, 0, "Pink"); 
63:	subMenu.add(1, 7, 0, "Black"); 
64:	subMenu.add(1, 8, 0, "White"); 
65:	subMenu.setGroupCheckable(1, true, true); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add, setIcon
38:	item6.setIcon(android.R.drawable.ic_menu_more); 
39:	item6.add(0, 10, 0, "subitem1"); 
40:	item6.add(0, 20, 0, "subitem2"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add, setGroupCheckable
51:	subMenu.add(1, 1, 0, "Green").setChecked(true); 
52:	subMenu.add(1, 2, 0, "Red"); 
53:	subMenu.add(1, 3, 0, "Blue"); 
54:	subMenu.add(1, 4, 0, "Yellow"); 
55:	subMenu.add(1, 5, 0, "Grey"); 
56:	subMenu.add(1, 6, 0, "Pink"); 
57:	subMenu.add(1, 7, 0, "Black"); 
58:	subMenu.add(1, 8, 0, "White"); 
59:	subMenu.setGroupCheckable(1, true, true); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add
34:	subMenuFile.add(Menu.NONE, NEW, Menu.NONE, "New"); 
35:	subMenuFile.add(Menu.NONE, OPEN, Menu.NONE, "Open"); 
36:	subMenuFile.add(Menu.NONE, SAVE, Menu.NONE, "Save"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add, setIcon
54:	item6.setIcon(android.R.drawable.ic_menu_more); 
55:	item6.add(0,10,0,"subitem1"); 
56:	item6.add(0,20,0,"subitem2"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add
79:	subMenuGame.add(Menu.NONE, IDM_NEW, Menu.NONE, "�����"); 
80:	subMenuGame.add(Menu.NONE, IDM_CLOSE, Menu.NONE, "�������"); 
81:	subMenuGame.add(Menu.NONE, IDM_SAVE, Menu.NONE, "���������"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add, setGroupCheckable
124:	subMenu.add(1, 1, 0, "Green").setChecked(true); 
125:	subMenu.add(1, 2, 0, "Red"); 
126:	subMenu.add(1, 3, 0, "Blue"); 
127:	subMenu.add(1, 4, 0, "Yellow"); 
128:	subMenu.add(1, 5, 0, "Grey"); 
129:	subMenu.add(1, 6, 0, "Pink"); 
130:	subMenu.add(1, 7, 0, "Black"); 
131:	subMenu.add(1, 8, 0, "White"); 
132:	subMenu.setGroupCheckable(1, true, true); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add
56:	menu1.add(0, subitPhoto1, 0, "照片flow1.png"); 
57:	menu1.add(0, subitPhoto2, 1, "照片flow2.png"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add, setIcon
27:	subMenu.setIcon(android.R.drawable.ic_menu_edit);//ÉèÖÃͼ±ê 
-
29:	subMenu.add(2, 11, 11, "Ôö¼Ó"); 
30:	subMenu.add(2, 11, 11, "¼õÉÙ"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add
33:	sub.add(0, MENU3, 0, "Tela2"); 
34:	sub.add(0, MENU4, 0, "Site DevMobileBrasil"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add
21:	sub.add(0, 1, 0, "new"); 
22:	sub.add(0, 2, 0, "open"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: add, clear
67:	subMenu.clear(); 
-
69:	subMenu.add("Test1").setOnMenuItemClickListener(this); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: add
86:	myGroup.add("Stop Service"); 
87:	myGroup.add("Start Service"); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setHeaderTitle
267:	this.subMenu.setHeaderTitle(getTitle()); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: add
133:	miCharactersAdd = characters.add("Add"); 
134:	miCharactersRemoveAll = characters.add("Remove All"); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: setHeaderTitle
280:	this.subMenu.setHeaderTitle(getTitle()); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: add, addSubMenu, setGroupCheckable, getItem, setHeaderTitle
110:	subCompression.add(2,IMAGE_TRANSPORT_COMPRESSION_PNG,0,"Png"); 
-
112:	SubMenu subCompressionRate = subCompression.addSubMenu(2,IMAGE_TRANSPORT_COMPRESSION_JPEG,0,"Jpeg"); 
-
114:	subCompressionRate.setHeaderTitle("Compression quality"); 
115:	subCompressionRate.getItem().setChecked(true); 
116:	subCompressionRate.add(3,50,0,"50"); 
117:	subCompressionRate.add(3,60,0,"60"); 
118:	subCompressionRate.add(3,70,0,"70"); 
119:	subCompressionRate.add(3,80,0,"80").setChecked(true); 
120:	subCompressionRate.add(3,90,0,"90"); 
121:	subCompressionRate.add(3,100,0,"100"); 
122:	subCompressionRate.setGroupCheckable(3, true, true); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getItem
75:	this.onActionBarWithText(a.getItem()); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: add, findItem, setGroupCheckable, setGroupEnabled
218:	sync.add(groupNum, 0, 0, "On Application Startup"); 
219:	sync.add(groupNum, 30, 2, "30 Minutes"); 
220:	sync.add(groupNum, 60, 3, "Hourly"); 
221:	sync.add(groupNum, 60 * 2, 4, "2 Hours"); 
222:	sync.add(groupNum, 60 * 3, 5, "3 Hours"); 
223:	sync.add(groupNum, 60 * 4, 6, "4 Hours"); 
224:	sync.add(groupNum, 60 * 6, 7, "6 Hours"); 
225:	sync.add(groupNum, 60 * 8, 8, "8 Hours"); 
226:	sync.add(groupNum, 60 * 12, 9, "12 Hours"); 
227:	sync.add(groupNum, 60 * 24, 10, "Daily"); 
228:	sync.add(groupNum, 60 * 24 * 2, 11, "2 Days"); 
229:	sync.add(groupNum, 60 * 24 * 4, 12, "4 Days"); 
230:	sync.add(groupNum, 60 * 24 * 7, 13, "Weekly"); 
-
232:	sync.setGroupCheckable(groupNum, true, true); 
233:	sync.setGroupEnabled(groupNum, true); 
-
236:	activeitem = sync.findItem(syncInterval); 
-
239:	sync.add(groupNum, syncInterval, 1, syncInterval + " Minutes"); 
-
243:	activeitem = sync.findItem(syncInterval); 
Full Snippet Info
-4
CodeRank
Related Android SubMenu Questions & Answers:
See Code Examples for Android SubMenu Methods: