我試圖表明我的鍵盤膨脹的LinearLayout和調用的setContentView等之後:如何強制鍵盤顯示/隱藏?
InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.showSoftInput(etContent, InputMethodManager.SHOW_FORCED);
getContent.requestFocus();
它沒有工作。我也試過這個:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
但它也沒有工作。我如何強制鍵盤顯示/隱藏?我做錯了什麼?
完全重複的http:/ /stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard和http://stackoverflow.com/questions/2479504/forcing-the-soft-keyboard-open – Polynomial