]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/utils/Globals.java
toCamelCase
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / utils / Globals.java
index b7fffadf4b0c150153dbaff3df711d707ae22923..4cf2b755b12a27e6593ac61557b81a1239784203 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2018 Damyan Ivanov.
+ * Copyright © 2019 Damyan Ivanov.
  * This file is part of Mobile-Ledger.
  * Mobile-Ledger is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
 
 package net.ktnx.mobileledger.utils;
 
+import android.app.Activity;
+import android.content.Context;
 import android.support.annotation.ColorInt;
+import android.view.View;
+import android.view.inputmethod.InputMethodManager;
 
 public final class Globals {
     @ColorInt
-    public static int table_row_even_bg;
+    public static int tableRowEvenBG;
     @ColorInt
-    public static int table_row_odd_bg;
+    public static int tableRowOddBG;
     @ColorInt
     public static int primaryDark, defaultTextColor;
+    public static void hideSoftKeyboard(Activity act) {
+        // hide the keyboard
+        View v = act.getCurrentFocus();
+        if (v != null) {
+            InputMethodManager imm =
+                    (InputMethodManager) act.getSystemService(Context.INPUT_METHOD_SERVICE);
+            imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
+        }
+    }
 
 }
\ No newline at end of file