This question already has answers here:
Disabling the fullscreen editing view for soft keyboard input in landscape?
(11 answers)
Closed 9 years ago.
When I open they soft keyboard in my app while in landscape mode, the keyboard covers my entire app. The only thing that is shown is the keyboard and a space at the top to enter text. Keyboard is appearing correct in portrait mode.
Basically its not a bug of your application. Its how your keyboard IME is designed. When user goes to landscape mode, it'll take up the whole screen.
You may install some third party IME from play store and see how it works in portrait mode.
As per the link given by MCeley below. You can do something as below
#Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;
}
or change your manifest for your activity as below
android:imeOptions="flagNoExtractUi"
Read here for more discussion
Related
This question already has answers here:
Disabling the fullscreen editing view for soft keyboard input in landscape?
(11 answers)
Closed 4 years ago.
I have a requirement to show a keyboard input in an app I'm making, but the "top" part of the soft keyboard needs to be hidden. I say "top" part, I'm sure it has a name but I haven't been able to find it. Instead, I've drawn a diagram showing you which part of the soft keyboard I want to hide (the part enclosed in the red rectangle):
Is this possible? If so, could someone point me to the official docs that explain it because I've been unable to find any (probably because I don't know the name for the "top" part).
Looks like you are talking about the full-screen editing view (landscape mode).
Try to add
android:imeOptions="flagNoExtractUi|flagNoFullscreen"
in the edit text
I have an app that uses LOW_PROFILE_MODE to hide soft buttons.
It works quite ok, but when I select a TextView and the software keyboard appears on the screen, the LOW_PROFILE_MODE is gone.
Is there a way to use android soft keyboard and stay in LOW_PROFILE_MODE on Android 5+?
I have a Android Keyboard like a SoftKeyboard and I want to fix the screen in portrait orientation when the keyboard is activated, so, use the keyboard with the editTExt of the app just in portrait (I have just the keyboard, no the app).
Using the method shown in this thread - How to check visibility of software keyboard in Android?
I am able to detect keyboard hide when in portrait mode or in landscape mode where the keyboard is not in fullscreen. If keyboard in landscape mode is fullscreen then, the layout changes are not triggered and hence i cannot detect it in the OnGlobalLayoutListener !
Please help me with this? Is there no simple way to detect keyboard hide?
NOTE: I cannot afford to change anything in the manifest file. It should all be done through code dynamically!
Thanks!
I'm having a small user experience issue in my app;
When changing from landscape to portrait (or portrait to landscape) with the Soft Keyboard open, the keyboard hides.
What I want to do is to stop the keyboard hiding on orientation change.
(Edit - I don't want to force the keyboard open, if the keyboard was hidden before the orientation change, I want it to stay hidden - I want to retain the keyboards open/closed state).
I've looked around for an answer and it seems adding stateUnchanged to the windowSoftInputMode options in the manifest for the Activity is the correct way to solve this (as described in the android documentation:
android:windowSoftInputMode="stateUnchanged|adjustResize"
The problem is this seems to have absolutely no effect.
Does anybody know of any caveats to this functionality? Does it perhaps not work if the EditText which is focused is in a Fragment?
Add this to your code and it will work :
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);