[英]Android TextInputLayout remove extra space below edittext
I'm using TextInputLayout.FilledBox.Dense
as style for my TextInputLayout
and then I disable the hint by adding hintEnabled=false
but then It adds extra line at the bottom of EditText
我使用
TextInputLayout.FilledBox.Dense
作为我的TextInputLayout
样式,然后我通过添加hintEnabled=false
禁用了提示,但它在EditText
的底部添加了额外的行
Code snippet代码片段
<android.support.design.widget.TextInputLayout
android:id="@+id/name_text_input"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintAnimationEnabled="false"
app:hintEnabled="false">
<EditText
android:id="@+id/login_tab_userid3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionNext"
android:inputType="textPersonName" />
</android.support.design.widget.TextInputLayout>
Screenshot截屏
You can remove the line below the your EditText
from this android:background="@null"
and then creating the View
below your EditText
for creating the line below the EditText
您可以从此
android:background="@null"
删除EditText
下方的行,然后在EditText
下方创建View
以创建EditText
下方的行
<EditText
android:layout_width="match_parent"
android:background="@null"
android:layout_height="wrap_content" />
<View
android:layout_width="match_parent"
android:background="@android:color/white"
android:layout_height="0.5dp"/>
In your editText在您的编辑文本中
Put this line : android:background="@null"
把这一行:
android:background="@null"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.