Git Product home page Git Product logo

Comments (7)

rubengees avatar rubengees commented on May 30, 2024 1

I just had the same issue and was able to solve it.
Basically what you have to do is calling rootView.getViewTreeObserver().dispatchOnGlobalLayout() after calling emojiPopup.toggle().

Background

Internally, EmojiPopup relies on a ViewTreeObserver.OnGlobalLayoutListener to get notified when the keyboard comes into view. For some reason this does not work for all layouts and the listener never gets called. By calling rootView.getViewTreeObserver().dispatchOnGlobalLayout() we signalize the listener that the keyboard is now out ourself.

from emoji.

audax avatar audax commented on May 30, 2024 1

Thx for the fix @vanniktech! Android really is a never ending nightmare of workarounds…

from emoji.

audax avatar audax commented on May 30, 2024

We found out that the 0.2 version does not have this problem.
I think this commit broke it:
0f0b727
The listener is only attached if if (!popupWindow.isShowing()) { and before that commit the listener was attached in the constructor.

I'll bisect this bug and find out if this is indeed the commit that broke it.

from emoji.

vanniktech avatar vanniktech commented on May 30, 2024

Thanks for the detailed bug report. Yeah i also got some other issues that version 0.3.0 broke toggling. In all applications that I'm using the library everything still worked.

Did the workaround from @rubengees fix the issue?

from emoji.

audax avatar audax commented on May 30, 2024

It did indeed fix the issue. We are currently looking if there are still issues on some devices. So far it looks like the workaround is doing it's job.
Qabel/qabel-android@1cecf3f

from emoji.

vanniktech avatar vanniktech commented on May 30, 2024

Alright thanks, good to know. I'll also try to investigate further. I'm trying to once and for all try to fix this issue with 0.4.0.

from emoji.

vanniktech avatar vanniktech commented on May 30, 2024

@audax thanks again I just merged #64 which contains your fix. You can try 0.4.0-SNAPSHOT out. I'll cut a release soon.

from emoji.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.