Comments (7)
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.
@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.
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.
Adding property
android:singleLine="true"
works for me.
from edittext-mask.
how can i edit the class MaskedEditText.class? I have the same problem and I need fix this.
from edittext-mask.
@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.
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)
- Apply mask only on text
- Can I mask with (XXX) XXX-XXXX ext.XXX this format ? HOT 1
- keep hint HOT 1
- How to change CPF/CNPJ mask at runtime?
- Doesn't work with androidx? HOT 1
- Error when add 2 editText in one xml file HOT 4
- Не работает совместно с автозаполнением HOT 1
- Mask not work in fullscreen input(on phones in landscape orientation)/Маска не работает при полноэкранном вводе(на телефонах в landscape режиме))
- First char has black color HOT 1
- Is there way to set mask programmatically? HOT 1
- IP mask
- Need a version based on AndroidX HOT 1
- editText Mask
- Pushing the library artifacts to Maven Central HOT 2
- Can't work without AttributeSet: NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()'
- Travel HOT 8
- imeOption done is not closing keyboard
- Multi phone for all countries
- Make kotlin, please HOT 1
- Entered text color changed to transparent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edittext-mask.