界面显示:edittext不弹出软键盘
mInputCode.setInputType(InputType.TYPE_NULL);
点击Edittext弹出软键盘(只能输入数字)
mInputCode.setInputType(InputType.TYPE_CLASS_NUMBER);
public ScanPayDialog(final Context context) {
// TODO Auto-generated constructor stub
super(context);
fullScreenImmersive(getWindow().getDecorView());
this.context = context;
setContentView(R.layout.scancode_dialog);
mInputCode = (EditText) findViewById(R.id.input_code);
// mInputCode.setShowSoftInputOnFocus(false);
mInputCode.setInputType(InputType.TYPE_NULL);
mInputCode.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(final View v, final MotionEvent event) {
mInputCode.setInputType(InputType.TYPE_CLASS_NUMBER);
return false;
}
});
}