java - Android Popup with EditText, keyboard blocks text, background scrolls -


I have a popup that holds some EditTexts in ScrollView. When I click on the edit text, scrolls the view in the background, does not popup, so the keyboard blocks the editing text.

Any thoughts?

  popup window popup = new popup window (this); PopUp.update (0, 0, display.getWidth (), display.getHeight ()); PopUp.setFocusable (true); LinearLayout llh = New linerlight (this) llh.setOrientation (LinearLayout.HORIZONTAL); ScrollView sv = new ScrollView (this); Edit text 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);   

It is "launched" from a scene that also holds a scroll-wave.

If there is an alternative solution for this, then it would be great.

I have encountered a problem similar to yours, and to solve it, I created a custom Dialog and with custom theme ( R.style.ThemeDialogCustom in the following example). I have dialog.requestWindowFeature (Window.FEATURE_NO_TITLE) and dialog.setCanceledOnTouchOutside (true); Have a custom layout set with and setContentView . Something like this: dialog dialog = node dialog (activity contexts, r style.ededoogic custom); Dialog.requestWindowFeature (Window.FEATURE_NO_TITLE); Dialog.setCanceledOnTouchOutside (true); Dialog.setContentView (R.layout.custom_dialog_layout);

In other words, the above part of the code tries to replicate the behavior of a popup window .

Edit For clarification purposes, if you need to access a view that is defined in the custom layout of the dialog, you can access it in such a way Can:

  EditText e1 = (EditText) dialog.findViewById (R. id.e1);   

Hope that helps.

Comments