Comments (5)
Hi @boomsya , thanks for using AwesomeValidation and your valuable feedback.
Please correct me if I get it wrong:
I assume that you are using ViewPager, and I think you want to dismiss the sticky tooltip when scrolling to the other page. Then could you try to call mAwesomeValidation.clear();
when ViewPager.onScrollChanged
?
Because to me, each developer's implementation differs, I can't guess beforehand what listener I should register the clear method to.
from awesomevalidation.
sorry for not good English :)
yes, you right
can tooltip slide(move) with TextEdit synchronous over screen?
but your answer really help me too
from awesomevalidation.
No problem :)
Now I completely understand the problem: the tooltip doesn't move along with the screen.
Hmmm, I'm afraid that we could do nothing about it. Since the tooltip is from Android's code: EditText.setError(CharSequence error)
. You can check this line here.
So I guess you'd better clear the validation onScrollChanged. But please be careful, only clear when you're sure the 2nd page is ready, not when user by accident move several pixels left or right.
Thanks and good luck :)
from awesomevalidation.
thanks for helping to me
can i ask just one question?
i have EditText fields and when user clear (for example) seond field - i have event:
yourage_input.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s) {
mAwesomeValidation.validate(); <<<<-----------------
}
public void beforeTextChanged(CharSequence s, int start, int count, int after){}
public void onTextChanged(CharSequence s, int start, int before, int count){}
});
but user can delete text in first field, and go to second and delete text in second
and after that his enter valid number in first field and mAwesomeValidation.validate() return to me FALSE because second field empty (i added validator RegexTemplate.NOT_EMPTY)
can i check validation for concrete field? (when user fill first field valid - i should need set seekbar value from field)
i have fouded function "checkFields" but they check all ArrayList
at now i will do that:
private AwesomeValidation field1validator;
private AwesomeValidation field2validator;
private AwesomeValidation field3validator;
for split validating to peaces
from awesomevalidation.
Sorry that I just got time to read your comments.
To answer your question:
- I didn't think about validating fields one by one, that's why the _checkFields_ method you found iterates all.
- The reason I did it this way is because I believe that validating all fields at once is the most common use case. But you're right, sometimes we just want to trigger validation of one single field on its input change.
- For the time being (based on current implementation), I think you did it right: instantiating one AwesomeValidation object per field, and validate them isolatedly.
Have fun playing with it :)
from awesomevalidation.
Related Issues (20)
- Unresolved reference: setTextInputLayoutErrorTextAppearance HOT 2
- Add simple custom validation function HOT 1
- Single validation removal HOT 1
- Error: Program type already present: com.google.thirdparty.publicsuffix.PublicSuffixPatterns HOT 1
- custom dialog box HOT 1
- Individual Validation On Losing Focus HOT 2
- Migrate to Kotlin HOT 8
- Duplicate Underlabels When Validating Twice HOT 2
- validate() always return true in DialogFragment HOT 5
- Debugging is not working in Andorid studio with use of Awesome validation in debug builds HOT 3
- Library is not building when i have viewpager2 in my project HOT 1
- Clear() function don't clear the added validation or remove validation. HOT 3
- Validation always returns true in FragmentActivity HOT 1
- Release to maven central HOT 3
- Help creating Regex for custom use cases HOT 1
- Email validation issue HOT 3
- The listener for all validation results HOT 1
- Doesn't AwesomeValidation works on DialogFragments?
- TextInputEditText crash HOT 1
- Alert Dialog
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 awesomevalidation.