Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db13e879 authored by Gilles Debunne's avatar Gilles Debunne Committed by Android (Google) Code Review
Browse files

Merge "Fleshed up SuggestionSpan documentation. Bug 4553472"

parents c7a8be7f 4dacef25
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -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;