我已经使用app:hintEnabled="false"
删除了浮动标签。
但是随后field moves out用红色箭头标记。
如何解决?如何将视场高度更改为40dp?
这是xml:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintEnabled="false"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox">
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</android.support.design.widget.TextInputLayout>
答案 0 :(得分:0)
<!--From MDC library-->
<style name="Widget.MaterialComponents.TextInputEditText.FilledBox"
parent="Base.Widget.MaterialComponents.TextInputEditText">
<item name="android:paddingTop">28dp</item>
<item name="android:paddingBottom">12dp</item>
</style>
<!-- -->
<style name="TextInputEditTextFilledBoxWithoutLabel"
parent="Widget.MaterialComponents.TextInputEditText.FilledBox">
<item name="android:paddingTop">12dp</item>
</style>
<android.support.design.widget.TextInputLayout
...
style="@style/TextInputEditTextFilledBoxWithoutLabel"
/>