Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个编辑文本,现在是单行高度。然后我继续输入字母,直到它改变一个新行。如何根据新行变化增加edittext高度?
edittext.getLayoutParams().height=28;
look up display metrics for using dp instead of px
also check if edittext has a setMinLines() method you can use. I have not checked.