Compare commits

..

2 Commits

Author SHA1 Message Date
Jules Aguillon
b50647f622 Call Window.setAttributes()
Some checks failed
Make Apk CI / Build-Apk (push) Has been cancelled
Check translations / check-translations (push) Has been cancelled
Check layouts / check_layout.output (push) Has been cancelled
Check layouts / Generated files (push) Has been cancelled
2025-07-02 23:54:53 +02:00
Jules Aguillon
cd1b4beb10 Avoid transparent background below the navigation bar
With some vendors, the navigation bar was transparent and the keyboard
background was not drawn behind it.
2025-07-02 22:51:01 +02:00
3 changed files with 6 additions and 14 deletions

View File

@@ -168,7 +168,7 @@ public final class Config
switch_input_immediate = _prefs.getBoolean("switch_input_immediate", false);
extra_keys_param = ExtraKeysPreference.get_extra_keys(_prefs);
extra_keys_custom = CustomExtraKeysPreference.get(_prefs);
selected_number_layout = NumberLayout.of_string(_prefs.getString("number_entry_layout", "pin"));
selected_number_layout = NumberLayout.valueOf(_prefs.getString("number_entry_layout", "pin").toUpperCase());
current_layout_portrait = _prefs.getInt("current_layout_portrait", 0);
current_layout_landscape = _prefs.getInt("current_layout_landscape", 0);
current_layout_unfolded_portrait = _prefs.getInt("current_layout_unfolded_portrait", 0);

View File

@@ -315,7 +315,9 @@ public class Keyboard2 extends InputMethodService
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
// Allow to draw behind system bars
wattrs.setFitInsetsTypes(0);
window.setAttributes(wattrs);
window.setDecorFitsSystemWindows(false);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
}
updateLayoutHeightOf(window, ViewGroup.LayoutParams.MATCH_PARENT);
final View inputArea = window.findViewById(android.R.id.inputArea);

View File

@@ -1,17 +1,7 @@
package juloo.keyboard2;
public enum NumberLayout {
PIN,
NUMBER,
NORMAL;
public static NumberLayout of_string(String name)
{
switch (name)
{
case "number": return NUMBER;
case "normal": return NORMAL;
case "pin": default: return PIN;
}
}
PIN,
NUMBER,
NORMAL
}