Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup Emoji above softkeyboard #20

Open
tuhin10 opened this issue May 10, 2015 · 16 comments
Open

Popup Emoji above softkeyboard #20

tuhin10 opened this issue May 10, 2015 · 16 comments

Comments

@tuhin10
Copy link

tuhin10 commented May 10, 2015

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
Copy link

Same thing happened with me.

@surajnavkudkarpersonal
Copy link

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

@cristiano939
Copy link

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

@remon
Copy link

remon commented Oct 17, 2015

did any one fix this problem ?

@remon
Copy link

remon commented Nov 25, 2015

if anyone fixed it please tell me

@pdee2131
Copy link

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
#20 (comment)
.

@remon
Copy link

remon commented Nov 26, 2015

@pdee2131 ,I hope so

@remon
Copy link

remon commented Dec 2, 2015

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

@pdee2131
Copy link

pdee2131 commented Dec 3, 2015

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
#20 (comment)
.

@mansoorahmadsamar
Copy link

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

@pdee2131
Copy link

pdee2131 commented Jan 6, 2016

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
#20 (comment)
.

@VishalJogiya
Copy link

VishalJogiya commented Feb 4, 2016

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
Copy link

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
Copy link

pdee2131 commented Feb 4, 2016

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
#20 (comment)
.

@gitbiraz
Copy link

gitbiraz commented Apr 2, 2016

its not working. please provide another solution

@ductranit
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests