Like the picture above I hope the keyboard disappears when you click the button and the layout changes like in the picture.
Version is api19 and
for the activity in the manifest
By writing android:windowSoftInputMode="justResize"
, the layout can be changed depending on the presence or absence of the keyboard (i.e., button bars can be on the button as shown in the picture above).
And
Inside the onClick
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(writeEt.getWindowToken(), 0);```
I wrote it like this so that the keyboard can hide.
But I don't know how to fill the layout crying
It would be helpful to look at the code below to show the layout in the keyboard area.
To add a brief description, soft keyboards vary in height from phone to phone, so you need to find the height of the keyboard and set the layout to be the same size as the keyboard.
For the part that actually shows the layout (which uses PopupWindow for that code), look at the code above.
554 PHP ssh2_scp_send fails to send files as intended
757 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
546 Uncaught (inpromise) Error on Electron: An object could not be cloned
552 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.