Code Monkey home page Code Monkey logo

Comments (5)

taflanidi avatar taflanidi commented on June 2, 2024

Hey @BenazirSh

You've got to follow the bug report format when creating an issue; otherwise I'm going to close this by EOD.

from input-mask-android.

BenazirSh avatar BenazirSh commented on June 2, 2024
  • [X]

Describe the bug

The application crashes when I delete the characters set in mask

Steps to reproduce the behaviour:

  1. set mask as +998 [00] [000]-[00]-[00]
  2. Fill in the editText
  3. Delete the input including 998 and then type and number

Expected behaviour
The number being typed should have appeared

Actual behaviour
The application has crashed

Screenshots
The screenshot from LogCat is attached above

Platform information

  • OS version: Android 11
  • Library version: 6.0
  • Device (if bug is device-specific): Samsung SM A-41

from input-mask-android.

taflanidi avatar taflanidi commented on June 2, 2024

Library version: 6.0

Let me know if version 6.1 works for you; it has this specific bug fixed.

Also, please take a look at this section of our main README, the suggestion is to add the digits property to your text field:

Still, you may use a workaround by putting the android:digits value beside your android:inputType; there, you should specify all the acceptable symbols:

<EditText
    android:inputType="number"
    android:digits="0123456789 -."
    ... />

Alternatively, if you are using a programmatic approach without XML files, you may consider configuring a KeyListener like this:

editText.setInputType(InputType.TYPE_CLASS_NUMBER);
editText.setKeyListener(DigitsKeyListener.getInstance("0123456789 -.")); // modify character set for your case, e.g. add "+()"

from input-mask-android.

BenazirSh avatar BenazirSh commented on June 2, 2024

Thanks for the reply. For some reason, after upgrading the version to 6.1 , the library does not work for me...

from input-mask-android.

BenazirSh avatar BenazirSh commented on June 2, 2024

Also, I noticed one behavior. Since my mask contains pre-defined numbers, 998, that is +998 [00] [000]-[00]-[00] .When I type 9 or 8 after deleting characters, it does not get displayed at once, I should press it twice. I think it has to do with my mask containing 9 and 8, because when I set my mask to +76 [00] [000]-[00]-[00], I noticed the same behaviour but with numbers 7 and 6

from input-mask-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.