adjustResize"

问题描述 投票:30回答:8
Which will auto resize and adjust the soft keyboard.

autocompletetextview ArrayAdapter<String>Usetextview

autocompletextviewSimply limit the drop-down height.autocompletetextviewThen results don't hide by the soft keyboard.

    airline = (AutoCompleteTextView)findViewById(R.id.airline);
    airline.setAdapter(new ArrayAdapter<String>(this, R.layout.autcomplete_dropdown, AIRLINES_AUTOCOMPLETE_ARRAY));

    departLocation = (AutoCompleteTextView)findViewById(R.id.departLocation);
    departLocation.setAdapter(new ArrayAdapter<String>(this, R.layout.autcomplete_dropdown, LOCATIONS_AUTOCOMPLETE_ARRAY));

    arriveLocation = (AutoCompleteTextView)findViewById(R.id.arriveLocation);
    arriveLocation.setAdapter(new ArrayAdapter<String>(this, R.layout.autcomplete_dropdown, LOCATIONS_AUTOCOMPLETE_ARRAY));
Or else do this
android autocompletetextview
8个回答
5
投票


3
投票

it is really working

android:windowSoftInputMode="adjustPan|adjustResize"

我有三个

的,我把它的适配器设置为一个

1
投票

的布局。

提示结果正在显示,但在屏幕键盘下方(我可以看到一部分)。

而不是下面?

我有3个自动完成的extview,我把它的适配器设置为一个ArrayAdapter。

用一个很简单的textview布局。自动完成textview的提示结果显示出来了,但是是在......。

1
投票


0
投票

参考。

当软键盘显示时将布局向上移动?


0
投票

创建一个输入法

 android:windowSoftInputMode="adjustPan|adjustResize"
在提交前撰写文本

0
投票

这样,建议将出现在软键盘预测上,如自动更正。另一种方法是全屏IME......用ExctractEditText来实现。

android:dropDownHeight="200dp"

请看这个链接...

这是我在其他应用程序中通常看到的...我不认为自动完成tetextview可以被反转,并出现在视图的顶部,但奇怪的是,它通常显示在键盘的顶部,而不是低音....

android:windowSoftInputMode="adjustPan|adjustResize"前不久我也遇到了同样的问题。你可以尝试操作被隐藏的元素的z-index来迫使它显示在顶部,在这种情况下,这将是你的视图。希望对你有用!

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


-2
投票

在你的AndroidManifest.xml中添加一个属性。

android:windowSoftInputMode="adjustPan"。

© www.soinside.com 2019 - 2024. All rights reserved.