why keyboard in Landscape mode appear like this? - android

I have a problem with showing keyboard in landscape mode. My activity contains an EditText where user must type a license number, and a Button ok. It looks like this (image is rotated)
. I put the following code to appear the keyboard when activity starts :
imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,InputMethodManager.HIDE_IMPLICIT_ONLY);
imm.showSoftInput(this.licenseText,InputMethodManager.SHOW_FORCED);
and now my activity starts like this (image is rotated) :
My question is : why it looks like this? If it is in portrait mode, the keyboard appear on the bottom side but not affect the contain of current view. I put the EditText on the top side for this, to appear the keyboard on bottom. Can anyone explain me why this looks like this or if i can change this?

Try setting android:imeOptions="actionDone|flagNoExtractUi".
This sounds like the same issue discussed in Unproportional keyboard on landscape layout Android

The answer which gave by #Frank was right but you can do programmatically by this:
editText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);

Related

Is possible Move Up Layout?

I would like to do it. This is iOS app
The entire screen went up and the keyboard was below the buttons
before displaying the keyboard:
after displaying the keyboard
The option "adjustPan" in adroid manifes not work like it, the buttons below of Edittext hide under keyboard
adjustResize should work for when you want to move the screen up.
https://developer.android.com/training/keyboard-input/visibility.html

Issues with Android Keyboard

Look at this...
This is the main screen of the android app I'm developing. When user touches first EditText, the system keyboard shows like this:
But when user touches second EditText, the keyboard shows like this:
Without that black bar on top of it... Does anyone knows why is this? I'm working with a Samsung Galaxy Nexus... Besides... I noted that the keyboard is displayed on top of GUI... but in another screen of my app the keboard makes the GUI to roll up, like this:
In this last image, on top of the three buttons is a ScrollView, is this the reason for the keyboard make this effect?
Can anybody help me here? I'm stuck!
Thanks!

Android onscreen keyboard without any other keyboard

I've looked at several questions and come across several posts, but i'm not able to figure out how to do this.
The following picture shows you the basic layout :
I've created a custom numpad and put it up on the repo.
Currently, when the app opens, the edit text has the focus but and anything i enter with the keyboard will go into the edittext box. This part of the functionality works fine.
Problem: When i touch the edittext again, system Input Method with its huge keyboard pops up. How do i completely block it from popping up? Or, can i tell the app to use only my keyboard instead of the system one? (Or is the only way to write a custom ime?)
i cannot use NULL type input at the manifest because doing that makes the caret in the edittext disappear and moreover if there are two edit texts, i wouldnt know which has focus.
Any help would be highly appreciated!
You can do a few things:
Programmatically hide it in the whole app:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
Hide it from the view it would be attached to:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(yourEditText.getWindowToken(), 0);
Set the input type of the EditText to 0:
EditText yourEditText=(EditText)findViewById(R.id.editTextConvertValue);
yourEditText.setInputType(0);

Galaxy Nexus' Edit Text not full screen in landscape consistently

In my application, I have a search button which when clicked will make an EditText widget visible, put focus in it, and show the keyboard. When I do this I call this code:
queryTextView.requestFocus();
InputMethodManager imm = Utilities.getInputMethodManagerFromContext(getContext());
imm.showSoftInput(queryTextView, InputMethodManager.SHOW_FORCED);
The first time this shows as I expect it to in landscape:
Once I enter text and hit search, I will hide my EditText and force the keyboard closed. I do this using this code:
InputMethodManager imm = Utilities.getInputMethodManagerFromContext(getContext());
imm.hideSoftInputFromWindow(getWindowToken(), 0);
If I were to hit my button again to make the EdidText visible and show the keyboard again, my screen looks like this (only when using the stock Galaxy Nexus keyboard):
Using another keyboard, such as SwiftKey, I do not get this behavior. What kinds of things can I look for to find out why this soft-keyboard is not filling the screen fully?
EDIT: on second thought, from your screenshots it looks like the keyboard is trying to take up the full screen, so onEvaluateFullscreenMode should be returning true...perhaps the problem is somewhere in onCreateExtractTextView
Not what you're looking for, but if all else fails perhaps you could grap the AOSP keyboard source, walk through it and figure out if/why onEvaluateFullscreenMode is returning, or maybe it isn't being called at all.
Use android:imeOptions="flagNoFullscreen" to achieve that feature.

Unproportional keyboard on landscape layout Android

I am having EditText in my LinearLayout. When i am typing text in portrait mode keyboard displays fine but when i changed to landscape mode , only i can editext box and a button on right side of it, that looking really bad.
Just i want to look the keyboard same in both modes.
How i achieve that??
Problem is: Keyboard is filling the entire screen am not able to see other views in the screen in landscape when i want to type text..
Thanks
In layout at landscape, you can set android:imeOptions="actionDone|flagNoExtractUi" for edittext

Categories

Resources