show EditText with HTML text - Android User Interface

Android examples for User Interface:EditText

Description

show EditText with HTML text

Demo Code


//package com.java2s;

import android.text.Html;

import android.widget.EditText;

public class Main {

    public static void showEditError(EditText v, String msg) {
        v.requestFocus();//from   ww  w .jav a  2 s . c o  m
        v.setError(Html.fromHtml("<font color=#B2001F>" + msg + "</font>"));
    }
}

Related Tutorials