android editText 監聽事件
在軟鍵盤中注意
在監聽的 edittext中
使用android:imeOptions屬性的時候,一定要對EditText設置 android:inputType 或者 設置 android:singleline=”true”
在activity_main.xml文件中,定義了8個EditText,imeOptions分別是:
actionDone 完成 對應 EditorInfo.IME_ACTION_DONE
actionGo 前進 對應 EditorInfo.IME_ACTION_GO
actionNext 下一項 對應 EditorInfo.IME_ACTION_NEXT
actionNone 無動作 對應 EditorInfo.IME_ACTION_NONE
actionPrevious 上一項 對應 EditorInfo.IME_ACTION_PREVIOUS
actionSearch 搜索 對應 EditorInfo.IME_ACTION_SEARCH
actionUnspecified 未指定 對應 EditorInfo.IME_ACTION_UNSPECIFIED
actionSend 發送 對應 EditorInfo.IME_ACTION_SEND

監聽方法
浙公網安備 33010602011771號