Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.SpannableString;
import android.text.Spanned;

public class Main {
    public static SpannableString getSpannableString(String str, int firstIndex, int endIndex, Object style) {
        SpannableString spannableString = new SpannableString(str);
        spannableString.setSpan(style, firstIndex, endIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

        return spannableString;
    }
}