Back to project page Ocypode.
The source code is released under:
MIT License
If you think the Android project Ocypode listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ocypode.utility; /* w w w . j av a2s.c o m*/ import android.app.Activity; import android.content.Context; import android.view.View; import android.view.inputmethod.InputMethodManager; public class Utility { public static final String TAG = "Ocypode.Utility"; public static void hideKeyboard(Activity mActivity, View view) { if(mActivity != null){ InputMethodManager inputManager = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE); if(inputManager != null && view != null) inputManager.hideSoftInputFromWindow(view.getWindowToken(), 0); } } }