1. 程式人生 > >android 簡單的Edittext特效,懸浮標籤

android 簡單的Edittext特效,懸浮標籤

原文:點選訪問

效果圖:
這裡寫圖片描述

使用:

依賴:

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

使用方法很簡單,把需要懸浮提示的Edittext控制元件外面包裹一個該控制元件就行,列子:

<com.wrapp.floatlabelededittext.FloatLabeledEditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <EditText
        android:layout_width="match_parent"
android:layout_height="wrap_content" android:hint="UserName" /> </com.wrapp.floatlabelededittext.FloatLabeledEditText>