3
我有一個彈出窗口,其中包含一個滾動視圖中的幾個EditTexts。 當我點擊一個EditText時,它在後臺向上滾動視圖,而不是彈出窗口,因此鍵盤會阻止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。
如果有解決方法,這將是很好的。
將嘗試與我的自定義對話框之一,thx – stefple 2012-07-09 21:00:43
工程,再次感謝 – stefple 2012-07-09 22:57:18
很高興我可以幫助:-) – Angelo 2012-07-10 04:58:47