{"action":"created","issue":{"url":"https://api.github.com/repos/tobykurien/Xtendroid/issues/70","labels_url":"https://api.github.com/repos/tobykurien/Xtendroid/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/tobykurien/Xtendroid/issues/70/comments","events_url":"https://api.github.com/repos/tobykurien/Xtendroid/issues/70/events","html_url":"https://github.com/tobykurien/Xtendroid/issues/70","id":58463484,"number":70,"title":"Feature idea @AndroidMenu: request for comments","user":{"login":"Buggaboo","id":45606,"avatar_url":"https://avatars.githubusercontent.com/u/45606?v=3","gravatar_id":"","url":"https://api.github.com/users/Buggaboo","html_url":"https://github.com/Buggaboo","followers_url":"https://api.github.com/users/Buggaboo/followers","following_url":"https://api.github.com/users/Buggaboo/following{/other_user}","gists_url":"https://api.github.com/users/Buggaboo/gists{/gist_id}","starred_url":"https://api.github.com/users/Buggaboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Buggaboo/subscriptions","organizations_url":"https://api.github.com/users/Buggaboo/orgs","repos_url":"https://api.github.com/users/Buggaboo/repos","events_url":"https://api.github.com/users/Buggaboo/events{/privacy}","received_events_url":"https://api.github.com/users/Buggaboo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-21T15:47:34Z","updated_at":"2015-02-23T13:00:58Z","closed_at":null,"body":"Looking over the code gave me a new idea for an annotation, @AndroidMenu\r\nif you slap `@AndroidMenu(R.menu.the_greatest_menu_ever)` on an Activity or Fragment, \r\nit generates the inflation stuff and generates your MenuItem accessors.\r\n\r\nOr... we can extend @AndroidActivity and @AndroidFragment to support this:\r\n\r\n```java\r\n@AndroidActivity(layout=R.layout.l, menu=R.menu.m)\r\nclass MyActivity...\r\n\r\n@AndroidFragment(layout=R.layout.l, menu=R.menu.m)\r\nclass MyFragment... // the fragment's onOptionsItemSelected must be passed to the activity's\r\n```\r\n\r\nIf you slap `@AndroidMenu(R.id.the_greatest_item)` on a method,\r\nthen this will injected in the switch in the inflation method.\r\n\r\nComments?"},"comment":{"url":"https://api.github.com/repos/tobykurien/Xtendroid/issues/comments/75536927","html_url":"https://github.com/tobykurien/Xtendroid/issues/70#issuecomment-75536927","issue_url":"https://api.github.com/repos/tobykurien/Xtendroid/issues/70","id":75536927,"user":{"login":"Buggaboo","id":45606,"avatar_url":"https://avatars.githubusercontent.com/u/45606?v=3","gravatar_id":"","url":"https://api.github.com/users/Buggaboo","html_url":"https://github.com/Buggaboo","followers_url":"https://api.github.com/users/Buggaboo/followers","following_url":"https://api.github.com/users/Buggaboo/following{/other_user}","gists_url":"https://api.github.com/users/Buggaboo/gists{/gist_id}","starred_url":"https://api.github.com/users/Buggaboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Buggaboo/subscriptions","organizations_url":"https://api.github.com/users/Buggaboo/orgs","repos_url":"https://api.github.com/users/Buggaboo/repos","events_url":"https://api.github.com/users/Buggaboo/events{/privacy}","received_events_url":"https://api.github.com/users/Buggaboo/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T13:00:58Z","updated_at":"2015-02-23T13:00:58Z","body":"Good point. :) I vote for minimalism."}}