TextInputLayout中的多行提示

时间:2018-03-29 09:49:22

标签: android android-layout android-textinputlayout

我有一个很长的文本,需要浮动编辑文本,如需求所示。我在这里经历了很多这样的问题,但是找不到合适的答案。我们怎样才能做到这一点?我尝试过使用' \ n'使用提示字符串,但它没有工作。

3 个答案:

答案 0 :(得分:0)

you can add \n without giving any space. example shown below

 <string name="hint_manish">Hint first line\nHint second line\nHint third line</string>

答案 1 :(得分:0)

提示采用与之相关的Edittext的行为。 新增中 android:inputType =“ text | textMultiLine” 将为您提供多行提示。

答案 2 :(得分:-1)

默认情况下,浮动标签不支持多行。这是我为我的项目创建的自定义多行文本输入布局的github link

相关问题