From 7b9c912f536925ac6ec43935d6e97506851b33d6 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Thu, 30 May 2013 16:48:33 -0700 Subject: Add @ResourceInt annotations on APIs Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08 --- core/java/android/view/Menu.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/java/android/view/Menu.java') 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 -- cgit v1.1