首页 > 解决方案 > Android: Text Input Layout: How to change the height if the Edit Text Line

问题描述

There is a way to change the color of the Edit Text line in TextInputLayout:

 <item name="colorControlNormal">@color/White</item>
 <item name="colorControlActivated">@color/red</item>

But is there some way to change the height of the Edit Text line?

标签: androidandroid-edittextandroid-stylesandroid-textinputlayout

解决方案


不,您不能更改 edittext 行的高度,您可以像这样自定义 edittext 行

android:backgroud=@null

并且在edittext下获取一个视图,您可以提供颜色高度宽度等。

<View android:height="5dp"android:backgroud='#000000'/>

推荐阅读