ankushsachdeva / emojicon

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

Android Lollipop compatibility #6

Closed rootd closed 2 years ago

rootd commented 9 years ago

Emojicon sort of works with Android Lollipop. However I encountered two problems:

if(Build.VERSION.SDK_INT >= 5.0) { WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); Point size = new Point(); display.getSize(size); int screenHeight; screenHeight = size.y; } else screenHeight = rootView.getRootView()

popup.setBackgroundDrawable(new BitmapDrawable());

I don't know if these problems only affect my project or generally Lollipop devices. Wanted to let you know, just in case :)

guitcastro commented 9 years ago

@ankushsachdeva Did you apply this change ? I saw that you closed the issue, but I didn´t see any commit.

Regards,

Guilherme Torres Castro

ankushsachdeva commented 9 years ago

1)I am not sure if the WindowManager method would work with all values of activity.windowSoftInputMode 2)BitmapDrawable() is deprecated.

I am reopening the issue if someone could confirm for these bugs

guitcastro commented 9 years ago

I can confirm.

It´s does not happen in your example but in my application I have the exactly the same behavior describe by @rootd, although I don´t know why.

I forked your repository and applied the patch, it works great. About the BitmapDrawable been deprecated, I replace it with new ColorDrawable().

Here is the class with the patched applied : https://github.com/takenet/emojicon/blob/master/emojicon/src/main/java/github/ankushsachdeva/emojicon/EmojiconsPopup.java

ankushsachdeva commented 9 years ago

Let me test this on some other devices as well. I'll update this thread incase something comes up.

madhurtewani commented 9 years ago

I also face this issue on lollipop devices in sample application as well as my application.

iAviatorJose commented 9 years ago

I used the given by @rootd and tested it on Asus Nexus 7 and Moto g 1st Gen and it works fine.