Example usage for android.widget MultiAutoCompleteTextView showDropDown

List of usage examples for android.widget MultiAutoCompleteTextView showDropDown

Introduction

In this page you can find the example usage for android.widget MultiAutoCompleteTextView showDropDown.

Prototype

public void showDropDown() 

Source Link

Document

Displays the drop down on screen.

Usage

From source file:TIG055st2014.mailmaster.Activities.ComposeActivity.java

/**
 * Function used to configure the various MultiAutoCompleteTextViews (the autocomplete suggestions list that shows up when
 * writing in the to/cc/bcc fields).//  w w w . j av  a 2 s  .com
 */
private void setupAC(final MultiAutoCompleteTextView ma, ArrayAdapter<String> adapter) {
    ma.setAdapter(adapter);
    ma.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
    //How many letters needed to start showing suggestions.
    ma.setThreshold(0);
    ma.setOnTouchListener(new View.OnTouchListener() {
        //Making sure suggestions are shown directly.
        @Override
        public boolean onTouch(View v, MotionEvent event) {
            ma.showDropDown();
            return false;
        }
    });
    ma.setOnItemSelectedListener(this);
}