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.
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.