Set a span over the entire spannable. - Android Graphics

Android examples for Graphics:Spannable

Description

Set a span over the entire spannable.

Demo Code


import android.text.Spannable;
import android.text.Spanned;

public class Main{
    /**//from   www  . j  a v  a2 s. co  m
     * Set a span over the entire spannable.
     * @param spannable
     * @param what
     */
    public static void setWholeSpan(Spannable spannable, Object what) {
        spannable.setSpan(what, 0, spannable.length(),
                Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
    }
}

Related Tutorials