How to show my layout in front off soft keyboard Android?

968 Views Asked by At

How to show my layout in front off soft keyboard Android like whatsapp or facebook? like this

enter image description here

thanks before

this my code, but when emoji layout show, soft keyboard close.

btn_pop_emot.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View arg0) {

            if (listEmot.getVisibility() == View.VISIBLE) {
                listEmot.setVisibility(View.GONE);
                imm.toggleSoftInputFromWindow(
                        edt_pop_komen.getApplicationWindowToken(),
                        InputMethodManager.SHOW_FORCED, 0);
                btn_pop_emot.setBackgroundResource(R.drawable.emot_anim);

            } else {
                listEmot.setVisibility(View.VISIBLE);
                imm.hideSoftInputFromWindow(edt_pop_komen.getWindowToken(),
                        0);
                btn_pop_emot.setBackgroundResource(R.drawable.keyboard);

            }

        }
    });
1

There are 1 best solutions below

0
On

You can use this library, it also contains sample code in README to get you started https://github.com/ankushsachdeva/emojicon