looks like i found a solution:
_textfield.setOnEditorActionListener(new OnEditorActionListener
() {
public boolean onEditorAction(TextView v, int actionId,
KeyEvent event)
{
_textfield.dismissDropDown();
return false;
}
thanks,
/ eitan
On Jun 11, 12:52 pm, eitan <[email protected]> wrote:
> hello,
>
> i am working on an app that's defined with orientation="landscape".
> the main activity has a dialog that contains a text field defined
> like this:
>
> <AutoCompleteTextView android:id="@+id/name_text"
> android:completionThreshold="2"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:layout_marginLeft="5px"
> android:inputType="textPersonName|textCapWords"
> android:imeOptions="actionDone"
> />
>
> i have two problems:
>
> 1. when i use the soft keyboard to enter text into that field,
> the screen morphs to soft keyboard mode, where all i
> can see is a text area for entry and the keyboard.
> this puzzles me a little because the field is defined as
> single line. it looks like too much space (a text area perhaps
> two lines tall) is allocated for it. this is really minor / i can
> live with this.
>
> 2. i see that autocomplete is integrated into the text entry/soft
> keyboard.
> that's very nice. i enter a couple of characters, pick the first
> suggestion,
> and touch "Done"
>
> the problem i have is that once the keyboard entry mode ends and the
> dialog view re-appears, the autocomplete drop down is still showing,
> even though it has only one matching entry that matches precisely
> the
> text that i've already entered and autocompleted (in keyboard mode).
>
> the other issue i see, which is more severe, is that if i try to
> dismiss the dropdown by touching the [already-entered] matching
> entry (in the dropdown), then a side effect occurs: a thin grey bar
> appears (slides up)
> at the bottom of the screen; it looks like some sort of empty
> activity
> menu. i have to dismiss it by pressing the back button.
>
> ideally the behavior i seek is that when i'm done editing in soft
> keyboard mode, the autocomplete dropdown should no longer be
> displaying. is there a way to programmatically dismiss it
> when the entry mode ends? or is there some magic option like
> android:imeoptions="autocompleteproperly" ? :-)
>
> thanks,
> / eitan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---