AutoCompleteTextView's Suggest List overlapping with soft keyboard android - android

I have a AutocompleteTextView. Suggests List will appear on typing 3 characters.Suggest list size to be be fixed i.e. 8 . Every thing is working fine except the suggest list getting overlapped with soft keyboard.
I am attaching the screen shots for the same
What should be done, suggestions please.
Thanks in advance.

Try setting android:dropDownHeight

Related

Keyboard blinks when AutoCompleteTextView dropdown is shown

I'm using AutoCompleteTextView inside DialogFragment. When it shows a dropdown list, keyboard hides and shows again very fast, it looks like a blink.
As possible solution, I found that it happens because of
AutoCompleteTextView {
showDropDown(){
mPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_NEEDED);
}
}
So overriding showDropDown() in this way removes blink
showDropDown(){
super.showDropDown()
mPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_FROM_FOCUSABLE)
mPopup.show()
}
But it shows dropdown above keyboard and blocks user input. Maybe someone knows better solution?
You're not going to believe this, but I am pretty sure the December 5 patch to android Q fixed this problem. I got the update this morning, and I was hoping since it was a relatively new issue that they might have addressed it. Turns out they did! I get no more flashing keyboard when using the AutocompleteTextView.

keyboard showing lately when i press edittext and also take time when i press the back button

When I edit text it takes some time to appear the keyboard, in my layout list view is there, without list view its coming quickly, with list view its taking time to appear. If I give give list view size manually it is working correctly.
thanks in advance guys
I tried with adjust span and all but still I am getting the same problem and also get the height of the keyboard and all but here also the same problem
You are testing your application on Emulator, Please run your project on Android Phone so the problem you are facing will not be there.

Android : autocompletetextview, suggestion list displays above the textview?

did one of you ever run into that problem ?
With some high resolutions screen it displays correctly :
but the low resolutions it's not displaying correctly are not so low, for example, in galaxy spica (320x480px). I would like the keyboard to be brought behind the suggestions list when this one gets the focus from the user who's trying to scroll on it with one long click..
I' ve tried : android:windowSoftInputMode="stateHidden|adjustPan" in the activity manifest.xml and all other combinations. still, it's not working...
I tried to change the text size, the items size, the padding, the max height of the whole autocompletetextview, the max height of dropdownlist, tried a MultiAutoCompleteTextView, even tried to nest it in a scrollview, nothing.
it occurs because of the keyboard which "pushes" the list items above the textview so without the keyboard everything would be nice..
any help would be much appreciated...
Just add android:dropDownHeight="100dp" to the AutoCompleteTextView tag in your layout file,
#Override
public void onFilterComplete(int count) {
setDropDownHeight((count > DROPDOWN_LIST_COUNT ? DROPDOWN_LIST_COUNT : count) * getHeight()
+ DROPDOWN_LIST_BORDER);
super.onFilterComplete(count);
}
I've encountered the same problem and tried the code above. It makes sure dropdownlist shows DROPDOWN_LIST_COUNT items.
You can try this method:
autoCompleteTextView.setDropDownVerticalOffset();
There was more screen space above the AutocompleteTextView than below, so the list opened upwards. You may adjust your layout to make sure there's more screen space(exclude the pop up keyboard)below the AutocompleteTextView. This issue seems has been fixed from ICS.

AutoCompleteTextView suggestion results sticking to screen when they shouldn't

my AutoCompleteTextView is created with a custom adapter to show suggestions for ~3000 Strings. while typing in the input view, suggestions are coming up as expected, except that sometimes a chunk of the dropdown view with suggestions is being clipped or looks like its detached from the AutoCompleteTextView. this extra chunk of the dropdown apears to be holding previous suggestions that are no longer relevent. upon clicking a suggestion or typing more letters - the "stuck" dropdown piece disapears.
edit: i find that once the AutoCompleteTextView is only showing one suggestion after showing more than one, the problem occurs
Why is this happening? How can i fix it?
Right now i am trying a few things(none of which are working):
-adding a TextWatcher on the AutoCompleteTextView and invalidating the AutoCompleteTextView in the onTextChanged method.
-getWindow().getDecorView().invalidate(); on the Activity containing this AutoCompleteTextView in the onTextChanged method
edit: this is only happening on the samsung galaxy s phone running 2.1 sdk version 7

android autocompletetextview hint results hidden under keyboard

I have 3 autocompletetextview's in which i set its adapter to be an ArrayAdapter<String> with a very simple textview layout.
The autocompletextview hint results are showing, but are under the onscreen keyboard(i can see part of it). how can i make the results show above the autocompletetextview rather than below?
airline = (AutoCompleteTextView)findViewById(R.id.airline);
airline.setAdapter(new ArrayAdapter<String>(this, R.layout.autcomplete_dropdown, AIRLINES_AUTOCOMPLETE_ARRAY));
departLocation = (AutoCompleteTextView)findViewById(R.id.departLocation);
departLocation.setAdapter(new ArrayAdapter<String>(this, R.layout.autcomplete_dropdown, LOCATIONS_AUTOCOMPLETE_ARRAY));
arriveLocation = (AutoCompleteTextView)findViewById(R.id.arriveLocation);
arriveLocation.setAdapter(new ArrayAdapter<String>(this, R.layout.autcomplete_dropdown, LOCATIONS_AUTOCOMPLETE_ARRAY));
Simply limit the drop-down height.
android:dropDownHeight="200dp"
Then results don't hide by the soft keyboard.
Or else do this
The theory says that android:windowSoftInputMode="adjustPan|adjustResize" should do this but for some reason, it doesn't, so you have to do the same programmatically:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
Use a ScrollView for the layout where your Autocomplete resides and Voila!
Does your Activity adjustResize?
android:windowSoftInputMode="adjustPan|adjustResize"
reference: Move layouts up when soft keyboard is shown?
you should look here : Creating an input method
Composing text before committing
If your IME does text prediction or requires multiple steps to compose a glyph or word, you can show the progress in the text field until the user commits the word, and then you can replace the partial composition with the completed text. You may give special treatment to the text by adding a "span" to it when you pass it to InputConnection#setComposingText().
this way, suggestions will apears on soft keyboard prediction like auto-correction. An other way of doing it will be a fullScreen IME... with ExctractEditText : See this link...
This is what i usualy have seen in other apps... i don't think the autocompletetextview can be inverted and appears on top of the view, but what's strange is that it usually shows on top of the keyboard not bellow...
I had the same problem with this a little while ago. You Can try manipulating the z-index of the elements that are being hidden to force it to the top which would be your views in this case. Hope it works for you !
another quick solution is by using the attribute "android:dropDownAnchor"
to anchor the dropdown to some other view on top of screen
Add an attribute in your AndroidManifest.xml
android:windowSoftInputMode="adjustPan|adjustResize"
Which will auto resize and adjust the soft keyboard.
Use
android:windowSoftInputMode="adjustPan|adjustResize"
If none of the above solutions worked. try this
android:dropDownHeight="match_parent"
If we didn't mention the dropdown height, it would be considered wrap_content. Therefore the item will show behind the soft keyboard.
Take the autocomplete textviews in respective layouts then you see they opens their values in it only (ABOVE), set autocomplete texview (bottom) of each layouts, as per your question you required three child layouts.
it is really working

Categories

Resources