更新时间:2021-08-12 06:48:12
比嗅探键简单多了:尝试设置的android:单线=真正的
和的android:imeOptions =actionNext
(至少为单行条目,textviews)。更多在Android documentation为TextView的。
Much simpler than sniffing keys: try setting android:singleLine="true"
and android:imeOptions="actionNext"
(at least for single-line entry textviews). Read more in the Android documentation for TextView.
的更新:的 SINGLELINE
是的德$ p $现在pcated 的,但你可以离开它。它是可编辑文本的默认行为,只要你不明确设置的android:inputType下=textMultiLine
和 inputType下
覆盖建议 SINGLELINE
替换 MAXLINES =1
为不管怎么说可编辑文本。
Update: singleLine
is deprecated now, but you can leave it out. It's the default behavior for editable text as long as you don't explicitly set android:inputType="textMultiLine"
, and inputType
overrides the suggested singleLine
replacement of maxLines="1"
for editable text anyways.