diff options
| author | 2011-07-08 16:02:36 -0700 | |
|---|---|---|
| committer | 2011-07-08 16:02:36 -0700 | |
| commit | db13e879830cb7f8305421fffa808a4ce2cb14b7 (patch) | |
| tree | f3fb90146d8d9632279fd9dbc9afda46707ec15a | |
| parent | c7a8be7fc4baa8eb70e49e3894c284ef8aa36612 (diff) | |
| parent | 4dacef25662de37825fa7a67fd6bdb318b31d8d9 (diff) | |
Merge "Fleshed up SuggestionSpan documentation. Bug 4553472"
| -rw-r--r-- | core/java/android/text/style/SuggestionSpan.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/core/java/android/text/style/SuggestionSpan.java b/core/java/android/text/style/SuggestionSpan.java index 240ad9bdebd3..555aac5de6bf 100644 --- a/core/java/android/text/style/SuggestionSpan.java +++ b/core/java/android/text/style/SuggestionSpan.java @@ -22,12 +22,22 @@ import android.os.Parcelable; import android.os.SystemClock; import android.text.ParcelableSpan; import android.text.TextUtils; +import android.widget.TextView; import java.util.Arrays; import java.util.Locale; /** - * Holds suggestion candidates of words under this span. + * Holds suggestion candidates for the text enclosed in this span. + * + * When such a span is edited in an EditText, double tapping on the text enclosed in this span will + * display a popup dialog listing suggestion replacement for that text. The user can then replace + * the original text by one of the suggestions. + * + * These spans should typically be created by the input method to privide correction and alternates + * for the text. + * + * @see TextView#setSuggestionsEnabled(boolean) */ public class SuggestionSpan implements ParcelableSpan { /** @@ -115,14 +125,14 @@ public class SuggestionSpan implements ParcelableSpan { } /** - * @return suggestions + * @return an array of suggestion texts for this span */ public String[] getSuggestions() { return mSuggestions; } /** - * @return locale of suggestions + * @return the locale of the suggestions */ public String getLocale() { return mLocaleString; |