Last active
July 21, 2019 15:07
-
-
Save HirogaKatageri/bf20ac3ed5af14ea910aa1f507ce2c2a to your computer and use it in GitHub Desktop.
EditText Multi-Line Action:[Done] Kotlin Extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun EditText.isMultilineSendEnabled(isEnabled: Boolean) { | |
if (isEnabled) { | |
this.imeOptions = EditorInfo.IME_ACTION_DONE | |
this.setRawInputType(InputType.TYPE_CLASS_TEXT) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<EditText android:inputType="textMultiLine"></EditText> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment