diff options
| author | Dianne Hackborn <hackbod@google.com> | 2012-04-13 15:36:06 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2012-04-13 15:36:06 -0700 |
| commit | acb69bb909d098cea284df47d794c17171d84c91 (patch) | |
| tree | 6544f56ec3d8a86de4223468c8eb975a8eb7eabd /core/java/android/widget/TextView.java | |
| parent | 7358fbfeb2febb60085067fcacc192f429b06545 (diff) | |
| download | frameworks_base-acb69bb909d098cea284df47d794c17171d84c91.zip frameworks_base-acb69bb909d098cea284df47d794c17171d84c91.tar.gz frameworks_base-acb69bb909d098cea284df47d794c17171d84c91.tar.bz2 | |
Add direct support for HTML formatted text in ClipData etc.
When using the clipboard, ACTION_SEND, etc., you can now supply
HTML formatted text as one of the representations. This is exposed
as a set of methods on ClipData for building items with HTML
formatted text, and retrieving and coercing to HTML (and styled)
text. In addtion, there is a new EXTRA_HTML_TEXT for interoperating
with the old ACTION_SEND protocol.
Change-Id: I8846520a480c8a5f829ec1e693aeebd425ac170d
Diffstat (limited to 'core/java/android/widget/TextView.java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 9867e47..3b0fb36 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7710,7 +7710,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (clip != null) { boolean didFirst = false; for (int i=0; i<clip.getItemCount(); i++) { - CharSequence paste = clip.getItemAt(i).coerceToText(getContext()); + CharSequence paste = clip.getItemAt(i).coerceToStyledText(getContext()); if (paste != null) { if (!didFirst) { long minMax = prepareSpacesAroundPaste(min, max, paste); |
