Skip to content

kevinmlong/floatlabelededittext

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Float Labeled EditText

Simple implementation of a Float Labeled EditText: An Android view which uses a EditText and puts the hint on top of the EditText when it is populated with text.

iOS implementation by @jverdi: JVFloatLabeledTextField

Credits for the concept to Matt D. Smith (@mds).

Android Version

http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users

Usage

Add the library project or grab to build.gradle:

compile 'com.wrapp.floatlabelededittext:library:0.0.3'

or plain maven:

<dependency>
  <groupId>com.wrapp.floatlabelededittext</groupId>
  <artifactId>library</artifactId>
  <version>0.0.3</version>
  <type>aar</type>
</dependency>

and then insert the view in XML:

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:float="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.wrapp.floatlabelededittext.FloatLabeledEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        float:fletFloatingHint="Username"/>

    <com.wrapp.floatlabelededittext.FloatLabeledEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        float:fletFloatingHint="Password"
        float:fletInputType="textPassword"/>
</LinearLayout>

Developed By

Styled By

Additional Credit

Notes

It would be much better to extend EditText and implement this functionallity...

License

This project is licensed under the MIT License:

Copyright (c) 2012 Bohemian Wrappsody AB

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Floating hint from edit text - inspired by Matt D. Smith's design: http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published