diff options
author | AndrewMurrell <amurrel@purdue.edu> | 2014-05-06 22:26:49 -0400 |
---|---|---|
committer | AndrewMurrell <amurrel@purdue.edu> | 2014-05-06 22:26:49 -0400 |
commit | cc0db6ceec33742b018a989d4b9bbf046418ca9f (patch) | |
tree | 10dc54fc3d57a4e589dedf6c8f62106bc757216e /src/us/minak/IMEService.java | |
parent | a0ac4d4cf9e31bbe019d29ddb6f514a9e3edcc73 (diff) | |
parent | 44fa9b5b07062c165192a50fea4301e57d3424ba (diff) |
Merge branch 'master' of https://github.com/AndrewMurrell/minak
Conflicts:
src/us/minak/IMEView.java
Diffstat (limited to 'src/us/minak/IMEService.java')
-rw-r--r-- | src/us/minak/IMEService.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/us/minak/IMEService.java b/src/us/minak/IMEService.java index ae12bc2..a0a9ece 100644 --- a/src/us/minak/IMEService.java +++ b/src/us/minak/IMEService.java @@ -35,17 +35,6 @@ public class IMEService extends InputMethodService { } }); - minakView.setOnBackspacePressedListener(new OnBackspacePressedListener() { - @Override - public void backspacePressed(boolean isLongClick) { - if (isLongClick) { - deleteLastWord(); - } else { - getCurrentInputConnection().deleteSurroundingText(1, 0); - } - } - }); - mIMEView = minakView; return minakView; } @@ -60,22 +49,4 @@ public class IMEService extends InputMethodService { } } } - - /** - * Deletes one word before the cursor. - */ - private void deleteLastWord() { - final int charactersToGet = 20; - final String splitRegexp = " "; - - // delete trailing spaces - while (getCurrentInputConnection().getTextBeforeCursor(1, 0).toString().equals(splitRegexp)) { - getCurrentInputConnection().deleteSurroundingText(1, 0); - } - - // delete last word letters - final String[] words = getCurrentInputConnection().getTextBeforeCursor(charactersToGet, 0).toString() - .split(splitRegexp); - getCurrentInputConnection().deleteSurroundingText(words[words.length - 1].length(), 0); - } } |