Last active
August 29, 2015 14:02
-
-
Save yareally/604f58097a47e2ccb1dc to your computer and use it in GitHub Desktop.
fixes the send button
This file contains hidden or 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
// original code: | |
private void initializeIme() { | |
if (TextSecurePreferences.isEnterImeKeyEnabled(this)) { | |
composeText.setInputType(composeText.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE)); | |
} else { | |
composeText.setInputType(composeText.getInputType() | (InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE)); | |
} | |
} | |
// new code | |
private void initializeIme() { | |
// TODO: fix so it only minimally mods the xml and this function (if possible) | |
composeText.setHorizontallyScrolling(false); | |
composeText.setMaxLines(4); | |
if (TextSecurePreferences.isEnterImeKeyEnabled(this)) { | |
if (TextSecurePreferences.isEnterSendsEnabled(this)) { | |
composeText.setInputType(composeText.getInputType()); | |
} else { | |
composeText.setImeOptions(~EditorInfo.IME_ACTION_SEND); | |
composeText.setInputType(composeText.getInputType() | (InputType.TYPE_TEXT_FLAG_MULTI_LINE)); | |
} | |
} else { | |
composeText.setInputType((composeText.getInputType()) | (InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment