Skip to content

Commit

Permalink
Allow positive/negative symbols and decimals in numeric dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullahM0hamed authored and Leonid Pliushch committed Sep 28, 2020
1 parent 4b45656 commit 9d1bc33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/termux/api/DialogActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ EditText createWidgetView(AppCompatActivity activity) {

if (numeric) {
flags &= ~InputType.TYPE_CLASS_TEXT; // clear to allow only numbers
flags |= InputType.TYPE_CLASS_NUMBER;
flags |= InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED | InputType.TYPE_NUMBER_FLAG_DECIMAL;
}

editText.setInputType(flags);
Expand Down

0 comments on commit 9d1bc33

Please sign in to comment.