Example usage for android.widget AutoCompleteTextView getThreshold

List of usage examples for android.widget AutoCompleteTextView getThreshold

Introduction

In this page you can find the example usage for android.widget AutoCompleteTextView getThreshold.

Prototype

public int getThreshold() 

Source Link

Document

Returns the number of characters the user must type before the drop down list is shown.

Usage

From source file:com.amsterdam.marktbureau.makkelijkemarkt.DagvergunningFragmentKoopman.java

/**
 * Show the autocomplete dropdown or a notice when the entered text is smaller then the threshold
 * @param view autocomplete textview/*from w  w w  . j a v a2  s  .co m*/
 */
private void showDropdown(AutoCompleteTextView view) {
    if (view.getText() != null && !view.getText().toString().trim().equals("")
            && view.getText().toString().length() >= view.getThreshold()) {
        view.showDropDown();
    } else {
        Utility.showToast(getContext(), mToast, getString(R.string.notice_autocomplete_minimum));
    }
}