I'm using MultiautoCompleteTextView
. it works perfect. strange problem though that some devices do not show keyboard suggestions:
Using Nexus 5
Using galaxy s6
Some Code
<MultiAutoCompleteTextView
android:id="@+id/fragment_write_text_editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/text_editor_margin_top"
android:gravity="start|top"
android:hint="@string/enter_text"
android:imeOptions="normal"
android:inputType="textCapSentences|textMultiLine|textAutoComplete"
android:maxLength="1200"
android:backgroundTint="@color/primary"
android:textSize="16sp"/>
public void setupEditorBox (View view) {
mEditTextBox = (MultiAutoCompleteTextView) view.findViewById(R.id.fragment_write_text_editText);
mEditTextBox.setThreshold(1);
mEditTextBox.setTokenizer(new HashTagTokenizer());
mEditTextBox.setAdapter(new HashTagAutocompleteAdapter(getActivity(), R.layout.auto_complete_tag_item));
mEditTextBox.setOnItemClickListener(this);
}
In Nexus Devices you can fix it setting the InputType.
mEditTextBox.setInputType(InputType.TYPE_CLASS_TEXT);
At least with a simple ArrayAdapter and the MultiAutoCompleteTextView.CommaTokenizer, setting the InputType fix this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With