Material card with align_parent_bottom overlaps navigation buttons - android

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.

Related

AdjustPan Android doesn't behave as I would expect

From what I could understand of the difference between AdjustResize and Adjust pan, it's that AdjustResize will change the height of all the components so that they can fit and squeeze into a "half screen" while AdjustPan will, only in the case where a view below the keyboard takes the focus, bring up this particular view so that it is accessible despite the keyboard.
However, in my case, I have a comment section which is a React Navigation view. In this view, I have a TextInput below it that must go up when the keyboard opens to write a comment. But when this TextInput goes up, it takes everything with it, including the elements of the previous view in the stack.
Picture from comment section (The gray above the keyboard is the textinput)
Picture from previous view in the stack if I go back (Only until the keyboard didblur event is sent and then everything returns to normal)
Why does the adjustPan seem to behave a bit like AdjustResize?
I've already tried to set AdjustNothing, but unfortunately it can't work because I don't receive keyboard events anymore.
I finally figured out where the problem was coming from.
I use
<SafeAreaInsetContext>
from the react-native-safe-area-context library because I need to do special management of the insets bottom for devices like iPhoneX or iPhone 11.
And in fact, when the Android keyboard opens, the insetBottom is redefined to take the keyboard size as well. So I had a padding on the bottom of my screen that was the size of my keyboard as soon as it opened. So the behavior is normal, and after correction, my AdjustPan behaves exactly as it should !

How to make in app custom keyboard behave like a system keyboard?

I have an in app keyboard that tries to behave like a system keyboard. So far it pops up from the bottom using Bottom Sheet, which is great.
However, unlike a system keyboard, it does not push the entire layout up when you select an EditText that might otherwise get hidden. So far all the solutions I saw on StackOverFlow seem to be about Soft/System Keyboard not an in-app implementation like mine.
Here is my activity with 3 Edit Texts
This is what happens if I click on the last Edit Text. It gets covered by the keyboard in blue
This is how I want it to be. Everything getting pushed up.
How can I achieve this?

Android PopupWindow is hidden behind navigation buttons in Nexus 5

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.

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.

Stopping the Android Soft Keyboard flashing black switching activities

I'm working on an app and have a small problem when the soft keyboard is shown before switching activities. This happens when:
The user hits the search button
They enter a search term, view the search in a new activity and then return to the previous page
When the user returns to the previous page, a black box flashes where the soft keyboard was and then returns to normal
If the list is turned off or empty this problem never manifests. I have tried to enable caching of the listview children, hiding the listview when the activity pauses but to no avail. I would really appreciate any insight into why this might be occuring.
Thanks,
Laurence
Thought I'd follow up.
This problem was specific to pre Android 3.0 devices. On HC, ICS and JB this is no longer exhibited. As simple way to get around this on older versions of Android is to just change the windows background to match the color of your view. It still is blanked out but no where near as noticeable as black on white.

Categories

Resources