abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Utils.java
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/juloo.keyboard2/Utils.java')
-rw-r--r--srcs/juloo.keyboard2/Utils.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/Utils.java b/srcs/juloo.keyboard2/Utils.java
index f0f3036..88c865c 100644
--- a/srcs/juloo.keyboard2/Utils.java
+++ b/srcs/juloo.keyboard2/Utils.java
@@ -1,8 +1,13 @@
package juloo.keyboard2;
import android.app.AlertDialog;
+import android.content.res.Resources;
+import android.graphics.Insets;
+import android.os.Build.VERSION;
import android.os.IBinder;
+import android.view.View;
import android.view.Window;
+import android.view.WindowInsets;
import android.view.WindowManager;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -44,4 +49,14 @@ public final class Utils
out.append(buff, 0, l);
return out.toString();
}
+
+ /** Whether the thin gesture-navigation bar is used.
+ https://stackoverflow.com/questions/36514167/how-to-really-get-the-navigation-bar-height-in-android
+ */
+ public static boolean is_navigation_bar_gestural(Resources res)
+ {
+ // core/java/android/view/WindowManagerPolicyConstants.java
+ int res_id = res.getIdentifier("config_navBarInteractionMode", "integer", "android");
+ return (res_id > 0 && res.getInteger(res_id) == 2);
+ }
}