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 WORK_IDCARD = "0123456789X";

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