1
0
mirror of https://github.com/danog/termux-api.git synced 2024-12-02 09:17:50 +01:00

Allow positive/negative symbols and decimals in numeric dialog

This commit is contained in:
AbdullahM0hamed 2020-09-28 01:05:29 +01:00 committed by Leonid Pliushch
parent 4b456561c5
commit 9d1bc33e1e

View File

@ -523,7 +523,7 @@ public class DialogActivity extends AppCompatActivity {
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);