Set type face for an EditText view - Android User Interface

Android examples for User Interface:EditText

Description

Set type face for an EditText view

Demo Code


//package com.java2s;
import android.graphics.Typeface;
import android.text.method.PasswordTransformationMethod;
import android.widget.EditText;

public class Main {
    /**//from   w  w w  .  j  a v  a2 s  .  c  om
     * Set type face for an EditText view 
     * @param editText      The EditText view to be set
     */
    public static void setInputTypeFace(EditText editText) {
        editText.setTypeface(Typeface.DEFAULT);
        editText.setTransformationMethod(new PasswordTransformationMethod());
    }
}

Related Tutorials