When creating an EditText in the java portion of the application, how do you limit it to numbers like you would in the xml? For example:
new EditText(this);
Something like this perhaps ?
EditText text = new EditText(this); text.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL);