Skip to content

media365/material-edittext

 
 

Repository files navigation

Custom Material EditText

An EditText inspired by Material Text Fields and packed with useful functionalities

Dependency Add

Minimum required SDK 21

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
	implementation 'com.github.arifz-xyz:material-edittext:$current_version'
}

How to use

XML

<xyz.arifz.materialedittext.MaterialEditText
   android:id="@+id/met"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:layout_margin="16dp"
   app:hint="This is custom edittext"
   app:isHintFloating="true"
   app:isEnabled="true"
   app:isRequired="true"
   app:inputType="address"
   app:maxLines="3"
   app:layout_constraintBottom_toBottomOf="parent"
   app:layout_constraintEnd_toEndOf="parent"
   app:layout_constraintStart_toStartOf="parent"
   app:layout_constraintTop_toTopOf="parent" />
   

Attributes

  • isRequired, takes boolean value. Shows required asterisk symble.
  • isEnabled, takes boolean value. Enable or Disable user input.
  • hint, hint text. also acts as lebel if isHintFloating=true.
  • isHintFloating, makes hint text as floating lebel like MaterialEditText Label. Default value "true".
  • maxLines, takes int value. Enables multiline input.
  • radius, box stroke radious of input field.
  • isReadOnly, disables input and behaves like a textfield.
  • inputType, available enums are - digit, digit_fractional, name, address, email, phone and password.

Thanks

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Kotlin 100.0%