Coder Social home page Coder Social logo

actionNext doesn't work about edittext-mask HOT 7 CLOSED

egslava avatar egslava commented on July 19, 2024 2
actionNext doesn't work

from edittext-mask.

Comments (7)

esdeguzman avatar esdeguzman commented on July 19, 2024 8

For those having this issue, you can also override the setOnEditorListener, like so,

maskedBirthDate.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            @Override
            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
                return false;
            }
        });

This solved my problem without editing the library itself. Depends on your situation though. Cheers!

from edittext-mask.

heckslam avatar heckslam commented on July 19, 2024 2

@batistahermogenes
Open the MaskedEditText.class and uncomment this few lines in constructor
public MaskedEditText(Context context, AttributeSet attrs) { .... .... setOnEditorActionListener((v, actionId, event) -> { switch (actionId) { case EditorInfo.IME_ACTION_NEXT: // fixing actionNext return false; default: return true; } });

from edittext-mask.

egslava avatar egslava commented on July 19, 2024 2
mask:enable_ime_action="true"

With the next release this behavior is not default anyway, so there should no be any problem for you anymore. However on 8 of September 2019, it's not in the bintray (as a gradle dependency) yet, so you should clone the repo or to apply the advices above.

from edittext-mask.

dkonemann avatar dkonemann commented on July 19, 2024

Adding property
android:singleLine="true"
works for me.

from edittext-mask.

MatheusPimentel avatar MatheusPimentel commented on July 19, 2024

how can i edit the class MaskedEditText.class? I have the same problem and I need fix this.

from edittext-mask.

PawelDedio avatar PawelDedio commented on July 19, 2024

@MatheusPimentel You need to copy library files into your project. I know my answer is very late but maybe someone else will search this later.

from edittext-mask.

micaelomota avatar micaelomota commented on July 19, 2024

how can i edit the class MaskedEditText.class? I have the same problem and I need fix this.

I think it is not a good to edit this classes. You can extends it instead. I did it with kotlin:

class InputMask @JvmOverloads constructor(context: Context, attrs: AttributeSet?): MaskedEditText(context, attrs) {
    init {
        this.setOnEditorActionListener { v, actionId, event ->
            when (actionId) {
                EditorInfo.IME_ACTION_NEXT -> false
                else -> true
            }
        }
    }
}

Then in the view:

 <defensoria.ba.def.br.appdpe.scenes.main.general.inputMask.InputMask
                            android:id="@+id/inputBornDate"
                            android:imeOptions="actionNext"
                            android:inputType="date"
                            mask:mask="##/##/####"
                            mask:allowed_chars="1234567890"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"/>

from edittext-mask.

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.