如何在活动中使用滚动视图创建多行编辑文本? [英] How to create multiline edittext with scroll view within activity?
本文介绍了如何在活动中使用滚动视图创建多行编辑文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要 3 行的 edittext,如果 edittext 内容超过 3 行限制,则用户应该可以看到垂直滚动条.
I want edittext which will have 3 lines and if the edittext content exceeds 3 lines limit then vertical scrollbar should be visible to user.
推荐答案
可能 100%
<EditText
android:inputType="textMultiLine"
android:lines="int number" <!-- Total Lines prior display -->
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:scrollbars="vertical"/>
这篇关于如何在活动中使用滚动视图创建多行编辑文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文