-
Notifications
You must be signed in to change notification settings - Fork 6
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
Edit screen: add emoji compat #49
Edit screen: add emoji compat #49
Conversation
…le demo EmojiCompat app
…plication instance when it's ready
Note: while using |
@mzorz I tested this one and #55 and I have a bunch of questions 😀 IIRC we discussed these PRs and you mentioned that they're not adding support for missing emojis (since we're still reliant on Testing However, when running this branch nothing seems changed. I was also curious what would happen on a device with no Google APIs so I tried on an emulator. Neither branch shows the modified emoji - I guess this is expected. Something we may need to consider for markets without Google Play. |
Oh that's an interesting observation, I think I didn't notice that before
You're totally right I forgot to add steps to test here. I tested by adding breakpoints in the callbacks to make sure the font downloader callbacks were being called, and the Currently looking into this, will loop back 👍 |
You can test the changes on this Pull Request by downloading the APK here. |
…efault style on the widgets we use
Tried by using this in the EmojiCompat configuration:
The second line paints the background for the Why aren't these recognized as Emoji? Let's see. Looking further down into Made this change in commit fe49ad2 and now it works as expected 👍 So, this is how it looks now: I think we can merge this PR if it looks good to you @aforcier , and close #55 (which helped me a lot in understanding how all of this works but this current PR is preferred given it's the recommended way to handle things today). Let me know! |
Confirming that it's working correctly now 👍 your explanation makes sense, let's merge this and close #55, we can revisit it later if it comes up for some reason. |
This PR implements
EmojiCompat
so to be able to have emojis on devices that may not have support for them on their installed Fonts.I explored an alternative PR in #55, but I think this one is a mergeable candidate given it uses the latest
EmojiCompat
library which is supposed to encapsulate the problems #55 tackles separately (downloading the fonts, then using them).Let's keep #55 as an exploration, can probably close it as well if this one proves to be working fine.
Resources:
androidx
package now, but the core mechanism still is the same) https://developer.android.com/guide/topics/ui/look-and-feel/emoji-compat#using-widgets-with-appcompatDidn't know which the needed replacement for the 28.0.0 support library was, but using jetpack it was enough to declare
EmojiCompat
inMainActivity
and then let the IDE add the correct dependencies.Basically followed the sample app https://github.com/googlesamples/android-EmojiCompat and implemented the core parts here.
Notes:
FontRequest
are borrowed from Google's EmojiCompat sample app, I haven't found anywhere in the docs that these should (or should not) be the ones to be used, but judging from the package names it looks like these certs should correspond to Google's, as this is how the call looks like:Note on this: these are indeed the same ones that Android Studio adds to your project when following the steps described in #55, so these are 👍
Noto Color Emoji Compat
, the information on which can be found here: https://www.google.com/get/noto/help/emoji/ToDo:
move thedone in d8ddc62initEmojiCompat()
method from MainActivity to theApplication
instance when Intro: Use SharedPreferences to track when to show intro flow #47 gets merged