Can anyone tell me how I can show suggestions for a "Multi-Line" MultiAutoCompleteTextView. I went to the API link here .
I tried this example and Autocomplete worked just fine, only when I go to the next line, I no longer see the sentences.
I have an xml that defines my MultiAutoCompleteTextView like this:
<?xml version="1.0" encoding="utf-8"?> <MultiAutoCompleteTextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/html" android:focusable="true" android:gravity="top" android:background="@null" android:paddingLeft="5dp" android:paddingRight="5dp" android:paddingBottom="5dp" android:singleLine="false" android:completionThreshold="1" android:textSize="14dp" android:scrollHorizontally="true" android:focusableInTouchMode="true" />
My code that makes suggestions looks like this: (Got it from the link)
MultiAutoCompleteTextView editor = (MultiAutoCompleteTextView) LayoutInflater.from(getApplicationContext()).inflate(R.layout.editor, null); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, COUNTRIES); editor.setAdapter(adapter); editor.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
Since I set singleLine to false in my MultiAutoCompleteTextView xml. Suggestions are not displayed when I press the enter key to go to the next line.
Can anyone help me on this. Is there a way I can override the suggestion bar to my liking? Also there is a way to place the panel?
source share