Skip to content

Instantly share code, notes, and snippets.

@HirogaKatageri
Last active July 21, 2019 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HirogaKatageri/bf20ac3ed5af14ea910aa1f507ce2c2a to your computer and use it in GitHub Desktop.
Save HirogaKatageri/bf20ac3ed5af14ea910aa1f507ce2c2a to your computer and use it in GitHub Desktop.
EditText Multi-Line Action:[Done] Kotlin Extension
fun EditText.isMultilineSendEnabled(isEnabled: Boolean) {
if (isEnabled) {
this.imeOptions = EditorInfo.IME_ACTION_DONE
this.setRawInputType(InputType.TYPE_CLASS_TEXT)
}
}
<EditText android:inputType="textMultiLine"></EditText>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment