Float Label Edit Texts for Android

Overview

Floating Label Edit Text for Android

Float label for Android

For more info, see this blog post.

Salient features

  1. Simple and clean library (open up the source to see for yourself!)
  2. Ability to stretch EditText width to full/half screen
  3. Hides input for password fields too, but shows labels
  4. Customizable attributes for textSize, hint color (focused/unfocused)
  5. Custom Espresso test matcher for your testing needs!
  6. Maven repo (coming soon...)

Goals for this project

Having goals for a project, keep a quality check and help with learning. Since I intended this to be a community project, the goals are aligned, keeping that fact in mind. The goals for this project are as follows:

  1. Code should be ridiculously readable. Must read as fluently as pseudocode.
  2. Code must be tested
  3. Git commits should be clean and legible. Try to follow AngularJs commit types.
  4. Super DRY code! You cannot have two sets of lines repeating within the same file.

Gotchas

1. Overriding the onFocusChangeListener for the EditText

If you're setting an onFocusChange listener directly on the EditText, you might lose the color changes on the hint when changing focus. You probably want to add a TextChangeListener instead.

Contributors:

Credit:

  1. Matt D.Smith for coming up with the concept
  2. Wedding Party for being an amazing organization and encourgaing such indulgences

Developers

  1. Kaushik Gopal
  2. Reza - Gravity support
You might also like...
A library to show emoji in TextView, EditText (like WhatsApp) for Android
A library to show emoji in TextView, EditText (like WhatsApp) for Android

Discontinued This projected is discontinued. Please consider using other alternative, i.e EmojiCompat. Contact me if you want to continue working on a

Android experiment showing a sinking TextView
Android experiment showing a sinking TextView

Titanic is an Android experiment reproducing this effect.

:page_facing_up: Android Text Full Jusiftication / Wrapping / Justify / Hyphenate - V2.0
:page_facing_up: Android Text Full Jusiftication / Wrapping / Justify / Hyphenate - V2.0

LIBRARY IS NO LONGER MAINTAINED If you want to adopt + maintain this library, please drop me a message - [email protected] Android Full Justific

Gmail style MultiAutoCompleteTextView for Android
Gmail style MultiAutoCompleteTextView for Android

Version 3.0 The 3.0.1 version is now available! This should resolve a number of text handling issues and lay the groundwork for better support of mixe

Advanced Android TextView

Advanced Android TextView Companion app for my Advanced Android TextView talk, demostrating: Animated CompoundDrawable Text shadow Custom font Non-bre

[DISCONTINUED] Rrich text editor for android platform. 安卓富文本编辑器,暂停维护

icarus-android Maybe the best rich text editor on android platform. Base on Simditor Features Alignment (left/center/right) Bold Blockquote Code Horiz

Android Bubble View

BubbleTextView Custom arrow position Custom fillet radius Custom background color Can be placed anywhere Two default style Two default theme Snapshot

A Material Android password view that toggles password visibility via an eye icon.
A Material Android password view that toggles password visibility via an eye icon.

8/17/2016: As of about an hour ago, this library is deprecated! Support for password visibility is now included in the Design Support Library in TextI

RoundedLetterView like the one in Android 5.0 Contacts app
RoundedLetterView like the one in Android 5.0 Contacts app

RoundedLetterView RoundedLetterView like the one in Android 5.0 Contacts app Attributes to choose from: rlv_titleText - The text in the first row. rlv

Comments
  • Allow styling of EditText and TextView through xml

    Allow styling of EditText and TextView through xml

    It would be nice to be able to set a style for the embedded EditText (as well as TextView) in the xml.

    I would also suggest using FrameLayout instead of LinearLayout to have the Label in front of the EditText. The reason is styling the EditText background. Don't know if you had a reason (except the parent LinearLayout) to order them like that.

    opened by alopix 5
  • Change code formatting and fixed bug with the sample app

    Change code formatting and fixed bug with the sample app

    I've changed the code style to be a little more in-line with the Google AOSP code style guidelines. More specifcally, I've changed it so all lines are less than 100 characters as outlined here: https://source.android.com/source/code-style.html#limit-line-length

    I have also fixed an issue with the sample app where the centre gravity field had no hint defined within the XML.

    opened by davidjrichardson 2
  • Add Gravity support for floating label

    Add Gravity support for floating label

    Now you can use left, right, center gravity for floating label. When using RTL languages such as Persian, Arabic, Hebrew and etc. gravity option might be useful.

    screenshot_2014-02-24-13-24-37

    opened by moallemi 1
  • Setting dimension of containing EditText to match the parent's dimension.

    Setting dimension of containing EditText to match the parent's dimension.

    This pull request includes a few things:

    • Setting dimension of containing EditText to match the parent's dimension
      • This way the width is not limited to either half or full, the user can set any arbitrary width to the FloatLabelEditText view and the containing EditText's dimens will match that.
    • Support for maxLength
    opened by arriolac 0
Releases(v_1_2)
  • v_1_2(Apr 26, 2014)

    • Added an Espresso matcher, so you can quickly get hold of the EditText field when doing UI testing. An example of this would look like:

          onView(withFloatLabelHint("Email address")).perform(typeText("[email protected]"));
      
    • Added Gravity support (center and right align your hints!) . Many thanks to @moallemi for incorporating this.

    • Float labels can now have password hidden text

    Source code(tar.gz)
    Source code(zip)
Owner
null
Android Floating Label

FloatingLabel FloatingLabel Allows you to create a blow kind of EditText. To explain the concept well I have taken below image from http://dribbble.co

Hardik Trivedi 290 Nov 30, 2022
一个可配置的迷你版轻量级 Label 辅助类,支持多种配置效果。

AvatarLabelView 一个可配置的迷你版轻量级 Label 辅助类,支持多种配置效果,具体不同配置展示效果如下图。 说明文档 如下是关于 Label View 的相关使用方式、属性说明、拓展自定义的解释说明。 使用样例 <cn.label.avatarlabelview.LabelImag

yanbo 572 Nov 19, 2022
Android form edit text is an extension of EditText that brings data validation facilities to the edittext.

Android Form EditText Android form edit text is an extension of EditText that brings data validation facilities to the edittext. Example App I built a

Andrea 1.5k Dec 14, 2022
Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I develop easy to understand , modify and integrate Chips Edit Text widget for Android

Chips EditText Library Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I deve

kpbird 381 Nov 20, 2022
Android Custom View for prevent the view behind on-screen keyboard when edit text is focused

Group Focusable Prevent the view behind on-screen keyboard when edit text is focused in Android UI Download Gradle implementation 'com.akexorcist:grou

Akexorcist 8 Jun 22, 2022
An easy approach on how to create your country code picker for the edit text.

Country-Code-Picker Original Article on Dev.to Click below ?? App's Overview In this article, I am going to demonstrate how to create a simple country

Siddharth Singh 5 Mar 10, 2022
LocalizedEditText - Custom edit text that allow only one language

LocalizedEditText Custom edit text that allow only one language Supported languages : Arabic , English Default language : English Examples

Mostafa Gad 1 Nov 28, 2021
RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android.

RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android. Looking for iOS? Check out cjwirth/RichEditorView Supported Functions Bold

Daichi Furiya 6k Jan 2, 2023
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

Feras Alnatsheh 1k Dec 20, 2022
Android's TextView that can expand/collapse like the Google Play's app description

ExpandableTextView ExpandableTextView is an Android library that allows developers to easily create an TextView which can expand/collapse just like th

Manabu S. 4k Dec 28, 2022