How to remove close button from popupkeyboard in android

I am setting up an Android keyboard after downloading a sample keyboard code from developer.android.com. I want to customize the layout of the pop-up window when the user has made a long press on the key onLongPress(key popupKey). In particular, I want to get rid of the close button at the end of the pop-up keys and want to close the window when the user clicks on it. But I can’t figure out how to access the popup. Please give me some advice.

+4
source share
1 answer

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!

+3
source

Source: https://habr.com/ru/post/1619198/


All Articles