X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Futils%2FGlobals.java;h=e32a4321247261207e8286ae20ae309b49e55ee5;hp=39884f0517ad389859578b5db954bd44c221ac11;hb=0bbdc409d82da31324c031f36607510f17d992e6;hpb=c7b957ab880ff947ef90e70e41c7bc1c19a1caa3 diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/Globals.java b/app/src/main/java/net/ktnx/mobileledger/utils/Globals.java index 39884f05..e32a4321 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/Globals.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/Globals.java @@ -17,12 +17,27 @@ 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; @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