From 700adbded6dcaf0634f1ef72c40da3e53722d890 Mon Sep 17 00:00:00 2001 From: jaguillo Date: Thu, 1 Oct 2015 17:11:52 +0200 Subject: [PATCH] Mini fix --- srcs/juloo.keyboard2/Keyboard2.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index 4ac25b2..4e8151d 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -1,8 +1,10 @@ package juloo.keyboard2; +import android.content.res.Configuration; import android.content.Intent; import android.content.SharedPreferences; import android.inputmethodservice.InputMethodService; +import android.os.Bundle; import android.preference.PreferenceManager; import android.view.KeyEvent; import android.view.View; @@ -28,6 +30,7 @@ public class Keyboard2 extends InputMethodService { ViewGroup parent = (ViewGroup)_inputView.getParent(); + System.out.println("create input view"); if (parent != null) parent.removeView(_inputView); _inputView.reset(); @@ -40,10 +43,24 @@ public class Keyboard2 extends InputMethodService _inputView.reset_prefs(this); } + @Override + public void onAppPrivateCommand(String command, Bundle data) + { + System.out.println("App private command: " + command); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) + { + _inputView.reset(); + System.out.println("configuration change"); + } + public void handleKeyUp(KeyValue key, int flags) { if (getCurrentInputConnection() == null) return ; + System.out.println("key up "); if (key.getEventCode() == KeyValue.EVENT_CONFIG) { Intent intent = new Intent(this, SettingsActivity.class);