diff options
Diffstat (limited to 'core/java/android/view/Menu.java')
-rw-r--r-- | core/java/android/view/Menu.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/android/view/Menu.java b/core/java/android/view/Menu.java index 7157bc5..0c2e9cf 100644 --- a/core/java/android/view/Menu.java +++ b/core/java/android/view/Menu.java @@ -16,6 +16,7 @@ package android.view; +import android.annotation.StringRes; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; @@ -148,7 +149,7 @@ public interface Menu { * @param titleRes Resource identifier of title string. * @return The newly added menu item. */ - public MenuItem add(int titleRes); + public MenuItem add(@StringRes int titleRes); /** * Add a new item to the menu. This item displays the given title for its @@ -182,7 +183,7 @@ public interface Menu { * @param titleRes Resource identifier of title string. * @return The newly added menu item. */ - public MenuItem add(int groupId, int itemId, int order, int titleRes); + public MenuItem add(int groupId, int itemId, int order, @StringRes int titleRes); /** * Add a new sub-menu to the menu. This item displays the given title for @@ -202,7 +203,7 @@ public interface Menu { * @param titleRes Resource identifier of title string. * @return The newly added sub-menu */ - SubMenu addSubMenu(final int titleRes); + SubMenu addSubMenu(@StringRes final int titleRes); /** * Add a new sub-menu to the menu. This item displays the given @@ -239,7 +240,7 @@ public interface Menu { * @param titleRes Resource identifier of title string. * @return The newly added sub-menu */ - SubMenu addSubMenu(int groupId, int itemId, int order, int titleRes); + SubMenu addSubMenu(int groupId, int itemId, int order, @StringRes int titleRes); /** * Add a group of menu items corresponding to actions that can be performed |