MultiautoCompleteTextView ime keyabord not showing suggestions

I am using MultiautoCompleteTextView . It works great. strange problem, although some devices do not show keyboard suggestions:

Using Nexus 5 Using nexus 5

Using Galaxy S6 Using galaxy s6

Some codes

 <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); } 
+6
source share
1 answer

On Nexus devices, you can fix the installation of InputType.

 mEditTextBox.setInputType(InputType.TYPE_CLASS_TEXT); 

At least with a simple ArrayAdapter and MultiAutoCompleteTextView.CommaTokenizer, setting InputType will fix this problem.

+2
source

Source: https://habr.com/ru/post/989477/


All Articles