hide keyboard

@param activity Activity
558426
public static void hideKeyboard(Activity activity) {
        View view = activity.getWindow().getDecorView();

        if (view != null) {
            hideKeyboard(activity, view);
        }
    }
243862
public void hide (Action action) {
		Stage stage = getStage();
		if (stage != null) {
			removeListener(focusListener);
			if (previousKeyboardFocus != null && previousKeyboardFocus.getStage() == null) previousKeyboardFocus = null;
			Actor actor = stage.getKeyboardFocus();
			if (actor == null || actor.isDescendantOf(this)) stage.setKeyboardFocus(previousKeyboardFocus);

			if (previousScrollFocus != null && previousScrollFocus.getStage() == null) previousScrollFocus = null;
			actor = stage.getScrollFocus();
			if (actor == null || actor.isDescendantOf(this)) stage.setScrollFocus(previousScrollFocus);
		}
		if (action != null) {
			addCaptureListener(ignoreTouchDown);
			addAction(sequence(action, Actions.removeListener(ignoreTouchDown, true), Actions.removeActor()));
		} else
			remove();
	}
948897
public static void toggleKeyboard() {
        InputMethodManager imm = ((InputMethodManager) QuickUtils.getContext().getSystemService(Context.INPUT_METHOD_SERVICE));
        imm.toggleSoftInput(0, 0);
    }
865015
public void setHideUnusedButtons(boolean hide) {

        m_okButton.setVisible(!hide || (m_okAction != null));
        m_cancelButton.setVisible(!hide || (m_cancelAction != null));
    }
748163
public static void typeface(Activity activity, TypefaceCollection typefaceCollection) {
		typeface(activity.findViewById(android.R.id.content), typefaceCollection);
	}
168431
public void onKeyPress (KeyPressEvent event)
    {
        if (event.getCharCode() == KeyCodes.KEY_ESCAPE) {
            _onEscape.onClick(null);
        }
    }
258989
public static boolean show(final Activity activity) {
        final SharedPreferences preferences = activity.getSharedPreferences(PREFERENCES_EULA,
                Activity.MODE_PRIVATE);
        if (!preferences.getBoolean(PREFERENCE_EULA_ACCEPTED, false)) {
            final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
            builder.setTitle("License");
            builder.setCancelable(true);
            builder.setPositiveButton("Accept", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    accept(preferences);
                    if (activity instanceof OnEulaAgreedTo) {
                        ((OnEulaAgreedTo) activity).onEulaAgreedTo();
                    }
                }
            });
            builder.setNegativeButton("Refuse", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    refuse(activity);
                }
            });
            builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
                public void onCancel(DialogInterface dialog) {
                    refuse(activity);
                }
            });
            builder.setMessage(readEula(activity));
            builder.create().show();
            return false;
        }
        return true;
    }
787469
public static void showKeyboardInDialog(Dialog dialog, EditText target) {
        if (dialog == null || target == null) {
            return;
        }

        dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
        target.requestFocus();
    }
667419
public static void toggleKeyPad(Context context) {
		InputMethodManager imm = (InputMethodManager) context
				.getSystemService(Context.INPUT_METHOD_SERVICE);
		if (imm != null) {
			imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
		}
	}
981717
public void hide() {
        console.out().print("\33[" + 1 + ";" + terminal.getHeight() + ";r");
        //Erase screen doesn't behave well on windows.
        for (int l = 1; l <= terminal.getHeight(); l++) {
            console.out().print(ansi().cursor(l, 1));
            console.out().print(ansi().eraseLine(Erase.FORWARD));
        }
        console.out().print(ansi().cursor(1, 1));
        flush();
        try {
            terminal.restore();
        } catch (Exception e) {
            //noop
        }
    }
258749
public static void delayedHideSoftKeyboard(final Context context,
			final View view, int delay) {
		TimerTask task = new TimerTask() {
			@Override
			public void run() {
				hideSoftKeyboard(context, view);
			}
		};

		Timer timer = new Timer();
		timer.schedule(task, delay);
	}
237511
@Override
    public void onKeyDown(KeyDownEvent event) {
	char c = MiscUtils.getCharCode(event.getNativeEvent());
	onKeyCodeEvent(event, box.getValue()+c);
    }
1156432
private void hide() {
        try {
            motd.markAsRead();
            stage.hide();
        } catch (ClassNotFoundException | IOException e) {
            FOKLogger.log(MOTDDialog.class.getName(), Level.SEVERE, FOKLogger.DEFAULT_ERROR_TEXT, e);
        }
    }
1372261
public void unlockScreen(){
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "unlockScreen()");
		}
		
		final Activity activity = activityUtils.getCurrentActivity(false);
		instrumentation.runOnMainSync(new Runnable() {
			@Override
			public void run() {
				if(activity != null){
					activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
				}
			}
		});
	}
275477
def hide_shortcuts(self, menu):
        """"""
        for element in getattr(self, menu + '_menu_actions'):
            if element and isinstance(element, QAction):
                if element._shown_shortcut is not None:
                    element.setShortcut(QKeySequence())
114302
public static void starthHomeActivity(@Nullable Activity activity) {
		if (activity != null) {
			if (activity.getClass() != AbstractApplication.get().getHomeActivityClass()) {
				Intent intent = new Intent(activity, AbstractApplication.get().getHomeActivityClass());
				intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				activity.startActivity(intent);
			}
		} else {
			LOGGER.warn("Null activity. Ignoring launch of " + AbstractApplication.get().getHomeActivityClass().getSimpleName());
		}
	}
135150
public static void showPanel(final View panelLayout) {
        final Activity activity = (Activity) panelLayout.getContext();
        panelLayout.setVisibility(View.VISIBLE);
        if (activity.getCurrentFocus() != null) {
            KeyboardUtil.hideKeyboard(activity.getCurrentFocus());
        }
    }