Emoji icon indicating copy to clipboard operation
Emoji copied to clipboard

Popup takes up full screen when in adjustPan mode

Open IronManIsTheMan opened this issue 5 years ago • 14 comments

Reproduction

With this code <activity android:name=".CustomViewActivity" android:windowSoftInputMode="stateVisible|adjustPan"/> it shows:


IronManIsTheMan avatar Oct 01 '20 13:10 IronManIsTheMan

Can confirm this issue too.

Aster0 avatar Oct 10 '20 00:10 Aster0

What android version, what device, give us sample code so we can reproduce.

mario avatar Oct 26 '20 15:10 mario

What android version, what device, give us sample code so we can reproduce.

Hi Mario, thank you for checking. The issue can be easily seen when using adjustPan to configure activity in AndroidManifest.xml, like the above code snippet shown: <activity android:name=".CustomViewActivity" android:windowSoftInputMode="stateVisible|adjustPan"/> per our team's testing, it happens generally to many devices and pixel emulators too. Hope this makes sense.

IronManIsTheMan avatar Oct 28 '20 11:10 IronManIsTheMan

I am facing same issue.

urvish91 avatar Dec 01 '20 10:12 urvish91

any new info for this issue ? i'm having the same

kevinarch avatar Jan 28 '21 03:01 kevinarch

@vanniktech i am facing same issue, i am not using any windowsoftinputmode and my device is poco x3 and android 10.

ibrahim-sdsol avatar Apr 22 '21 10:04 ibrahim-sdsol

@vanniktech I am facing this same issue when I am using this emoji popup in bottomsheet please help

payaladbiz avatar May 10 '21 05:05 payaladbiz

@payaladbiz feel free to send a PR to fix the problem

vanniktech avatar May 10 '21 06:05 vanniktech

@payaladbiz feel free to send a PR to fix the problem could you please let me know what PR mean ?

payaladbiz avatar May 10 '21 08:05 payaladbiz

@vanniktech I'm also facing the same issue. Tried with multiple devices. Redmi, oneplus and pixel emulator. The emoji keyboard opens in full screen no matter which view is passed.

vjclassplus avatar May 18 '21 10:05 vjclassplus

@vanniktech found out why this is happening in my case. it is because of this flag on oncreate : if I remove this. it is working as expected. Hope this helps for anyone who is looking for an answer. window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)

Edit: This is how I'm achieving full screen :

 val decorView = window.decorView
        decorView.setOnSystemUiVisibilityChangeListener { visibility ->
        if (visibility and View.SYSTEM_UI_FLAG_FULLSCREEN == 0) {
                // The system bars(Status bar) are visible. Make any desired
                //add a delay here before executing below code so that it doesn't instantly
                //close the status bar
                window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
            } else {
                // The system bars(Status bar) are NOT visible. Make any desired
            }
        }

This hides the status bar which gives full screen appearance.

vjclassplus avatar May 20 '21 07:05 vjclassplus

Hi friends, I also had this problem until I put the following code in the manifest android class:

<Activity android: name = ". Register" android: label = "@string/app_name" android: windowsSoftInputMode="adjustResize"

I hope this code helps those who have this problem

kasra-java-node avatar May 22 '21 14:05 kasra-java-node

I'm closing this issue due to inactivity. If you have any further input on the issue, don't hesitate to reopen this issue or post a new one.

vanniktech avatar Jun 27 '21 18:06 vanniktech

I have the same issue on Chromebook. It's probably because it has a hardware keyboard, so the soft keyboard never shows.

Janneman84 avatar Dec 06 '21 15:12 Janneman84

i didn't figure out why this issue happens so i made a workaround. maybe this workaround helps someone to understand the root cause 🤷‍♂️

mahibi avatar Apr 25 '22 10:04 mahibi

@mahibi can you try using toggle() in your example?

Screen Shot 2022-04-29 at 11 21 16

Looking at the code there's a requestApplyInsets call that we don't do when you're doing start/show manually

vanniktech avatar Apr 29 '22 09:04 vanniktech

with toggle() the bug occurs again

mahibi avatar May 12 '22 18:05 mahibi

the problem still continues for version 0.15.0 when ı downgrade the library to 0.6.0 then android studio gives an error for androidx

note if you wanna a tricky method, before starting to write anything show and dismiss then do what you want. emojiPopup.show() emojiPopup.dismiss()

ofcosar avatar Jul 14 '22 08:07 ofcosar

I see this problem on version 0.16.0 of the library as well. Sometimes when opening the popupWindow for the first time, it looks just like the screenshot in the OP instead of the proper height.

gcgrant avatar Apr 11 '23 00:04 gcgrant

I was facing the same issue. In my case, i firstly open the keyboard then toggle() the EmojiPopup and its not takes the full screen.

waleedtalha avatar May 26 '23 12:05 waleedtalha

I can't reproduce this but I'd be happy to take a PR that fixes this

vanniktech avatar Dec 10 '23 16:12 vanniktech