Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.method.DigitsKeyListener;

import android.widget.EditText;

public class Main {
    private static final String WORD_AND_NUM = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";

    public static void setDigitsWordAndNum(EditText et) {
        if (et != null) {
            et.setKeyListener(DigitsKeyListener.getInstance(WORD_AND_NUM));
        }
    }
}