Android Guides | Samples

Android.Widget.MultiAutoCompleteTextView Class

An editable text view, extending AutoCompleteTextView, that can show completion suggestions for the substring of the text where the user is typing instead of necessarily for the entire thing.

See Also: MultiAutoCompleteTextView

Syntax

[Android.Runtime.Register("android/widget/MultiAutoCompleteTextView", DoNotGenerateAcw=true)]
public class MultiAutoCompleteTextView : AutoCompleteTextView

Remarks

An editable text view, extending AutoCompleteTextView, that can show completion suggestions for the substring of the text where the user is typing instead of necessarily for the entire thing.

You must provide a NoType:android/widget/MultiAutoCompleteTextView$Tokenizer;Href=../../../reference/android/widget/MultiAutoCompleteTextView.Tokenizer.html to distinguish the various substrings.

java Example

 public class CountriesActivity extends Activity {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.autocomplete_7);

         ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                 android.R.layout.simple_dropdown_item_1line, COUNTRIES);
         MultiAutoCompleteTextView textView = (MultiAutoCompleteTextView) findViewById(R.id.edit);
         textView.setAdapter(adapter);
         textView.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
     }

     private static final String[] COUNTRIES = new String[] {
         "Belgium", "France", "Italy", "Germany", "Spain"
     };
 }

The following code snippet shows how to create a text view which suggests various countries names while the user is typing:

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Widget.MultiAutoCompleteTextView are listed below.

See Also: AutoCompleteTextView

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

SetTokenizer(MultiAutoCompleteTextView+ITokenizer)
Sets the Tokenizer that will be used to determine the relevant range of the text where the user is typing.

Protected Methods