Skip to content

Commit dd25452

Browse files
authored
Update Readme.md
1 parent 22890b7 commit dd25452

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<p align="center">
2+
<img alt="EditDrawableText" src="https://github.com/MindorksOpenSource/EditDrawableText/blob/master/app/src/main/assets/EditDrawableText.png?raw=true" />
3+
</p>
4+
5+
# EditDrawableText - An EditText which makes your Drawable Clickable
6+
[![Mindorks](https://img.shields.io/badge/mindorks-opensource-blue.svg)](https://mindorks.com/open-source-projects)
7+
[![Mindorks Community](https://img.shields.io/badge/join-community-blue.svg)](https://mindorks.com/join-community)
8+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
9+
10+
## Preview of EditDrawableText
11+
<img src="https://github.com/MindorksOpenSource/EditDrawableText/blob/master/app/src/main/assets/sample1.jpg?raw=true" height="300em" />&nbsp;<img src="https://github.com/MindorksOpenSource/EditDrawableText/blob/master/app/src/main/assets/sample2.jpg?raw=true" height="300em" />
12+
13+
## Using EditDrawableText Library in your Android application
14+
15+
1. Add it in your root build.gradle at the end of repositories:
16+
17+
```groovy
18+
repositories {
19+
maven { url 'https://jitpack.io' }
20+
}
21+
```
22+
2. Add this in your app's build.gradle
23+
24+
```groovy
25+
implementation 'com.github.MindorksOpenSource:EditDrawableText:1.1.0'
26+
```
27+
3. To use this in XML File, use
28+
29+
```XML
30+
<com.mindorks.editdrawabletext.EditDrawableText
31+
android:id="@+id/drawable_editText_left"
32+
android:layout_width="match_parent"
33+
android:layout_height="wrap_content"
34+
android:drawableLeft="@drawable/ic_remove_red_eye_black_24dp"
35+
android:hint="Click the Drawables"
36+
android:inputType="text"
37+
android:textAlignment="center"
38+
/>
39+
```
40+
4. Make the drawable clickable in Activity file,
41+
```kotlin
42+
drawable_editText.setDrawableClickListener(object : onDrawableClickListener {
43+
override fun onClick(target: DrawablePosition) {
44+
when (target) {
45+
DrawablePosition.RIGHT -> //YOUR_LOGIC
46+
DrawablePosition.LEFT -> //YOUR_LOGIC
47+
}
48+
}
49+
})
50+
51+
```
52+
### TODO
53+
* Making the TOP,BOTTOM drawables clickable
54+
* More features related to EditText
55+
56+
## If this library helps you in anyway, show your love :heart: by putting a :star: on this project :v:
57+
58+
[Check out Mindorks awesome open source projects here](https://mindorks.com/open-source-projects)
59+
60+
### License
61+
```
62+
Copyright (C) 2018 MINDORKS NEXTGEN PRIVATE LIMITED
63+
64+
Licensed under the Apache License, Version 2.0 (the "License");
65+
you may not use this file except in compliance with the License.
66+
You may obtain a copy of the License at
67+
68+
http://www.apache.org/licenses/LICENSE-2.0
69+
70+
Unless required by applicable law or agreed to in writing, software
71+
distributed under the License is distributed on an "AS IS" BASIS,
72+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
73+
See the License for the specific language governing permissions and
74+
limitations under the License.
75+
```
76+
77+
### Contributing to EditDrawableText
78+
All pull requests are welcome, make sure to follow the [contribution guidelines](CONTRIBUTING.md) when you submit pull request.

0 commit comments

Comments
 (0)