Android - focus an input textfield inside a webview - android

I have a problem to focus an input textfield inside a webview. In the webview a text input field is shown. If you click inside, the keyboard opens and the navigationbar is shown as required. The problem is, that the keyboard hides the input textfield. You can enter the text but you don´t see the input, until you scroll down.
Is there a way to resize the webview so the input text field is shown or to automatically scroll to the textfield?
The immersive mode (for usability reasons - required) is used, so I can´t set the windwoSoftInputMode flag to adjustResize.

Related

Give EditText focus without showing the soft input

I have an EditText configured in the following way because I have a custom keyboard to display:
binding.editText.showSoftInputOnFocus = false
It works alright but I want to give the focus to the field when I load the screen, so I'm doing the following in my onStart method:
binding.editText.requestFocus()
When I do this the default keyboard unfortunately shows and hide my custom keyboard.
How to give the focus to the EditText without showing the soft input?

Preventing full screen keyboard: pull up EditText so it is visible

I have a horizontal only, full screen activity in my android app. In this activity, I need to disable full screen keyboard in some EditText elements so that the user can see the EditText while typing.
I disabled the full screen keyboard by adding following to EditText xml.
android:imeOptions="flagNoExtractUi"
When I touch the EditText for the fist time to enter text into it, the screen gets pulled up (keyboard comes up from bottom) so that EditText is visible while typing. After entering text and closing the keyboard, while the EditText is still having focus, if I touched it again to do some correction to the text entered, it doesn't get pulled up as it did before (Edit text is covered by keyboard). So I cannot see what is in the text box while typing. I'm not sure whether this is the default behavior since user has no idea what he is typing in this situation.
Is there a some way to get the screen to always pull up so it is visible?
use edittext in ScrollView and android:fillViewport="true" on the ScrollView. That's the better solution.

adjustPan: set the view to pan to

I have a popup that has a multi-line edit text and can appear at arbitrary position atop my application. Currently I have implemented it as a transparent activity. When the keyboard is shown over the popup, it jumps up and the current line is shown above the keyboard (I have the adjustPan flag set).
Now, I want the whole popup to go up and show above the keyboard, not only one line of text box. I was able to achieve this by moving focus to the whole layout when the EditText is focused, but then, well, the EditText loses focus, and I cannot type. Is there any other way way to do this? Or is there a way to focus a view without losing focus on another?

Managing Layout with soft input keyboard android

I have an edit text located at the bottom of the screen.when edit text is focused i want to move only edit text along with soft input keyboard leaving remaining views position unchanged. window soft input mode resize and adjust doesn't work for situation because both affects other views.I wanr only my edit text alone tobe repositioned above softkeyboard .
Note:The above said behaviour is done in facebook commentbox android

Textfield in WebView in an Android is hidden by the keyboard

When I touch the html textfield, the soft keyboard pops up, and hides the textfield, so that I was not able to see what I had typed.
How to add vertical scroll for scrolling hidden content?
you have to declare soft keyboard value appropriately in AndroidManifest.xml
Here is link for reference of values need to be set
http://developer.android.com/guide/topics/manifest/activity-element.html
check "android:windowSoftInputMode" in above link

Categories

Resources