android autocompletetextview hint results hidden under keyboard

后端 未结 8 1848
死守一世寂寞
死守一世寂寞 2020-12-30 20:36

I have 3 autocompletetextview\'s in which i set its adapter to be an ArrayAdapter with a very simple textview layout.

相关标签:
8条回答
  • 2020-12-30 20:36

    you should look here : Creating an input method

    Composing text before committing

    If your IME does text prediction or requires multiple steps to compose a glyph or word, you can show the progress in the text field until the user commits the word, and then you can replace the partial composition with the completed text. You may give special treatment to the text by adding a "span" to it when you pass it to InputConnection#setComposingText().

    this way, suggestions will apears on soft keyboard prediction like auto-correction. An other way of doing it will be a fullScreen IME... with ExctractEditText : See this link...

    This is what i usualy have seen in other apps... i don't think the autocompletetextview can be inverted and appears on top of the view, but what's strange is that it usually shows on top of the keyboard not bellow...

    0 讨论(0)
  • 2020-12-30 20:37

    Use a ScrollView for the layout where your Autocomplete resides and Voila!

    0 讨论(0)
  • 2020-12-30 20:38

    Does your Activity adjustResize?

    android:windowSoftInputMode="adjustPan|adjustResize"
    

    reference: Move layouts up when soft keyboard is shown?

    0 讨论(0)
  • 2020-12-30 20:42

    Use

     android:windowSoftInputMode="adjustPan|adjustResize"
    
    0 讨论(0)
  • 2020-12-30 20:45

    Simply limit the drop-down height.

    android:dropDownHeight="200dp"

    Then results don't hide by the soft keyboard.

    Or else do this

    The theory says that android:windowSoftInputMode="adjustPan|adjustResize" should do this but for some reason, it doesn't, so you have to do the same programmatically:

    getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);

    0 讨论(0)
  • 2020-12-30 20:47

    I had the same problem with this a little while ago. You Can try manipulating the z-index of the elements that are being hidden to force it to the top which would be your views in this case. Hope it works for you !

    0 讨论(0)
提交回复
热议问题