How to show my layout in front off soft keyboard Android like whatsapp or facebook? like this
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);
}
}
});
You can use this library, it also contains sample code in README to get you started https://github.com/ankushsachdeva/emojicon