Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mindorksopensource/editdrawabletext
EditDrawableText - An EditText which makes your Drawable Clickable
https://github.com/mindorksopensource/editdrawabletext
android android-development android-library drawable edittext edittextview kotlin kotlin-android kotlin-language kotlin-library mindorks
Last synced: 4 days ago
JSON representation
EditDrawableText - An EditText which makes your Drawable Clickable
- Host: GitHub
- URL: https://github.com/mindorksopensource/editdrawabletext
- Owner: MindorksOpenSource
- License: apache-2.0
- Created: 2018-07-04T06:16:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-02T20:39:27.000Z (over 5 years ago)
- Last Synced: 2025-01-23T10:07:14.616Z (13 days ago)
- Topics: android, android-development, android-library, drawable, edittext, edittextview, kotlin, kotlin-android, kotlin-language, kotlin-library, mindorks
- Language: Kotlin
- Homepage: https://github.com/MindorksOpenSource/EditDrawableText
- Size: 665 KB
- Stars: 305
- Watchers: 13
- Forks: 30
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# EditDrawableText - An EditText which makes your Drawable Clickable
[![Mindorks](https://img.shields.io/badge/mindorks-opensource-blue.svg)](https://mindorks.com/open-source-projects)
[![Mindorks Community](https://img.shields.io/badge/join-community-blue.svg)](https://mindorks.com/join-community)
[![Mindorks Android Store](https://img.shields.io/badge/Mindorks%20Android%20Store-EditDrawableText-blue.svg?style=flat)](https://mindorks.com/android/store)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)## Preview of EditDrawableText
### Overview of EditDrawableText library
* EditDrawableText can be used to Show/Hide Password
* Left/Right Drawables can be clicked to make custom events like Request OTP etc.
* All type of EditText Properties are possible in EditDrawableText## Using EditDrawableText Library in your Android application
1. Add it in your root build.gradle at the end of repositories:
```groovy
repositories {
maven { url 'https://jitpack.io' }
}
```
2. Add this in your app's build.gradle```groovy
implementation 'com.github.MindorksOpenSource:EditDrawableText:2.0'
```
3. To use this in XML File, use```XML
```
4. Make the drawable clickable in Activity file,
```kotlin
drawableEditText.setDrawableClickListener(object : OnDrawableClickListener {
override fun onClick(target: DrawablePosition) {
when (target) {
DrawablePosition.RIGHT -> //YOUR_LOGIC
DrawablePosition.LEFT -> //YOUR_LOGIC
DrawablePosition.TOP -> //YOUR_LOGIC
DrawablePosition.BOTTOM -> //YOUR_LOGIC
}
}
})```
5. You can also add an option so that the drawable is hidden by default and only shows when there is some text available in EditDrawableText
```XML
```
or
```kotlin
drawableEditText.hasDrawable(/**YOUR VALUE**/)```
When the value is false, then the drawable is hidden by default and vice versa## If this library helps you in anyway, show your love :heart: by putting a :star: on this project :v:
[Check out Mindorks awesome open source projects here](https://mindorks.com/open-source-projects)
#### Contributor
[Himanshu Singh](https://github.com/hi-manshu)[Pranay Patel](https://github.com/pranaypatel512)
### License
```
Copyright (C) 2018 MINDORKS NEXTGEN PRIVATE LIMITEDLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```### Contributing to EditDrawableText
All pull requests are welcome, make sure to follow the [contribution guidelines](CONTRIBUTING.md) when you submit pull request.