Skip to content

Can't show keybord #58

Closed
Closed
@LunevNF

Description

Hello. Thanks for so good lib.
Help me to resolve this problem (as here: #28 ), please:
Board with smiles opening good, but I want to switch smiles board to keybord by second tap to button.
So, smiles board opened, I tap on button, where this code:

if (main.globals_.emojiPopup.isShowing()){
//закрыть эмоции
//main.globals_.emojiPopup.dismiss();
//показать клавиатуру
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}else{
//открыть эмоции
main.globals_.emojiPopup.toggle();
}

and I see momental keyboard blink, closing keyboard and smiles board was closed.

If I delete the code for showing keyboard and uncomment main.globals_.emojiPopup.dismiss(); , I will see good changing from smiles to keboard and back. BUT, when I close keyboard or smiles by pressing "back" and trying to show smiles by button, I will see the bug as on screen from issue #28. What me do? How to set rootView again?
Sorry for my Russian English.

Activity

LunevNF

LunevNF commented on Sep 6, 2016

@LunevNF
Author

I solve this with next hack:

    //Слушатель: Открыть панель выбора смайлов
    showEmojiBoard.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            main.helpFuncs.fastVibrate(getContext());
            if (main.globals_.emojiPopup.isShowing()){
                //закрыть эмоции
                main.globals_.emojiPopup.dismiss();
            }else{
                //закрыть клавиатуру
                InputMethodManager imm = (InputMethodManager)getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
                imm.hideSoftInputFromWindow(emojiEditText.getWindowToken(), 0);
                //открыть эмоции
                main.globals_.emojiPopup.toggle();
            }
        }
    });
vanniktech

vanniktech commented on Sep 7, 2016

@vanniktech
Owner

Have you looked at the sample and does that work?

LunevNF

LunevNF commented on Sep 7, 2016

@LunevNF
Author

Yes, not only look. I use example, but example work good only with code in my onClickListener. Without this, example can only show smiles board.

vanniktech

vanniktech commented on Sep 7, 2016

@vanniktech
Owner

Which device are you using and does it have a custom keyboard?

LunevNF

LunevNF commented on Sep 7, 2016

@LunevNF
Author

Sony Ericsson Xperia mini sk17i (android 4.0.4) without custom keyboard and Samsung Galaxy S3 without custom keyboard

vanniktech

vanniktech commented on Sep 7, 2016

@vanniktech
Owner

I do know that there seems to be something mixed up in some cases and on some devices I just can't never reproduce it hence I don't know what's going on.

Adding that logic may work for that particular device however it can break many more devices.

vanniktech

vanniktech commented on Nov 19, 2016

@vanniktech
Owner

I'll close this as this should be fixed with 0.4.0-SNAPSHOT. If it isn't please create / reopen the issue. I'll cut a release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Can't show keybord · Issue #58 · vanniktech/Emoji