Skip to content

Commit c6af753

Browse files
committed
Feat. Added Option to hide drawable when text is empty
1 parent c4ef0e8 commit c6af753

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,17 @@
5959
})
6060

6161
```
62-
### TODO
63-
* More features related to EditText
62+
63+
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
64+
```XML
65+
<com.mindorks.editdrawabletext.EditDrawableText
66+
....
67+
app:isDrawableShownWhenTextIsEmpty="false"
68+
69+
/>
70+
```
71+
When the value is false, then the drawable is hidden by default and vice versa
72+
6473

6574
## If this library helps you in anyway, show your love :heart: by putting a :star: on this project :v:
6675

editdrawabletext/src/main/java/com/mindorks/editdrawabletext/EditDrawableText.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class EditDrawableText(context: Context, attrs: AttributeSet) : EditText(context
3232
)
3333
}
3434

35-
3635
private fun parseAttributes(obtainStyledAttributes: TypedArray) {
3736
isDrawableShownWhenTextIsEmpty = obtainStyledAttributes.getBoolean(R.styleable.EditDrawableText_isDrawableShownWhenTextIsEmpty, isDrawableShownWhenTextIsEmpty);
3837
obtainStyledAttributes.recycle()

0 commit comments

Comments
 (0)