Android PopupWindow is hidden behind navigation buttons in Nexus 5 - android

I have created a custom popup menu which is displaying fine on the S4 but the problem is that part of it gets hidden behind the navigation buttons on Nexus 5.
I have tried using the setSystemUiVisibility() but that doesn't help as the buttons reappear as soon as I touch the view.
I have tried looking for an answer but haven't had any luck.

The amount of content in your PopupWindow likely exceeds the screen real estate. Consider using a ScrollView in your PopupWindow's inflated layout.

Related

Material card with align_parent_bottom overlaps navigation buttons

So the issue i have is that on Samsung devices and on the Emulator on API 25, my material card is only shown in half, somehow overlapping the navigation buttons.
It is aligned using android:layout_alignParentBottom="true"
But when i tap on the edit text and the soft keyboard shows, the card is shown properly on top of it, and after closing the keyboard everything is shown properly.
The thing is... this doesn't happen on every device or even on the emulator on a greater API.
I will attach the xml code and some links to the screenshots since i don't have enough reputation to have pictures embedded.
First image with the issue in place
With keyboard shown
After keyboard is closed
It had nothing to do with the layout file, it happened purely because i had a postPoneEnterTransition() in the fragment. After i deleted it, the problem was fixed.

How to always show bottom bar over popup virtual keyboard

I am using Delphi XE 8 to build Android app and I have a form that have two buttons at the bottom like this one
How I make sure these buttons still visible when the virtual keyboard appear and position back to the bottom when the keyboard disappear ?, effect would be like this screen:
Please take a look at Embarcadero example: FMX.Mobile.ScrollableForm Sample
and add an extra TLayout with bottom buttons (cancel/continue) - the position of this layout should be assigned according to bounds from VirtualKeyboardShown event handler. There is also another, similar example called KeyboardToolbar. The examples can be also found in "c:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\Object Pascal\Mobile Samples\User Interface\"

Android soft keyboard not panning web view

The original problem I am fighting is more complex but for investigating purposes I have simplified the test case to the following:
Single fullscreen activity
Programmatically created web view that occupies roughly half of the horizontal screen space, 90% of the vertical space and is added to the root view via within the onCreate call:
ViewGroup parent = (ViewGroup) getWindow().getDecorView().getRootView();
parent.addView(myWebView);
web view opens to google.com via:
loadUrl("http://google.com")
AndroidManifest.xml has the property:
"android:windowSoftInputMode="adjustPan"
When clicking on the search box on the google page the keyboard pops up but the web view itself is not shifted up as adjustPan indicates should happen. The main activity also has a native text field that when clicked will shift the entire layout (including web view) up as expected.
The behavior is present on 4.2.2 on both a Nexus 7 and Galaxy Nexus.
So the question is how can I have the windowSoftInputMode property adjustPan be applied correctly to a web view instance so that when the soft keyboard is displayed the entire web view is shifted up by the vertical space taken up by the keyboard.
Before I go down the road of trying to manipulate the layout manually within onMeasure I want to see if there is a consistent / better way to handle this. The browser obviously handles this situation correctly so not sure why the web view is not able to handle this.
One thing to note is that making the web view fullscreen or a separate activity are not possible options due to an existing architecture that I am not able to change.
If we use the full screen without action bar adjustResize will not work. See this thread for details adjustPan not preventing keyboard from covering EditText

Webview moves up when keyboard hides

The issue happens in an application whith a linear layout that divides the screen in two parts, the upper part is a simple View and the lower part is a WebView that loads google.com. The WebView takes the 60% of the space and the View the other 40%. In that scenario I touch the google search bar showing the soft keyboard, inmediately I touch the WebView outside the search bar just at the right of the search button, that hides the soft keyboard but just before this the WebView moves up for an instant and comes back to its initial position as the keyboard dissapears, no idea of why this happens and how to avoid it.
Please see the sample application, to reproduce the issue you can use a WVGA (800×480) simulator, I noticed the issue in a Samsung Galaxy Tab 10.1.
http://www.fileserve.com/file/txC3RV6/WebViewDemo.rar
Any suggestion?
Thanks for your time.
Goyo.
If you put the entire linear view inside the scrollview then the webview wont move up.

Keyboard layout hiding android action bar?

In my Android application running in a XOOM device, when I click in an Edittext the keyboard opens and hides the Actionbar. I don't want this to happen, how can I solve this? This is done by the Google Contacts app for the tablet for example.
EDIT:
I have several edittexts in which the user needs fo fill. At first, when the user clicked on one edittext on the bottom, the keyboard showed up and hide the edittext in which the user was typing, so he couldn't see what he was typing. I found it really bad, and to solve it I just added to the manifest: android:windowSoftInputMode="stateVisible|adjustPan"
But after that, now the screen adjust itselfs and hides the action bar.
The Google Contacts app does the same, but it magically doesn't hide the Action bar. How do they do it?
Use adjustResize instead of adjustPan. The framework will always try to keep the focused element on-screen by scrolling any parent views if necessary.
If your EditText field is not nested in some sort of scrolling container such as a ScrollView then your layout may be too tall to completely display when the keyboard resizes your activity. Try wrapping your form's layout in a ScrollView. This will also allow your app's content to scroll if it is running on a smaller screen device where it may have similar issues.

Categories

Resources