我有一个弹出窗口,里面有几个EditText在ScrollView中。当我点击EditText时,它会将背景视图向上滚动,而不是弹出窗口,因此键盘会挡住EditText。
有什么想法吗?
PopupWindow popUp = new PopupWindow(this);
popUp.update(0, 0, display.getWidth(), display.getHeight());
popUp.setFocusable(true);
LinearLayout llh = new LinearLayout(this)
llh.setOrientation(LinearLayout.HORIZONTAL);
ScrollView sv = new ScrollView(this);
EditText e1,e2,e3...
llh.addView(e1);
llh.addView(e2);
llh.addView(e3);
...
sv.addView(llh);
popUp.setContentView(llh);
popUp.showAtLocation(llh, Gravity.BOTTOM, 0, 0);
这是从一个包含ScrollView的View中“启动”的。
如果有解决方法,那就太好了。