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_odd_bg;
@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