Skip to content

Instantly share code, notes, and snippets.

Created January 23, 2015 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/92ed932fdb58f05f16f6 to your computer and use it in GitHub Desktop.
Save anonymous/92ed932fdb58f05f16f6 to your computer and use it in GitHub Desktop.
// hide the virtual keyboard
InputMethodManager imm =
(InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
android.os.ResultReceiver rr = new android.os.ResultReceiver(new android.os.Handler()) {
@Override
protected void onReceiveResult(int resultCode, Bundle resultData) {
//no worky :(
Tab tab = Tabs.getInstance().getSelectedTab();
if (tab != null) {
if (!tab.isPrivate())
activity.showNormalTabs();
else
activity.showPrivateTabs();
}
}
};
boolean hideResult = imm.hideSoftInputFromWindow(tabsButton.getWindowToken(), 0, rr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment