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?
Related
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 !
I have searched for various answers for this particular problem but could not find one. I am developing an android application and I am currently up to arranging the layouts.
My problem is when a soft keyboard opens up in a form containing lots of input fields, the buttons at the bottom also keeps coming up. What I want is the buttons should not come up and along with this the form should be scrollable to bottom of the layout while the soft keyboard is still visible.
Before I was trying lots of modes combinations for windowSoftInputMode inside AndroidManifest.xml in the respective activity, but could not get any satisfactory result.
Screenshots:
The normal form (shown the bottom part) looks like this:
When the soft keyboard opens up, it cuts the lower portion i.e. I am unable to scroll the layout further.
I somehow managed to remove the buttons using following code, I do not know whether this is correct or not:
<activity
android:name=".usermanagement.SignUp"
android:label="साइन अप"
android:windowSoftInputMode="stateVisible|adjustPan" />
Now I am wondering whether I can scroll to the bottom of the layout while keeping the soft keyboard active and not showing the buttons(Home button and Next button)
I looked for the question everywhere on the Internet but can't find the answer. What I found is to hide the whole button tray all together.
When the keyboard is down, the button is shown as in the picture.
But when the keyboard is showing the icon changes to -
My problem is to change the button (as in the second image), when my emoticons are showing. So, is there any way by which I can programatically change the button on an event and change it back on another event?
I'm afraid this is not possible yet. Perhaps this will be implemented in later versions of Android.
Not all devices have an onscreen navigation bar, a lot of devices still have hardware buttons.
Nevertheless, you'll might find this article interesting: http://arpitonline.com/blog/2014/07/27/improving-androids-navigationbar/
Look at this...
This is the main screen of the android app I'm developing. When user touches first EditText, the system keyboard shows like this:
But when user touches second EditText, the keyboard shows like this:
Without that black bar on top of it... Does anyone knows why is this? I'm working with a Samsung Galaxy Nexus... Besides... I noted that the keyboard is displayed on top of GUI... but in another screen of my app the keboard makes the GUI to roll up, like this:
In this last image, on top of the three buttons is a ScrollView, is this the reason for the keyboard make this effect?
Can anybody help me here? I'm stuck!
Thanks!
I would like to remove the navigation buttons at the bottom of the soft keyboard ( the buttons with the arrow- they act like a tab key to move between fields). I have had no luck trying to find a way to do this. Does anyone have any suggestions
What you're describing is device-specific, as each device has its own default soft keyboard. Unfortunately, you'll need to make a custom keyboard.
Look at the Keyboard class.
I don't believe it's possible to remove the button from the keyboard, but you can at least specify which neighbor the field gives focus to. See Handling UI Events on the Android Dev Guide.
Perhaps it's possible to set nextFocusDown to nothing, so the keyboard doesn't let the user navigate in that fashion. If that doesn't work, you might consider setting the field that takes focus next to setFocusable(false).