Skip to content

一个带删除按钮的输入框,可以清除输入内容,采用组合控件的方式定制,不影响原生EditText方法 (tag: clear,EditText,delete,remove)

Notifications You must be signed in to change notification settings

tianminggh/ClearableEditText

 
 

Repository files navigation

ClearableEditText

A clearable EditText which can be easy to clear your input.

Getting started

Add the ClearableEditText dependency to your build.gradle.

dependencies {
   compile 'com.zterry.clearableedittext:ClearableEditText:1.0.2'
}

Screen Shot

Usage Xml

You should just put the EditText in the container of ClearableEditText. And That's all.

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:padding="16dp"
    android:layout_height="match_parent">

    <com.zterry.ClearableEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <EditText
            android:layout_width="match_parent"
            android:text="@string/hello_world"
            android:layout_height="match_parent" />
    </com.zterry.ClearableEditText>

</android.support.constraint.ConstraintLayout>

Developed by

Name: ZTerry Liu
E-mail: tata1989y@gmail.com
Subject: ClearableEditText

About

一个带删除按钮的输入框,可以清除输入内容,采用组合控件的方式定制,不影响原生EditText方法 (tag: clear,EditText,delete,remove)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%