diff options
author | DavisLWebb <davislwebb@ymail.com> | 2014-05-07 12:36:36 -0400 |
---|---|---|
committer | DavisLWebb <davislwebb@ymail.com> | 2014-05-07 12:36:36 -0400 |
commit | fac4b2b460ba84cc38fb75ecbf09755528050bc7 (patch) | |
tree | 298c3400f22f4ca9b84beb0a3df7f55bbabc9003 /src/us/minak/IMEService.java | |
parent | 9ca3fa2d19c48dafb5f25f92bcd5ba87d03031b0 (diff) | |
parent | 58aa0ea407aedde32cbde69b2dbb6cf4ae9e31a5 (diff) |
Merge branch 'master' of https://github.com/AndrewMurrell/minak
Diffstat (limited to 'src/us/minak/IMEService.java')
-rw-r--r-- | src/us/minak/IMEService.java | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/src/us/minak/IMEService.java b/src/us/minak/IMEService.java index a0a9ece..f8a3660 100644 --- a/src/us/minak/IMEService.java +++ b/src/us/minak/IMEService.java @@ -1,52 +1,16 @@ -/* - ******************************************************************************** - * Copyright (c) 2012 Samsung Electronics, Inc. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Inc. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - ******************************************************************************** - */ - package us.minak; -import java.util.Queue; - import android.inputmethodservice.InputMethodService; import android.view.View; -import android.view.inputmethod.EditorInfo; /** * Represent the application input service. */ -public class IMEService extends InputMethodService { - private IMEView mIMEView; - +public class IMEService extends InputMethodService implements InputConnectionGetter { @Override public View onCreateInputView() { final IMEView minakView = (IMEView) getLayoutInflater().inflate(R.layout.ime, null); - - minakView.setOnCharacterEnteredListener(new StringReciever() { - @Override - public void putString(String character) { - getCurrentInputConnection().commitText(character, 1); - } - }); - - mIMEView = minakView; + minakView.setInputConnectionGetter(this); return minakView; } - - @Override - public void onStartInput(EditorInfo attribute, boolean restarting) { - if (mIMEView != null) { - final Queue<Character> symbolsQueue = mIMEView.getSymbolsQueue(); - while (!symbolsQueue.isEmpty()) { - final Character character = symbolsQueue.poll(); - getCurrentInputConnection().commitText(String.valueOf(character), 1); - } - } - } } |