File tree Expand file tree Collapse file tree
app/src/main/java/io/github/yawnoc/strokeinput Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44## [ Unreleased]
55
6- - Added symbols keyboard
6+ - Added symbols keyboard and implemented switching to it
77- Fixed NullPointerException for ` onSinglePointerTouchEvent ` of null key
88- Fixed key press colour change dependent on activity background
99- Implemented abort on move outside keyboard (by adding 1 px gutter)
Original file line number Diff line number Diff line change 3232 - Candidates bar
3333 - Keyboard
3434 TODO:
35- - Switch to symbols keyboard
3635 - Candidates
3736*/
3837public class InputContainer
Original file line number Diff line number Diff line change @@ -26,17 +26,22 @@ public class StrokeInputService
2626 private static final String SPACE = " " ;
2727 private static final String NEWLINE = "\n " ;
2828
29+ InputContainer inputContainer ;
30+ Keyboard strokesKeyboard ;
31+ Keyboard symbolsKeyboard ;
32+
33+ @ SuppressLint ("InflateParams" )
2934 @ Override
3035 public View onCreateInputView () {
3136
32- @ SuppressLint ("InflateParams" )
33- final InputContainer inputContainer =
37+ inputContainer =
3438 (InputContainer )
3539 getLayoutInflater ().inflate (R .layout .input_container , null );
3640
37- final Keyboard keyboard = new Keyboard (this , R .xml .keyboard_strokes );
41+ strokesKeyboard = new Keyboard (this , R .xml .keyboard_strokes );
42+ symbolsKeyboard = new Keyboard (this , R .xml .keyboard_symbols );
3843
39- inputContainer .setKeyboard (keyboard );
44+ inputContainer .setKeyboard (strokesKeyboard );
4045 inputContainer .setOnInputListener (this );
4146
4247 return inputContainer ;
@@ -62,6 +67,14 @@ public void onKey(final String valueText) {
6267 }
6368 break ;
6469
70+ case "STROKES" :
71+ inputContainer .setKeyboard (strokesKeyboard );
72+ break ;
73+
74+ case "SYMBOLS" :
75+ inputContainer .setKeyboard (symbolsKeyboard );
76+ break ;
77+
6578 case "SPACE" :
6679 inputConnection .commitText (SPACE , 1 );
6780 break ;
You can’t perform that action at this time.
0 commit comments