如何在键盘弹出时冻结列表视图滚动,然后在隐藏键盘后重新滚动。我似乎无法从任何地方开始
问问题
59 次
1 回答
0
在 On ScrollState Change 检查键盘是否打开:
public void onScrollStateChanged(AbsListView view, int scrollState) {
//check keyboard is open?
InputMethodManager imm = (InputMethodManager) getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm.isAcceptingText()) {
writeToLog("Software Keyboard was shown");
} else {
writeToLog("Software Keyboard was not shown");
}
}
并停止列表视图
listView.setScrollContainer(false);
于 2013-10-21T16:42:49.313 回答