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;

import android.text.style.AbsoluteSizeSpan;

public class Main {

    public static SpannableString formatTextSize(String txt, int size, int start, int end) {
        SpannableString spanString = new SpannableString(txt);
        AbsoluteSizeSpan span = new AbsoluteSizeSpan(size, true);
        spanString.setSpan(span, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
        return spanString;
    }
}