A problem occurs: An Activity with only one recording button on it. A popupWindow, click the recording button, and issue a command to bring up the popupwindow. Popwindow contains an EditText. Click the text box and a soft keyboard will pop up for handwriting input. Click the speaker to switch to the voice input. You cannot close the popupwindow when switching from handwritten input to voice input. Otherwise, the content entered earlier will be gone. There is A conflict: A. If you want to pop up A soft keyboard when you click EditText, you have to set popupwinodw. setFocusable (true); B. To prevent the popupwinodw from disappearing when the speaker button outside the popupwindow is clicked, set the popupwindow. setFocusable (false) www.2cto.com. Later, I found a method: Step 1: popupwindow. setFocusable (false); Step 2: manually set the onTouch listener for EditText. The soft keyboard is displayed: InputMethodManager m = (InputMethodManager) context. getSystemService (Context. INPUT_METHOD_SERVICE); m. toggleSoftInput (InputMethodManager. SHOW_FORCED, InputMethodManager. HIDE_IMPLICIT_ONLY); however, the pop-up soft keyboard appears at the bottom layer of popupwinow and is hidden by popupwindow. Do you understand what I mean? If you do, hope to make a move !!! The following figure shows the situation