Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to override the InputMethodService method onEvaluateInputViewShown() to evaluate to true even when there is a hard keyboard. See <a href="http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html#onEvaluateInputViewShown%28%29">onEvaluateInputShown()</a> and the Soft Input View section of <a href="http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html">InputMethodService</a>. Try creating your own custom InputMethodService class to override this method.</p> <p>EDIT: The <a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/inputmethodservice/InputMethodService.java#InputMethodService.onEvaluateInputViewShown%28%29">source for onEvaluateInputShown()</a> should help. The solution should be as simple as creating your own class that extends InputMethodService and overriding this one method, which is only a couple of lines long. Make sure to add your custom service to your manifest as well.</p> <p>From Source:</p> <blockquote> <p>"Override this to control when the soft input area should be shown to the user. The default implementation only shows the input view when there is no hard keyboard or the keyboard is hidden. If you change what this returns, you will need to call updateInputViewShown() yourself whenever the returned value may have changed to have it re-evalauted and applied."</p> </blockquote> <pre><code>public boolean onEvaluateInputViewShown() { Configuration config = getResources().getConfiguration(); return config.keyboard == Configuration.KEYBOARD_NOKEYS || config.hardKeyboardHidden == Configuration.KEYBOARDHIDDEN_YES; } </code></pre> <p><a href="http://developer.android.com/reference/android/content/res/Configuration.html">Here</a> are the possible configurations you can check for. Configuration.KEYBOARD_NOKEYS corresponds to no hardware keyboard. This method returns true (soft keyboard should be shown) if there is no hardware keyboard or if the hardware keyboard is hidden. Removing both of these checks and simply returning true should make the software keyboard visible even if a hardware keyboard is attached.</p> <p>Try (not tested):</p> <pre><code>public boolean onEvaluateInputViewShown() { return true; } </code></pre> <p>Since this return value will not change, you won't need to call updateInputViewShown() yourself. If you modify this method differently, be sure to remember this detail.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload