軟鍵盤顯示發送按鈕,支持多行

原文鏈接:https://blog.csdn.net/lixueqiang001/article/details/90515198
editText.imeOptions = EditorInfo.IME_ACTION_SEND
editText.inputType = TYPE_TEXT_FLAG_MULTI_LINE
editText.setSingleLine(false)
editText.maxLines = 40
editText.setOnEditorActionListener { v, actionId, event ->
    if (actionId == EditorInfo.IME_ACTION_SEND) {
        Log.d("zivon", "MomentCommentDialog send------------------")
        publishComment(fragment)
        true
    }
    false
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章