Android softkeyboard popup view on key long press

后端 未结 1 1621
暖寄归人
暖寄归人 2021-02-06 07:49

I am developing Android soft keyboard:

public class CustomKeyboard extends Keyboard{...}  

    public class CustomKeyboardView extends KeyboardView{...}

    pu         


        
相关标签:
1条回答
  • 2021-02-06 08:13

    I think you will need to create your own popup in this case, using PopupWindow or Dialog.

    then you go into your keyboard and overwrite your onRelease method, like this:

    @Override
    public void onRelease(int primaryCode) {  
        myPopupWindow.dismiss();
    }
    

    To make your own popupWindow for keyboard see this thread: Android custom keyboard popup keyboard on long press

    0 讨论(0)
提交回复
热议问题