在Android版面xaml中的TextInputEditText
内使用TextInputLayout
,可以创建Matrial风格的文字输入字段,并且可以快速启动'提示文本在您开始输入时会移开。如何使提示显示在输入文本的上方,而不是默认情况下?
编辑:你要了照片......
答案 0 :(得分:1)
您可以通过在TextInputEditText
上添加顶部填充来实现此目的。例如:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="15dp" />
</android.support.design.widget.TextInputLayout>