How can i create a sticky footer that wont be moved up with the view when the softkey keyboard popups up?
Below is an image example of my current setup and what i want to achieve. I have a scrollview that contains my page content and a linearlayout that is aligned to the parent bottom that acts as a nav bar.
Problem is that when the keyboard popups, it pushes my entire view up, including the bottom nav section. I do not want to disable the automatic pushing up of the view (by setting android:windowSoftInputMode="adjustPan"
) but rather exclude a single element from being pushed up, my bottom nav bar.
I have tested the windowSoftInputMode fix but it hides my page content behind the keyboard. Is there a way to have it continue pushing up the scrollview but not the bottom nav? My other option was to set visibility:gone
on keyboard up and then reshow it on keyboard down, but that seems overly complicated and not always reliable from what i read.
If anyone has any examples or suggestions, i'm all ears. Thanks.
To set the navigation bar at bottom, use position: fixed property, with bottom property.
I just came across the same problem where my bottomNavbar is moving up with the keyboard when the keyboard is enabled. I solved it by checking if the keyboard is open or not. If it is open, just hide the disable the bottomNavbar and when it is closed, it's time to enable the navbar..
Set fitsSystemWindows = "false" and set android:windowSoftInputMode="adjustResize" in manifest file. Show activity on this post. I have used like this to show the soft keyboard programatically and this is worked for me to prevent the auto resize of the screen while launching the keyboard.
Either add this as scrollbar's XML attribute
android:isScrollContainer="false"
or add this in Activity's tag in Manifest
android:windowSoftInputMode="adjustPan"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With