https://developer.android.com/reference/android/support/design/widget/TextInputLayoutandroid
<android.support.design.widget.TextInputLayout android:id="@+id/input_4_dev_name" android:layout_width="420dp" android:layout_height="wrap_content" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:gravity="center_vertical" android:hint="@string/str_4_dev_name" android:theme="@style/TextInputLayoutStyleDIY" app:counterEnabled="true" app:counterMaxLength="30" app:counterOverflowTextAppearance="@style/overAppearance" app:errorTextAppearance="@style/errorAppearance" app:hintAnimationEnabled="true" app:hintTextAppearance="@style/hintAppearance"> <EditText android:id="@+id/et_4_dev_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="text" android:maxLines="1" android:textSize="@dimen/pad_text_size_30sp_L" /> </android.support.design.widget.TextInputLayout>
TextInputLayout用於包裝EditText用,構成MD設計風格的文本輸入套件app
包含動畫
- 字數統計與告警設計
-告警code
-標題欄動畫效果xml
如上均須要依賴修改style實施風格定製get