Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e5e5a1979 | ||
|
|
c13e7608fa | ||
|
|
2e9f69d58c |
+2
-2
@@ -14,8 +14,8 @@ android {
|
||||
applicationId "juloo.keyboard2"
|
||||
minSdk 11
|
||||
targetSdkVersion 35
|
||||
versionCode 43
|
||||
versionName "1.30.0"
|
||||
versionCode 44
|
||||
versionName "1.30.1"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Bug fixes
|
||||
@@ -157,6 +157,8 @@ public class Keyboard2 extends InputMethodService
|
||||
// Android might return a random subtype, for example, the first in the
|
||||
// list alphabetically.
|
||||
InputMethodSubtype current_subtype = imm.getCurrentInputMethodSubtype();
|
||||
if (current_subtype == null)
|
||||
return null;
|
||||
for (InputMethodSubtype s : enabled_subtypes)
|
||||
if (s.getLanguageTag().equals(current_subtype.getLanguageTag()))
|
||||
return s;
|
||||
|
||||
@@ -42,6 +42,7 @@ public class Keyboard2View extends View
|
||||
private Config _config;
|
||||
|
||||
private float _keyWidth;
|
||||
private float _bottomMargin;
|
||||
|
||||
private Theme _theme;
|
||||
|
||||
@@ -257,9 +258,7 @@ public class Keyboard2View extends View
|
||||
{
|
||||
DisplayMetrics dm = getContext().getResources().getDisplayMetrics();
|
||||
int width = dm.widthPixels;
|
||||
int height =
|
||||
(int)(_config.keyHeight * _keyboard.keysHeight
|
||||
+ _config.marginTop + _config.margin_bottom);
|
||||
_bottomMargin = _config.margin_bottom;
|
||||
// Compatibility with display cutouts and navigation on the right
|
||||
if (VERSION.SDK_INT >= 30)
|
||||
{
|
||||
@@ -270,7 +269,13 @@ public class Keyboard2View extends View
|
||||
WindowInsets.Type.statusBars() | WindowInsets.Type.navigationBars()
|
||||
| WindowInsets.Type.displayCutout());
|
||||
width = metrics.getBounds().width() - insets.right - insets.left;
|
||||
// Starting in API 34, keyboard window has LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
|
||||
if (VERSION.SDK_INT >= 34)
|
||||
_bottomMargin += insets.bottom;
|
||||
}
|
||||
int height =
|
||||
(int)(_config.keyHeight * _keyboard.keysHeight
|
||||
+ _config.marginTop + _bottomMargin);
|
||||
setMeasuredDimension(width, height);
|
||||
_keyWidth = (width - (_config.horizontal_margin * 2)) / _keyboard.keysWidth;
|
||||
}
|
||||
@@ -287,7 +292,7 @@ public class Keyboard2View extends View
|
||||
left + (int)_config.horizontal_margin,
|
||||
top + (int)_config.marginTop,
|
||||
right - (int)_config.horizontal_margin,
|
||||
bottom - (int)_config.margin_bottom);
|
||||
bottom - (int)_bottomMargin);
|
||||
setSystemGestureExclusionRects(Arrays.asList(keyboard_area));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user