Android autoCompleteTextView changes with screensize? -



Android autoCompleteTextView changes with screensize? -

hello fellow android developpers,

i have problem regarding autocompletetextview. i'm developping on tablet, , customized nicely. when run on tablet, looks this:

this want - visible, little items, bluish instead of orange. cool. , happens when run exact same app on smaller device, illustration nexus-s:

the original views disappear, have orange stuff, , see 1 suggested item @ time or 2 @ best. not intended.

if run app not in landscape, in portrait, works fine. insane. know can maintain custom layout on smaller screen?

the sec image shown here result of auto finish text view or edit text when device in landscape mode.

if device in portrait mode display suggestions in vertical list, , landscape mode display in horizontal list , tries fill entire screen edit text , soft keyboard.

i faced same problem, please check android developers website info supporting multiple screens, may help you.

new answer

to hide soft keyboard when press done button have utilize imeoptions autocompletetextview. these changes code , seek it.

changes xml layout file below

<autocompletetextview android:layout_width="fill_parent" android:layout_height="wrap_content" android:imeoptions="actiondone" android:id="@+id/actv" />

in java file

actv = (autocompletetextview)findviewbyid(r.id.actv); actv.setoneditoractionlistener(new oneditoractionlistener() { @override public boolean oneditoraction(textview v, int actionid, keyevent event) { if (actionid == editorinfo.ime_action_done) { inputmethodmanager imm = (inputmethodmanager)v.getcontext().getsystemservice(context.input_method_service); imm.hidesoftinputfromwindow(v.getwindowtoken(), 0); homecoming true; } homecoming false; } });

i hope may help you.

android autocompletetextview

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -