Skip to content

Commit

Permalink
Keyboard shows only when portrait screen ratio is above 1.77
Browse files Browse the repository at this point in the history
  • Loading branch information
lanceewing committed Apr 28, 2024
1 parent e9273fc commit 2474baf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,12 @@ public void resize(int width, int height) {
if (!keyboardType.isPortrait()) {
keyboardType = KeyboardType.PORTRAIT_LOWER_CASE;
}

// For non-standard portrait sizes, where the keyboard would overlap the
// screen, we turn the keyboard off on resize.
if (((float)height/width) < 1.77) {
keyboardType = KeyboardType.OFF;
}
} else if (keyboardType.isRendered()) {
// If it wasn't previously landscape, then turn it off.
if (!keyboardType.isLandscape()) {
Expand Down

0 comments on commit 2474baf

Please sign in to comment.