Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.graphics.Color;

import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;

public class Main {
    public static CharSequence getError(String msg) {
        int color = Color.WHITE;
        ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(color);
        SpannableStringBuilder string = new SpannableStringBuilder(msg);
        string.setSpan(foregroundColorSpan, 0, msg.length(), 0);
        return string;
    }
}