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);
set like
<EditText
android:id="@+id/h1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"/>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…