In many applications you can access preferences, settings and what not via the Android Menu.
I want to be able to link to an activity in the App that I created.
Any help and/or code would be much appreciated.
-EltMrx
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to override onOptionsItemSelected method in your Activity, which is called when user clicks on the item in Options menu. In the method you can check what item has been clicked.
There is also onContextItemSelected method which works similary, but for Context menu (I’m not sure, what menu you mean).
More information at
http://developer.android.com/guide/topics/ui/menus.html
Class Intent – Action and Category constants http://developer.android.com/reference/android/content/Intent.html
Action element
http://developer.android.com/guide/topics/manifest/action-element.html
Intents and Intent Filters
http://developer.android.com/guide/topics/intents/intents-filters.html
Hope this solve your problem.
CREDITS TO ICEMAN, How to call Activity from a menu item in Android?