Soft keyboard hides EditText - java

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.

Related

Android Soft Keyboard hiding EditText when reopened

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.

Android Scrollview gets overlapped by a view and keyboard

I have searched the web for about 2 hours and no solution, now I will try it here.
My problem is that when I open the keyboard the scrollview gets overlapped by a view and the keyboard. I want to see the bottom elements of the scrollview.
Here are the screenshots: screenshot1, screenshot2.
The scrollview doesn't respond to adjustReize like other views do, the solution (like other people have done e.g. Why doesn't android:windowSoftInputMode="stateVisible|adjustResize" adjust the screen when soft keyboard is shown?) will simply listen to the view's hierarchy and scroll to the bottom when the keyboard is shown

Prevent Keyboard layout hiding toolbar but reveal scroll content

Best description for my issue was at
Keyboard layout hiding android action bar?
And I will paste-quote here:
"I have this problem also but the difference is, i have a list above my edittext and can't use a scrolling container. If I use adjustResize when the edittext is focused it appears above the list and the last items from the list get obscured (list is not pushed up). If I don't use adjustResize on the other hand, when the edittext is focused it pushes everything up but the acionbar is hidden and also I cannot scroll to the top of the list. Can someone share a solution for this? "
So
I have a toolbar
then a chat content
and then a bottom bar for sending a message (editText and a button)
Now, when I tap on an ediText, and soft keyb opens up, I do NOT want my toolbar to collapse and hide, but I do want my chat content to scroll up, so above the bottom entry I will see the last messages from chat content (in listView).
I've tried a number of combinations for Activity adjustResize or adjustPan, but none of them was working. Even wrapped toolbar in CoordinatorLayout and AppBarLayout, but still, no results. Either my content gets pushed/scrolled correctly but toolbar hides OR toolbar stays but softKeyboard overlaps last couple of messages.
The solution I share is a workaround. I had implemented a function scroll(), to scroll my content if a new message arrives, so that was one function I implemented before. I was missing the other part and that is, detect when a softKeyboard was open so I can scroll my content.
That was easy to find here on
How to check visibility of software keyboard in Android?
I hope someone will find this workaround useful and sleep at least a couple more hours.
Note:
Animation of sliding content up is not consistent with softKeyboard sliding up. After keyboard is opened, then I do scroll, which is not in-sync. It is just a snap. But I don't care about that until I find a better solution for orchestrating this event using a native Android component or layout.
The easiest and best solution to all of the above is to simply use the following:
listView.setTranscriptMode(ListView.TRANSCRIPT_MODE_NORMAL);

Arrow icon in the keyboard like snapchat app - Android 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.

Push layout further when soft keyboard opens

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.

Categories