abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2.java
diff options
context:
space:
mode:
authorJules Aguillon2026-02-24 23:57:10 +0100
committerGitHub2026-02-24 23:57:10 +0100
commitae4a9d4514f2680e81e9b9dc0e333d5f9975be22 (patch)
treeffee3ea09bb2de5a67aa977f2fbbda2c83d85957 /srcs/juloo.keyboard2/Keyboard2.java
parent91b2970c1fb293881d4d855197e52d4df61b94eb (diff)
downloadunexpected-keyboard-ae4a9d4514f2680e81e9b9dc0e333d5f9975be22.tar.gz
unexpected-keyboard-ae4a9d4514f2680e81e9b9dc0e333d5f9975be22.zip
Fix no keyboard after switching from clipboard manager (#1189)
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2.java44
1 files changed, 22 insertions, 22 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java
index ffe99ac..2a7695c 100644
--- a/srcs/juloo.keyboard2/Keyboard2.java
+++ b/srcs/juloo.keyboard2/Keyboard2.java
@@ -33,8 +33,8 @@ public class Keyboard2 extends InputMethodService
implements SharedPreferences.OnSharedPreferenceChangeListener
{
/** The view containing the keyboard and candidates view. */
- private ViewGroup _container_view;
- private Keyboard2View _keyboardView;
+ private ViewGroup _keyboard_container_view;
+ private Keyboard2View _keyboard_layout_view;
private CandidatesView _candidates_view;
private KeyEventHandler _keyeventhandler;
/** If not 'null', the layout to use instead of [_config.current_layout]. */
@@ -80,7 +80,7 @@ public class Keyboard2 extends InputMethodService
{
_config.set_current_layout(l);
_currentSpecialLayout = null;
- _keyboardView.setKeyboard(current_layout());
+ _keyboard_layout_view.setKeyboard(current_layout());
}
void incrTextLayout(int delta)
@@ -92,7 +92,7 @@ public class Keyboard2 extends InputMethodService
void setSpecialLayout(KeyboardData l)
{
_currentSpecialLayout = l;
- _keyboardView.setKeyboard(l);
+ _keyboard_layout_view.setKeyboard(l);
}
KeyboardData loadLayout(int layout_id)
@@ -143,9 +143,9 @@ public class Keyboard2 extends InputMethodService
private void create_keyboard_view()
{
- _container_view = (ViewGroup)inflate_view(R.layout.keyboard);
- _keyboardView = (Keyboard2View)_container_view.findViewById(R.id.keyboard_view);
- _candidates_view = (CandidatesView)_container_view.findViewById(R.id.candidates_view);
+ _keyboard_container_view = (ViewGroup)inflate_view(R.layout.keyboard);
+ _keyboard_layout_view = (Keyboard2View)_keyboard_container_view.findViewById(R.id.keyboard_view);
+ _candidates_view = (CandidatesView)_keyboard_container_view.findViewById(R.id.candidates_view);
}
InputMethodManager get_imm()
@@ -192,7 +192,7 @@ public class Keyboard2 extends InputMethodService
_candidates_view.setVisibility(should_show ? View.VISIBLE : View.GONE);
}
- /** Might re-create the keyboard view. [_keyboardView.setKeyboard()] and
+ /** Might re-create the keyboard view. [_keyboard_layout_view.setKeyboard()] and
[setInputView()] must be called soon after. */
private void refresh_config()
{
@@ -205,11 +205,11 @@ public class Keyboard2 extends InputMethodService
create_keyboard_view();
_emojiPane = null;
_clipboard_pane = null;
- setInputView(_container_view);
+ setInputView(_keyboard_container_view);
}
// Set keyboard background opacity
- _container_view.getBackground().setAlpha(_config.keyboardOpacity);
- _keyboardView.reset();
+ _keyboard_container_view.getBackground().setAlpha(_config.keyboardOpacity);
+ _keyboard_layout_view.reset();
refresh_candidates_view();
}
@@ -232,9 +232,9 @@ public class Keyboard2 extends InputMethodService
_config.editor_config.refresh(info, getResources());
refresh_config();
_currentSpecialLayout = refresh_special_layout();
- _keyboardView.setKeyboard(current_layout());
+ _keyboard_layout_view.setKeyboard(current_layout());
_keyeventhandler.started(_config);
- setInputView(_container_view);
+ setInputView(_keyboard_container_view);
Logs.debug_startup_input_view(info, _config);
}
@@ -318,7 +318,7 @@ public class Keyboard2 extends InputMethodService
{
refreshSubtypeImm();
refresh_candidates_view();
- _keyboardView.setKeyboard(current_layout());
+ _keyboard_layout_view.setKeyboard(current_layout());
}
@Override
@@ -327,21 +327,21 @@ public class Keyboard2 extends InputMethodService
super.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd, candidatesStart, candidatesEnd);
_keyeventhandler.selection_updated(oldSelStart, newSelStart, newSelEnd);
if ((oldSelStart == oldSelEnd) != (newSelStart == newSelEnd))
- _keyboardView.set_selection_state(newSelStart != newSelEnd);
+ _keyboard_layout_view.set_selection_state(newSelStart != newSelEnd);
}
@Override
public void onFinishInputView(boolean finishingInput)
{
super.onFinishInputView(finishingInput);
- _keyboardView.reset();
+ _keyboard_layout_view.reset();
}
@Override
public void onSharedPreferenceChanged(SharedPreferences _prefs, String _key)
{
refresh_config();
- _keyboardView.setKeyboard(current_layout());
+ _keyboard_layout_view.setKeyboard(current_layout());
}
@Override
@@ -377,7 +377,7 @@ public class Keyboard2 extends InputMethodService
case SWITCH_TEXT:
_currentSpecialLayout = null;
- _keyboardView.setKeyboard(current_layout());
+ _keyboard_layout_view.setKeyboard(current_layout());
break;
case SWITCH_NUMERIC:
@@ -398,7 +398,7 @@ public class Keyboard2 extends InputMethodService
case SWITCH_BACK_EMOJI:
case SWITCH_BACK_CLIPBOARD:
- setInputView(_keyboardView);
+ setInputView(_keyboard_container_view);
break;
case CHANGE_METHOD_PICKER:
@@ -456,17 +456,17 @@ public class Keyboard2 extends InputMethodService
public void set_shift_state(boolean state, boolean lock)
{
- _keyboardView.set_shift_state(state, lock);
+ _keyboard_layout_view.set_shift_state(state, lock);
}
public void set_compose_pending(boolean pending)
{
- _keyboardView.set_compose_pending(pending);
+ _keyboard_layout_view.set_compose_pending(pending);
}
public void selection_state_changed(boolean selection_is_ongoing)
{
- _keyboardView.set_selection_state(selection_is_ongoing);
+ _keyboard_layout_view.set_selection_state(selection_is_ongoing);
}
public InputConnection getCurrentInputConnection()