An EditText which makes your Drawable Clickable
EditDrawableText
An EditText which makes your Drawable Clickable.
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
- Add it in your root build.gradle at the end of repositories:
repositories {
maven { url 'https://jitpack.io' }
}
- Add this in your app's build.gradle
implementation 'com.github.MindorksOpenSource:EditDrawableText:1.1.0'
- To use this in XML File, use
<com.mindorks.editdrawabletext.EditDrawableText
android:id="@+id/drawable_editText_left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_remove_red_eye_black_24dp"
android:hint="Click the Drawables"
android:inputType="text"
android:textAlignment="center"
/>
- Make the drawable clickable in Activity file,
drawable_editText.setDrawableClickListener(object : onDrawableClickListener {
override fun onClick(target: DrawablePosition) {
when (target) {
DrawablePosition.RIGHT -> //YOUR_LOGIC
DrawablePosition.LEFT -> //YOUR_LOGIC
}
}
})
TODO
- Making the TOP,BOTTOM drawables clickable
- More features related to EditText