mnd*_*rix 2 android android-edittext
我有一个大EditText盒子.我希望框中的提示看起来像这样(语法高亮不是意图):
Hint about the first line
Hint about the second line
Hint about the third line
Run Code Online (Sandbox Code Playgroud)
我试着用android:hint="@string/hints"在EditText在的strings.xml以下,但暗示还是在一行.
<string name="hints">
Hint about the first line
Hint about the second line
Hint about the third line
</string>
Run Code Online (Sandbox Code Playgroud)
怎样才能获得多线提示EditText?
Blr*_*rfl 11
您可以通过显式指定字符串中的换行符:
<string name="hint">Manny, Moe and Jack\nThey know what I\'m after.</string>
Run Code Online (Sandbox Code Playgroud)
XML中的换行符被视为空格.
| 归档时间: |
|
| 查看次数: |
6119 次 |
| 最近记录: |