Java tutorial
//package com.java2s; //License from project: Open Source License import android.support.annotation.NonNull; import android.text.Spannable; public class Main { @NonNull public static Spannable setSpans(@NonNull Spannable spanned, int start, int end, int flags, @NonNull Object... spans) { for (Object span : spans) { spanned.setSpan(span, start, end, flags); } return spanned; } }