I'm using a TextIpnutLayout that holds an EditText.
When I'm showing the keyboard the main layout raises until its bottom is aligned with the keyboard (Which android:adjustPan suppose to do), but its over the TextInputLayout's error strip, so it does not show.
Is there a way to make the keyboard aligned to the layout?
Related
I have a requirement to show an editText on top of keyboard when the keyboard opens. But at the same time I have to hide the bottom tab navigation view on my fragment screen. It should be behind the keyboard.
I have tried multiple combinations for android:windowSoftInputMode but in some cases, either the EditTexts is not displayed or the entire screen is showing on top of keyboard.
Is there a way to keep the screen view as it is and open the keyboard with EditText on top of it.
Some of my activities are made up of 3 fragments in a vertical layout (Top, middle and bottom)
The middle fragment is the only one that is wrapped in a scrollview. The top and bottom fragments are static. The bottom fragment has the edit text controls for user input. Weighting for fragments from top to bottom are .1, .6 and .3
When the soft keyboard comes up for user input, it covers the edit text fields the user needs to enter text in. It seems that the fragments move up, but not enough and half of the bottom fragment is covered by the keyboard. I used multiple switches with the windowSoftInputMode attribute and none seem to work.
windowSoftInputMode="adjustResize|stateHidden"
windowSoftInputMode="adjustPan"
How can I guarantee that at least the bottom fragment is completely visible when the soft keyboard is displayed? What do I have to do?
I got this working fully with XML. If you are looking to:
Not have the soft keyboard come up when an activity starts
Not have the soft keyboard hide any editText on the page (even with fragments)
Enter the following in your AndroidManifest.xml file for the activity that you wish to do the above to.
android:windowSoftInputMode="stateHidden|adjustPan"
You should add this to your manifist.xml file.
android:windowSoftInputMode="adjustResize"
I have an interface layout (fragment) with a multi line TextEntry field at the bottom a few levels from the root container of the layout in a container with some buttons. When the text entry gets focus, I have it set to show the virtual keyboard and have it set to the "scroll window up" instead of the "resize" behavior so when the keyboard comes up the window is supposed to be "pushed up" above it.
My intention is to have the keyboard push up the window and leave the bottom of the window (same as bottom text entry widget) aligned with the top of the keyboard.
Instead, the behavior I get is the window is scrolled up such that the text baseline of where the cursor is (at touch that initiated focus) is scrolled to the top of the keyboard.
If I change the cursor position (touch or type) it re-scrolls the window to keep the cursor base line at the top of the keyboard.
This is not what I want - what I want for the bottom of the widget to be aligned with the keyboard and for for it to stay put at that alignment no matter where the cursor is inside the text entry widget.
I have found no references to this baseline seeking behavior in the docs so far and have found no references to how to control it.
I would like to be able to set an "alignment position" relative to the window's layout for here it should scroll the window to and simply specify it and have it work if I could.
Any hints - or even real answers?
I implemented a custom keyboard in my app according this tutorial (http://www.fampennings.nl/maarten/android/09keyboard/index.htm) and I'm having some layout problems with the keyboard. When I use the soft keyboard the content layout scrolls up and appears the keyboard, but when I use my custom keyboard the content layout don't change and the keyboard layout appears over the content layout. How to resolve this? I want the content layout scrolls up.
See the image: Image
I have a view that has a ScrollView as root layout that has a background set.
When the keyboard pops up, I want the ScrollView to shrink so that it stays above the keyboard, but I want the background image to stay the same. It currently shrinks with the view.
I know I need to use adjustResize to keep the ScrollView on top and I can switch to adjustNothing to get the ScrollView behind the keyboard, but that way I would have EditTexts behind the keyboard.
Any idea/help is welcome!
Basically, I want the adjustResize behavior with the background acting as in adjustNothing.
Here are some screenshots: