/** @see com.hiroshica.android.input.nicownn2.NicoWnn#onCreateInputView */
@Override public View onCreateInputView() {
+ int qwertyState = getResources().getConfiguration().keyboard;
+ boolean qwerty = (qwertyState == Configuration.KEYBOARD_QWERTY);
int hiddenState = getResources().getConfiguration().hardKeyboardHidden;
- boolean hidden = (hiddenState == Configuration.HARDKEYBOARDHIDDEN_YES);
- ((DefaultSoftKeyboard)mInputViewManager).setHardKeyboardHidden(hidden);
+ boolean hidden = (hiddenState == Configuration.HARDKEYBOARDHIDDEN_YES);
+ ((DefaultSoftKeyboard)mInputViewManager).setHardKeyboardHidden(hidden, qwerty);
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
String newinputmode = pref.getString("input_mode", INPUTMODE_NICO);
@Override public void onStartInputView(EditorInfo attribute, boolean restarting) {
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
+ boolean isrestart = false;
String newinputmode = pref.getString("input_mode", INPUTMODE_NICO);
if (false == mInputViewMode.equals(newinputmode)) {
+ isrestart = true;
mInputViewMode = newinputmode;
+ }
+ if (null != mInputViewManager) {
+/*
+ boolean oldstate = ((DefaultSoftKeyboard)mInputViewManager).getHiddenSoftKeyboard();
+ boolean newstate = pref.getBoolean("hidden_softkeyboard", false);
+*/
+ /* get old state */
+ boolean oldstate = ((DefaultSoftKeyboard)mInputViewManager).isHardQwertyOnLandscape();
+ /* setup new hardkeyboard state */
+ int qwertyState = getResources().getConfiguration().keyboard;
+ boolean qwerty = (qwertyState == Configuration.KEYBOARD_QWERTY);
+ int hiddenState = getResources().getConfiguration().hardKeyboardHidden;
+ boolean hidden = (hiddenState == Configuration.HARDKEYBOARDHIDDEN_YES);
+ ((DefaultSoftKeyboard)mInputViewManager).setHardKeyboardHidden(hidden, qwerty);
+ /* get new state */
+ boolean newstate = ((DefaultSoftKeyboard)mInputViewManager).isHardQwertyOnLandscape();
+ if (oldstate != newstate) {
+ isrestart = true;
+ }
+ }
+ /**
+ * check restart
+ */
+ if (true == isrestart) {
startSoftKeyboard();
setInputView(super.onCreateInputView());
}
commitConvertingText();
initializeScreen();
}
-
/* Hardware keyboard */
+ int qwertyState = newConfig.keyboard;
+ boolean qwerty = (qwertyState == Configuration.KEYBOARD_QWERTY);
int hiddenState = newConfig.hardKeyboardHidden;
- boolean hidden = (hiddenState == Configuration.HARDKEYBOARDHIDDEN_YES);
- ((DefaultSoftKeyboard) mInputViewManager).setHardKeyboardHidden(hidden);
+ boolean hidden = (hiddenState == Configuration.HARDKEYBOARDHIDDEN_YES);
+ //((DefaultSoftKeyboard) mInputViewManager).setHardKeyboardHidden(hidden, qwerty);
mEnableTutorial = hidden;
}
} catch (Exception ex) {