diff options
author | kmccormick <kmccormick@google.com> | 2013-04-03 17:28:14 -0700 |
---|---|---|
committer | kmccormick <kmccormick@google.com> | 2013-04-03 17:43:44 -0700 |
commit | 43d5abbf0343a1761814ce1743e40a6688a72e4c (patch) | |
tree | 760c8905c2bc8b442c4d7b44ad45f7db09df99ca /core/java/android/widget/ShareActionProvider.java | |
parent | fa226b1de9119f7d22b877c584154176cefe8996 (diff) | |
download | frameworks_base-43d5abbf0343a1761814ce1743e40a6688a72e4c.zip frameworks_base-43d5abbf0343a1761814ce1743e40a6688a72e4c.tar.gz frameworks_base-43d5abbf0343a1761814ce1743e40a6688a72e4c.tar.bz2 |
Doc update: unterminated code tags
"Bug: 7250069"
Change-Id: I4c3eca8eacad6d0aced9f38788726ba95b914d5d
Diffstat (limited to 'core/java/android/widget/ShareActionProvider.java')
-rw-r--r-- | core/java/android/widget/ShareActionProvider.java | 64 |
1 files changed, 26 insertions, 38 deletions
diff --git a/core/java/android/widget/ShareActionProvider.java b/core/java/android/widget/ShareActionProvider.java index 4045497..62afd2e 100644 --- a/core/java/android/widget/ShareActionProvider.java +++ b/core/java/android/widget/ShareActionProvider.java @@ -39,31 +39,26 @@ import com.android.internal.R; * <p> * Here is how to use the action provider with custom backing file in a {@link MenuItem}: * </p> - * <p> * <pre> - * <code> - * // In Activity#onCreateOptionsMenu - * public boolean onCreateOptionsMenu(Menu menu) { - * // Get the menu item. - * MenuItem menuItem = menu.findItem(R.id.my_menu_item); - * // Get the provider and hold onto it to set/change the share intent. - * mShareActionProvider = (ShareActionProvider) menuItem.getActionProvider(); - * // Set history different from the default before getting the action - * // view since a call to {@link MenuItem#getActionView() MenuItem.getActionView()} calls - * // {@link ActionProvider#onCreateActionView()} which uses the backing file name. Omit this - * // line if using the default share history file is desired. - * mShareActionProvider.setShareHistoryFileName("custom_share_history.xml"); - * . . . - * } + * // In Activity#onCreateOptionsMenu + * public boolean onCreateOptionsMenu(Menu menu) { + * // Get the menu item. + * MenuItem menuItem = menu.findItem(R.id.my_menu_item); + * // Get the provider and hold onto it to set/change the share intent. + * mShareActionProvider = (ShareActionProvider) menuItem.getActionProvider(); + * // Set history different from the default before getting the action + * // view since a call to {@link MenuItem#getActionView() MenuItem.getActionView()} calls + * // {@link ActionProvider#onCreateActionView()} which uses the backing file name. Omit this + * // line if using the default share history file is desired. + * mShareActionProvider.setShareHistoryFileName("custom_share_history.xml"); + * . . . + * } * - * // Somewhere in the application. - * public void doShare(Intent shareIntent) { - * // When you want to share set the share intent. - * mShareActionProvider.setShareIntent(shareIntent); - * } - * </pre> - * </code> - * </p> + * // Somewhere in the application. + * public void doShare(Intent shareIntent) { + * // When you want to share set the share intent. + * mShareActionProvider.setShareIntent(shareIntent); + * }</pre> * <p> * <strong>Note:</strong> While the sample snippet demonstrates how to use this provider * in the context of a menu item, the use of the provider is not limited to menu items. @@ -245,9 +240,9 @@ public class ShareActionProvider extends ActionProvider { * call {@link android.app.Activity#invalidateOptionsMenu()} to recreate the * action view. You should <strong>not</strong> call * {@link android.app.Activity#invalidateOptionsMenu()} from - * {@link android.app.Activity#onCreateOptionsMenu(Menu)}." - * <p> - * <code> + * {@link android.app.Activity#onCreateOptionsMenu(Menu)}. + * </p> + * <pre> * private void doShare(Intent intent) { * if (IMAGE.equals(intent.getMimeType())) { * mShareActionProvider.setHistoryFileName(SHARE_IMAGE_HISTORY_FILE_NAME); @@ -256,9 +251,7 @@ public class ShareActionProvider extends ActionProvider { * } * mShareActionProvider.setIntent(intent); * invalidateOptionsMenu(); - * } - * <code> - * + * }</pre> * @param shareHistoryFile The share history file name. */ public void setShareHistoryFileName(String shareHistoryFile) { @@ -269,16 +262,11 @@ public class ShareActionProvider extends ActionProvider { /** * Sets an intent with information about the share action. Here is a * sample for constructing a share intent: - * <p> * <pre> - * <code> - * Intent shareIntent = new Intent(Intent.ACTION_SEND); - * shareIntent.setType("image/*"); - * Uri uri = Uri.fromFile(new File(getFilesDir(), "foo.jpg")); - * shareIntent.putExtra(Intent.EXTRA_STREAM, uri.toString()); - * </pre> - * </code> - * </p> + * Intent shareIntent = new Intent(Intent.ACTION_SEND); + * shareIntent.setType("image/*"); + * Uri uri = Uri.fromFile(new File(getFilesDir(), "foo.jpg")); + * shareIntent.putExtra(Intent.EXTRA_STREAM, uri.toString());</pre> * * @param shareIntent The share intent. * |