diff options
author | Tor Norbye <tnorbye@google.com> | 2015-02-18 19:23:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-02-18 19:24:01 +0000 |
commit | a42d2eaf2d6b3cb6072e99b4904b76c8cc263cf3 (patch) | |
tree | a8f93f9b6c9727807af4749b7a2bcad51e360efd /core/java/android/view/Menu.java | |
parent | fbf255125bbab3c8a2753a9001cc2cf373120a0f (diff) | |
parent | 7b9c912f536925ac6ec43935d6e97506851b33d6 (diff) | |
download | frameworks_base-a42d2eaf2d6b3cb6072e99b4904b76c8cc263cf3.zip frameworks_base-a42d2eaf2d6b3cb6072e99b4904b76c8cc263cf3.tar.gz frameworks_base-a42d2eaf2d6b3cb6072e99b4904b76c8cc263cf3.tar.bz2 |
Merge "Add @ResourceInt annotations on APIs"
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 |