https://github.com/utsavdotpro/materialedittextlibrary
Advance EditText with features like required data validation. Built with Material.io components
https://github.com/utsavdotpro/materialedittextlibrary
android android-library edittext java material-ui
Last synced: about 2 months ago
JSON representation
Advance EditText with features like required data validation. Built with Material.io components
- Host: GitHub
- URL: https://github.com/utsavdotpro/materialedittextlibrary
- Owner: utsavdotpro
- Created: 2021-03-02T20:43:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-03T16:58:27.000Z (almost 5 years ago)
- Last Synced: 2025-03-28T23:46:09.486Z (about 1 year ago)
- Topics: android, android-library, edittext, java, material-ui
- Language: Java
- Homepage:
- Size: 161 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://jitpack.io/#u-barnwal/MaterialEditTextLibrary)
# MaterialEditText
Advance EditText with features like required data validation. Built with Material.io components
## Implementation
**Step 1:** Add to project level build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
**Step 2:** Add to app level build.gradle
dependencies {
implementation 'com.github.u-barnwal:MaterialEditTextLibrary:VERSION'
}
## How to use
**Create view**
**All the attributes can also be set using their Setter functions**
**Validating EditTexts**
You need to make to set `required` to true for the fields that you want to validate.
MaterialEditText metEmail = findViewById(R.id.metEmail);
MaterialEditText.validateEditTexts(metEmail); // you can pass any no. of MaterialEditTexts here
**Validating with OnError callback**
MaterialEditText metEmail = findViewById(R.id.metEmail);
MaterialEditText.validateEditTexts(met -> {
Toast.makeText(this, "Some required fields are empty", Toast.LENGTH_LONG).show();
}, metEmail); // you can pass any no. of MaterialEditTexts here
See [sample app]("./app/src/main")
## Features
- No need to enable/disabled errors separately
- Hassle free error handling
- Validate fields in bulk
- Define everything right from XML
- Lesser lines of code
- Pre-optimized
- Easy to use
- Lightweight