I have a Activity with
android:windowSoftInputMode="adjustResize"
And I have tagLayout that has two format(vertical when edittext focused, horizon when edittext unfocused), below are image:
But I want to use soft keyboard to decide whether change to vertical or horizon now, however, when I click button in tagLayout or scroll tagLayout at image2(horizon), soft keyboard disappear directly.
Is there some method to prevent soft keyboard close from click any view(or other method to prevent edittext lose focus when click button or scroll)?
Related
For example, I am running an app with TalkBack on, when I click on button A, the TalkBack will focus on button A, and it will launch a popup window, after I close the popup window, TalkBack will reset the focus to the first view, but how do I make it focus back to button A after I close popup window?
I am developing an app that requires screen pinning and a full window so I hide the navigation bar etc.
When the activity opens and the EditText gains focus the Soft Keyboard will become visible and it will shift the EditText above it -- Great, no problems there.
The issue appears when I dismiss the Soft Keyboard and reopen it by clicking on said EditText, the Soft Keyboard will now hide the EditText.
Any ideas on how I can resolve this? I have tried containing the entire layout inside a ScrollView and the issue is still happening.
Window flags being used:
val flags = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_FULLSCREEN
or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY)
window.decorView.systemUiVisibility = flags
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
Inside my Manifest I use:
android:windowSoftInputMode="stateHidden|adjustResize"
SOLVED.
I managed to resolve this by removing the input type from the EditText.
I managed to solve this by removing the input type from the EditText.
I need to store the user input in an EditText after the user write something and clicks the blue keyboard button (on the bottom right of the keyboard). Instead of the classic check icon I would prefer an arrow icon like the one in the snapchat app in the text field for "normal" messages. Anyone knows how to do that? I guess it depends on the value of the android:inputType attribute in the xml file, but I can't find any values that make the keyboard have that arrow icon.
Already tried setting android:windowSoftInputMode="adjustPan" in the manifest file,
When I tap the bottom (4th one from top) EditText, the soft keyboard partially hides it:
This however does not happen in the Android emulator - the screen pans and I get the focus on the EditText (keyboard still covers a small part of the EditText but it's acceptable I think):
Put your EditText inside the ScrollView and then give property adjustResize, instead of adjustPan, it will automatically adjust your screen and its components.
I have a RelativeLayout with an EditText and a Button in it.
When the keyboard opens, the layout is pushed up to show the EditText above the keyboard, but it's not enough to bring up the Button to prevent it from hiding under the keyboard.
Is it possible to move the layout up more, or somehow prevent it from being under the keyboard?
Thanks
A similar question has been answered here: Android soft keyboard covers edittext field
Ideally you will be able to use windowSoftInputMode to control how your Activity is moved around when the soft keyboard is displayed.