Loading Menus through XML files in Android

Android has possibility to load menus through xml files. I found this approach very useful. I really like that I don’t need to worry about uniqueness menu item ID’s because Android generates all menu ID’s as other project IDs. In this post I want to show how you can use it in your work. Continue reading Loading Menus through XML files in Android

  • Share/Bookmark

Using Context Menus in Android

Context menu in Android is similar to context menu in any others OS.

In Microsoft Windows or in any Linux distr you click right mouse key and see context menu. The same is in Android, but you press and hold your view which has context menu. Continue reading Using Context Menus in Android

  • Share/Bookmark

Adding alphabetical shortcut to the menu item in Android

There is a way to add alphabetical shortcut to your menu item.
I am going to show how it can be done. Continue reading Adding alphabetical shortcut to the menu item in Android

  • Share/Bookmark

Adding icon to the menu item in Android

There is a good practice to add icons to the menu items.
I am going to show code snippet which add icon to the menu item: Continue reading Adding icon to the menu item in Android

  • Share/Bookmark

Using Submenu in Android

Submenu is a another way to group your menu items.
I am going to show how to create, add items and handle item selections. Continue reading Using Submenu in Android

  • Share/Bookmark

Operations with Options Menu items group in Android

Sometimes need to group your Options menu items.
Group is very useful when you need to work (remove, disable or hide) with several menu items.
I am going to show example about how to remove, disable/enable and hide/show group of menu items. Continue reading Operations with Options Menu items group in Android
  • Share/Bookmark

Handling Options Menu item selections in Android

I showed previously how to create an Options menu and how to add Menu item to it.

Now I am going to show how to handle options menu item selection.
I will show code snippet and after whole example. Continue reading Handling Options Menu item selections in Android

  • Share/Bookmark

Creating Options Menu and adding menu items to the Options Menu in Android

From this post I am going to start series posts about Menu. Menu is very important. I will try to show all actions with menus in next posts.

Maybe it will be better to write one big article, but there are 2 problems from my side.

  1. Now I have no free time. All team works hard because we want to publish our updated applications in earlier November
  2. I like short but useful examples in manner how to Continue reading Creating Options Menu and adding menu items to the Options Menu in Android
  • Share/Bookmark

Dynamically change Options Menu Items in Android

Sometimes need to change, add, delete options menu items dynamically after some event or after some situation in application flow.
We all know onCreateOptionsMenu method which helps to create options menu for activity. But in this situation it doesn’t help.
For this situation I use public boolean onPrepareOptionsMenu(Menu menu). Continue reading Dynamically change Options Menu Items in Android

  • Share/Bookmark