Float Label Edit Text in android
Last few days, i search some new UI on Edittext. Finally i found it and its very awesome.
Float Label EditText
Meanwhile, some of jquery components only do this, but now android achieved it.
In android, such big form shows the hint text, but after text changed it will be disappear. Using TextView with EditText makes more screen space.
Float Label Edit Text solves your problem. It's Support from version 2.2. It's also the one of best pluses.
In XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:floatlabel="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.ind.floatlabeleditext.FloatLabelEditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionNext"
android:singleLine="true"
android:hint="User Name"
android:inputType="text"
android:textColorHint="#737373"
floatlabel:floatLabelColor="#852B99"/>
/>
</LinearLayout>
In Java:
FloatLabelEditText userName;
userName = (FloatLabelEditText)findViewById(R.id.username);
userName.setLabelAnimator(new CustomLabelAnimator());
You can download this source from Github
Float Label EditText
Meanwhile, some of jquery components only do this, but now android achieved it.
Float Label Edit Text solves your problem. It's Support from version 2.2. It's also the one of best pluses.
In XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:floatlabel="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.ind.floatlabeleditext.FloatLabelEditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionNext"
android:singleLine="true"
android:hint="User Name"
android:inputType="text"
android:textColorHint="#737373"
floatlabel:floatLabelColor="#852B99"/>
/>
</LinearLayout>
In Java:
FloatLabelEditText userName;
userName = (FloatLabelEditText)findViewById(R.id.username);
userName.setLabelAnimator(new CustomLabelAnimator());
You can download this source from Github
Comments