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 takes up full screen when in adjustPan mode #474

Open
IronManIsTheMan opened this issue Oct 1, 2020 · 14 comments
Open

Popup takes up full screen when in adjustPan mode #474

IronManIsTheMan opened this issue Oct 1, 2020 · 14 comments

Comments

@IronManIsTheMan
Copy link

Reproduction

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


@mario
Copy link
Collaborator

mario commented Oct 26, 2020

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

@IronManIsTheMan
Copy link
Author

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.

@vjclassplus
Copy link

vjclassplus commented May 20, 2021

@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.

@kasra-java-node
Copy link

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

@vanniktech
Copy link
Owner

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.

@Janneman84
Copy link

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

mahibi added a commit to nextcloud/talk-android that referenced this issue Apr 6, 2022
emoji picker SOMETIMES opens in full height.
this is a bug inside the emoji picker lib, see vanniktech/Emoji#474

Signed-off-by: Marcel Hibbe <[email protected]>
mahibi added a commit to nextcloud/talk-android that referenced this issue Apr 8, 2022
emoji picker SOMETIMES opens in full height.
this is a bug inside the emoji picker lib, see vanniktech/Emoji#474

Signed-off-by: Marcel Hibbe <[email protected]>
AndyScherzinger pushed a commit to nextcloud/talk-android that referenced this issue Apr 9, 2022
emoji picker SOMETIMES opens in full height.
this is a bug inside the emoji picker lib, see vanniktech/Emoji#474

Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
@mahibi
Copy link

mahibi commented Apr 25, 2022

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

@vanniktech vanniktech reopened this Apr 25, 2022
@vanniktech
Copy link
Owner

@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

@mahibi
Copy link

mahibi commented May 12, 2022

with toggle() the bug occurs again

@ofcosar
Copy link

ofcosar commented Jul 14, 2022

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()

@gcgrant
Copy link

gcgrant commented Apr 11, 2023

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.

@waleedtalha
Copy link

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.

@vanniktech
Copy link
Owner

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

@gao746700783
Copy link

I've recently encountered a similar issue, and one possible scenario is as follows: the soft'keyboard doesn't show or the state is abnormal when the popup pops up.

Repository owner deleted a comment from Aster0 May 19, 2024
Repository owner deleted a comment from urvish91 May 19, 2024
Repository owner deleted a comment from kevinarch May 19, 2024
Repository owner deleted a comment from ibrahim-sdsol May 19, 2024
Repository owner deleted a comment from vjclassplus May 19, 2024
Repository owner deleted a comment from payaladbiz May 19, 2024
Repository owner deleted a comment from payaladbiz May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests