• Stars
    star
    302
  • Rank 138,030 (Top 3 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

EditDrawableText - An EditText which makes your Drawable Clickable

EditDrawableText

EditDrawableText - An EditText which makes your Drawable Clickable

Mindorks Mindorks Community Mindorks Android Store License

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:
    repositories {
      maven { url 'https://jitpack.io' }
    }
  1. Add this in your app's build.gradle
	 implementation 'com.github.MindorksOpenSource:EditDrawableText:2.0'
  1. To use this in XML File, use
  <com.mindorks.editdrawabletext.EditDrawableText
        android:id="@+id/drawableEditTextLeft"
        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"
        />
  1. Make the drawable clickable in Activity file,
  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
                }
            }      
    })
  1. 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
  <com.mindorks.editdrawabletext.EditDrawableText
           ....
           app:isDrawableShownWhenTextIsEmpty="false"
        />

or

  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 ❀️ by putting a ⭐ on this project ✌️

Check out Mindorks awesome open source projects here

Contributor

Himanshu Singh

Pranay Patel

License

   Copyright (C) 2018 MINDORKS NEXTGEN PRIVATE LIMITED

   Licensed 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 at

       http://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 when you submit pull request.

More Repositories

1

Kotlin-Flow-Android-Examples

Kotlin
899
star
2

Jetpack-Compose-WhatsApp-Clone

An example project to demonstrate how to build WhatsApp using Jetpack Compose.
Kotlin
615
star
3

Dagger-Hilt-Tutorial

An example project to demonstrate how to use the Dagger-Hilt in Android.
Kotlin
489
star
4

Jetpack-Compose-Android-Examples

Learn Jetpack Compose for Android by Examples. Learn how to use Jetpack Compose for Android App Development. Android’s modern toolkit for building native UI.
Kotlin
467
star
5

CrashReporter

CrashReporter is a handy tool to capture app crashes and save them in a file.
Java
402
star
6

Retrofit-Kotlin-Coroutines-Example

An example project to demonstrate how to use Retrofit with Kotlin Coroutines in Android
Kotlin
279
star
7

MVI-Architecture-Android-Beginners

This repository contains a beginner sample app that implements MVI architecture
Kotlin
228
star
8

Uber-Car-Animation-Android

An example project to demonstrate how to Add Uber Like Car Animation in Android App
Kotlin
215
star
9

RadialProgressBar

Radial ProgressBar inspired by Apple Watch OS. It is highly Customisable
Kotlin
164
star
10

Paging3-Android-Tutorial

An example project to demonstrate how to use the Paging-3 in Android.
Kotlin
144
star
11

Koin-Tutorial

Koin - step by step tutorial
Kotlin
115
star
12

Open-PDF-File-Android-Example

An example project to demonstrate how to open a PDF file in Android programmatically
Kotlin
69
star
13

screenshot

This library helps to take screenshot dynamically
Kotlin
67
star
14

ConcatAdapter-Android-Example

In this project, we have demonstrated how to use Concat Adapter in Android
Kotlin
61
star
15

gogeom

This is a Geometrical library for Go Language. Which includes multiple Geometrical calculations like Circle, Lines etc in different forms
Go
56
star
16

Dagger-Multi-Module-Android

Learn to use dagger for dependency management in a multi-module app
Kotlin
53
star
17

Fused-Location-API-Example

An example project to demonstrate how to use Fused Location API to fetch the current location in Android
Kotlin
47
star
18

ViewColorGenerator

A library to generate color palette for view, imageview and image from URL.
Kotlin
30
star
19

android-architecture-jetpack-components

Android Architecture Using Jetpack Components: Sample App
Kotlin
29
star
20

WAProfileImage

WAProfileImage - A library for Android for choosing and editing profile image like WhatsApp
Kotlin
29
star
21

Dagger-Dynamic-Feature-Module

Project for using dagger in dynamic feature module
Kotlin
23
star
22

Easy-Share-Android

Easy Share - A library for sharing in Android
Java
19
star
23

Go-Log

A Go logger package which provides utility on top of Go's normal Log package.
Go
19
star