For an InputMethodService in landscape Android automatically presents a text box that shows the text entered via the soft keys. How is it possible to get that text box height, so I can calculate the available screen height in landscape?
Thanks!
Found it!
It works the other way around: I can use whatever portion of the screen height I want, then Android occupies the remaining space with the text box.
Related
I have editText on the top screen and some button on bottom of screen, so I need to make it so and edit text and button will visible when keyboard appears. I've tried to use android:windowSoftInputMode, but I still can see just part of button. How to move keyboard on certain px or dp value or bind it to certain view element?
Have you tried this?
android:windowSoftInputMode="adjustPan|adjustResize"
I have searched and searched and there I can't find a suitable and working answer for how to get the default keyboard height on Android when you are not resizing the view.
My activity needs to have this:
android:windowSoftInputMode="adjustNothing"
So how do I know the height of the keyboard when it is displaying?
In fact there's no way to do this, and there's no 'default height' kinda value. One idea is that when showing keyboars at first time, measure your apps resized height value, and try compare this height with normal status value. Try save this value and use them.
I'm trying to design a layout similar to LinkedIn screen for sharing an update.
When you enter the screen for the first time the layout is split something like this:
half the screen is an edittext
half the screen is a gallery of images with a bar above the gallery
Now when I click the edittext - the keyboard comes up and it's just as high as the gallery, leaving the bar with the camera icon visible.
How did they design this layout so that the keyboard height is kinda the same as the gallery height?
In fact every keyboard can have different height, so to achieve this you should resize your activity to fit current 'height' when keyboard is shown status.
Tricky part is, android doesn't provides you that current status is keyboard shown status or not, so you should manage this status smart(One tip can be comparing curent height or height/width ratio to check it's resized or not by keyboard.
First, it's not a simple question like this quest or this quest.
I have to get soft keyboard height in my project. I used to get device screen height and subtraction it by out app root view height. However, it work correctly until my test using keyboard suggestion. Unfortunately for me, my solution did not right in this case. The number I got alway bigger than the soft keyboard height. I tried to google but fail.
Here's my picture:
I have am developing an android app for V2.2 onwards.
The app is for numeric data input for the elderly
To keep things nice and simple, I am using the phone style input method. This also has the advantage of using nice big keys for them.
In landscape mode, I would like to move the virtual keyboard and position it on the right hand side of the view. The content itself has much more height than width and it would be perfect to have the screen split down the middle horizontally with the content on the left and the virtual keyboard on the right.
Does anyone know if this is possible?
Thanks