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 @@ -239,11 +239,13 @@ public void showKeyPreviewPlane() {
239239 final int screenWidth = keyboard .getScreenWidth ();
240240 final int screenHeight = keyboard .getScreenHeight ();
241241 final int keyboardHeight = keyboard .getHeight ();
242+ final int popupBufferZoneHeight = keyboard .getPopupBufferZoneHeight ();
242243
243244 keyPreviewPlane .updateDimensions (
244245 screenWidth ,
245246 screenHeight ,
246- keyboardHeight
247+ keyboardHeight ,
248+ popupBufferZoneHeight
247249 );
248250 keyPreviewPlanePopup .dismiss ();
249251 keyPreviewPlanePopup .setWidth (screenWidth );
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ public class KeyPreviewPlane extends View {
3333 private int width ;
3434 private int height ;
3535 private int keyboardHeight ;
36+ private int popupBufferZoneHeight ;
3637 private final List <Key > keyList = new ArrayList <>();
3738 private Key latestKey ;
3839 private int shiftMode = InputContainer .SHIFT_DISABLED ;
@@ -90,12 +91,14 @@ private void initialiseDrawing(final Context context) {
9091 public void updateDimensions (
9192 final int width ,
9293 final int height ,
93- final int keyboardHeight
94+ final int keyboardHeight ,
95+ final int popupBufferZoneHeight
9496 )
9597 {
9698 this .width = width ;
9799 this .height = height ;
98100 this .keyboardHeight = keyboardHeight ;
101+ this .popupBufferZoneHeight = popupBufferZoneHeight ;
99102 }
100103
101104 public void updateShiftMode (final int shiftMode ) {
@@ -186,7 +189,7 @@ public void onDraw(final Canvas canvas) {
186189 final int previewY = (
187190 key .y
188191 - keyPreviewHeight - key .previewMarginY
189- + this .height - keyboardHeight
192+ + this .height - keyboardHeight - popupBufferZoneHeight
190193 );
191194
192195 canvas .translate (previewX , previewY );
You can’t perform that action at this time.
0 commit comments