需要建议在android中实现列表。请...

时间:2013-09-13 10:52:44

标签: android android-layout android-intent android-listview android-emulator

我有一个包含20行的ListView控件,每行包含EditText。在我的情况下,当键盘打开时,前7行是可见的。考虑我选择任何EditText,在8到20的任何行中,所选行将位于键盘正上方。 Then I tries to type on keyboard, the ListView moves to top and the row containing the EditText in which I was editing should be hidden by the keyboard

Actually I want the row should be in same position just above the keyboard even while typing on keyboard

Screen1 : Screen seems like this when opened

Screen2 : When row #9 is selected, seems fine as the selected row came just above the keyboard

Screen3 : While typing on keyboard, screen seems like this as the list scrolls to top

Screen4 : On hiding the keyboard, screen seems like this with entered text

Screen seems like this when opened

When row #9 is selected, seems fine as the selected row came just above the keyboard

While typing on keyboard, screen seems like this as the list scrolls to top

On hiding the keyboard, screen seems like this with entered text

请告诉我解决方案..请

2 个答案:

答案 0 :(得分:0)

我希望这会对你有所帮助。在manifest.xml特定活动中添加此代码。

android:windowSoftInputMode="adjustPan"

答案 1 :(得分:0)

将以下行添加到manifest.xml中的活动

android:windowSoftInputMode="stateAlwaysHidden|adjustResize"