ankushsachdeva / emojicon

Android library to show emojicon dialog box over soft keyboard
283 stars 149 forks source link

Popup Emoji above softkeyboard #20

Open tuhin10 opened 9 years ago

tuhin10 commented 9 years ago

Instead of showing just over the softkeyboard emoji popup is being shown just above the keyboard. screenshot_2015-05-11-01-47-37

kaushik-mota commented 9 years ago

Same thing happened with me.

surajnavkudkarpersonal commented 9 years ago

I have same issue on some devices device-2015-07-16-163459

cristiano939 commented 9 years ago

Same issue here! But only when the activity is going to background

remon commented 9 years ago

did any one fix this problem ?

remon commented 8 years ago

if anyone fixed it please tell me

pdee2131 commented 8 years ago

Hi oh okay will do that ASAP

Divine Pdee Asiedu P.O.Box STC 73, Accra-North, 00233273772879 @pdee2131 pdee asiedu

On Wed, Nov 25, 2015 at 3:31 AM, Reymond notifications@github.com wrote:

if anyone fixed it please tell me

— Reply to this email directly or view it on GitHub https://github.com/ankushsachdeva/emojicon/issues/20#issuecomment-159478147 .

remon commented 8 years ago

@pdee2131 ,I hope so

remon commented 8 years ago

@tuhin10 , @Kaushik-M , @suraj9781 ,did you fix it cause I am struggling with the same problem for 2 months now

pdee2131 commented 8 years ago

Hi Reymond ,

I have still not figured it out so i just released the app, but it currently supports android emoji's for now, which is compatible for devices KITKAT and above since those devices already have their own emoji's keyboard....You can contact me if you still need any help

Divine Pdee Asiedu P.O.Box STC 73, Accra-North, 00233273772879 @pdee2131 pdee asiedu

On Wed, Dec 2, 2015 at 7:08 PM, Reymond notifications@github.com wrote:

@tuhin10 https://github.com/tuhin10 , @Kaushik-M https://github.com/Kaushik-M , @suraj9781 https://github.com/suraj9781 ,did you fix it cause I am struggling with the same problem for 2 months now

— Reply to this email directly or view it on GitHub https://github.com/ankushsachdeva/emojicon/issues/20#issuecomment-161400863 .

mansoorahmadsamar commented 8 years ago

I'm having the same problem, if anyone figure it out please let me know

pdee2131 commented 8 years ago

Yhh the problem is still there for me too but i have seen that Whatsapp implemented it and it works so am still trying to figure it out

Divine Pdee Asiedu P.O.Box STC 73, Accra-North, 00233273772879 @pdee2131 pdee asiedu

On Wed, Jan 6, 2016 at 9:59 AM, mansoorahmadsamar notifications@github.com wrote:

I'm having the same problem, if anyone figure it out please let me know

— Reply to this email directly or view it on GitHub https://github.com/ankushsachdeva/emojicon/issues/20#issuecomment-169281533 .

VishalJogiya commented 8 years ago

5> Use EmojiconEdittext insted of EditText and EmojiconTextView in place of TextView, thats it. And a button to show emoji popup.

6> changes that have to made at this lib are ,MainActiviy.java

emojiButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {

            //If popup is not showing => emoji keyboard is not visible, we need to show it

// //IF POPUP IS SHOWING, SIMPLY DISMISS IT TO SHOW THE UNDELYING TEXT KEYBOARD if (popup.isShowing()) { popup.dismiss(); final InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.showSoftInputFromInputMethod(emojiconEditText.getWindowToken(), InputMethodManager.SHOW_IMPLICIT);

            } else {

                final InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
                inputMethodManager.hideSoftInputFromWindow(emojiconEditText.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY);

                changeEmojiKeyboardIcon(emojiButton, R.drawable.ic_action_keyboard);
                popup.showAtBottom();

// emojiconEditText.setFocusableInTouchMode(true); // emojiconEditText.requestFocus();

            }
        }
    });

b> Add This code into onCreate method of mainactivity.java

popup.setOutsideTouchable(true); popup.setFocusable(true); popup.getContentView().setFocusableInTouchMode(true); popup.getContentView().setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { popup.dismiss(); return true; } return false; } });

c> delete onSoftKeyboardListener method implementation from EmojiPopup in mainactivity.java.

d> Inside EmojiconPopup.java constructor change

I>setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); II>public void showAtBottom(){ showAtLocation(rootView, Gravity.BOTTOM, 0, -1); }

ankush19902 commented 8 years ago

i dont think it worked as the editext gets hidden. It position itself at the bottom and pop cover that view. So its just pop up which align itself to bottom. @VishalJogiya

pdee2131 commented 8 years ago

Woow that's soo great to hear will try and implement it soon

Divine Pdee Asiedu P.O.Box STC 73, Accra-North, 00233273772879 @pdee2131 pdee asiedu

On Thu, Feb 4, 2016 at 2:24 PM, ankush19902 notifications@github.com wrote:

i dont think it worked as the editext gets hidden. It position itself at the bottom and pop cover that view. So its just pop up which align itself to bottom. @VishalJogiya https://github.com/VishalJogiya

— Reply to this email directly or view it on GitHub https://github.com/ankushsachdeva/emojicon/issues/20#issuecomment-179867387 .

gitbiraz commented 8 years ago

its not working. please provide another solution

ductranit commented 8 years ago

This issue is fixed on my side by change setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); to setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN) in EmojiconsPopup