I have a popup that has a multi-line edit text and can appear at arbitrary position atop my application. Currently I have implemented it as a transparent activity. When the keyboard is shown over the popup, it jumps up and the current line is shown above the keyboard (I have the adjustPan flag set).
Now, I want the whole popup to go up and show above the keyboard, not only one line of text box. I was able to achieve this by moving focus to the whole layout when the EditText is focused, but then, well, the EditText loses focus, and I cannot type. Is there any other way way to do this? Or is there a way to focus a view without losing focus on another?
Related
I have a horizontal only, full screen activity in my android app. In this activity, I need to disable full screen keyboard in some EditText elements so that the user can see the EditText while typing.
I disabled the full screen keyboard by adding following to EditText xml.
android:imeOptions="flagNoExtractUi"
When I touch the EditText for the fist time to enter text into it, the screen gets pulled up (keyboard comes up from bottom) so that EditText is visible while typing. After entering text and closing the keyboard, while the EditText is still having focus, if I touched it again to do some correction to the text entered, it doesn't get pulled up as it did before (Edit text is covered by keyboard). So I cannot see what is in the text box while typing. I'm not sure whether this is the default behavior since user has no idea what he is typing in this situation.
Is there a some way to get the screen to always pull up so it is visible?
use edittext in ScrollView and android:fillViewport="true" on the ScrollView. That's the better solution.
I have an expandable list view and each of its child contains edit texts. When i tap on any edit text which is at the bottom of the screen, the edit text is coming above the keyboard. Once I start typing the edit text goes back to its original position (at the bottom of the screen). The focus still remains in the field but I am not able to see what I am typing.
Also when adjustResize is used, the edit text loss its focus when it comes above keyboard.
I have an application, where I have a list view, and list view is made upon custom adapter. I have made a suggestive search on list view. My problem is that, when I am about to type something in edit text search pan; then soft keyboard pop up gets full length by width and height in the screen, so I have no option to see whether my list view is getting changed on text change in edit text. I am being enable to see search result until I press done button in soft keyboard. I want soft keyboard pop up just pops up half the screen of my application so that I can see my listview data changes on text change given in edit text. Is there any solution related to my issue???
Add to your EditText the attribute android:imeOptions="flagNoExtractUi". This will prevent the soft keyboard to take full-screen size.
Check this answer: Disabling the fullscreen editing view for soft keyboard input in landscape?
In my app,I have an edittext and a PopupWindow.
I want to show the popup once the user starts editing the text. but when I show the popup, it graps the focus from the edittext, and the virtual keyboard is dismissed (and I want it shown).
I tried creating the popup as not focusable, but then I can't select it after it's shown.
I also tried changing the focus and selection attributes of both edittext and from code after and before the popup is shown, but if the popup is created as not focusable, I can't select it after it's shown.
Is there a way of displaying a selectable popup along with editing the edittext?
You could try going in other direction. you have to control the input method editor (IME). every editable has an appropriate IME (also edittext has). You can control the IME - for example to be shown all the time not regarding to the state of edittext and dismiss it when you click on something or something happen.
You can ovveride the default editext implementation or you can control the IME at the viewgroup container/activity level.
http://developer.android.com/resources/articles/on-screen-inputs.html (read the APIs for controlling IMEs at the end).
hope this will help.
whenever I click on the EditText, the screen readjusts and the edittext-view moves up. But this is not enough and the soft-keyboard still covers the view to not show what a user typing.
My layout is as follows:
A listview occupying 65% of screen height, followed by an editetxt view and a button
LISTVIEW
______________________________
EDITTEXT |BUTTON
______________________________
My activity has the following flag set android:windowSoftInputMode="stateAlwaysHidden|adjustPan"
adjustPan forces the soft keyboard to appear on top of your layout, blocking anything at the bottom. You're going to want to use adjust resize instead, which will move up your EditText and Button, and shrink the ListView. If, in landscape mode, the ListView is shrunk to the point of being unusable/pointless, consider using a fullscreen IME keyboard.
Read about something like that just recently. Is this what you are looking for?
http://www.vogella.de/blog/2010/10/25/android-windowsoftinputmode/