I finally understood everything myself and want to share with everyone who is interested. I could not get the close button and get rid of it. But the easiest way is to create a PopupWindow with several buttons whose shortcuts are pop-up characters taken from the key parameter passed to onLongPress (). Thus, I was able to display only pop-up characters and close the window when the user selects them or clicks outside the window.
Hurrah!
source
share