private void setUpAutoCompleteTextView() {
        String[] completions = getResources().getStringArray(R.array.bodies_of_water);
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(
                this,
                android.R.layout.simple_dropdown_item_1line,
                completions);

        AutoCompleteTextView autoComplete =
                (AutoCompleteTextView) findViewById(R.id.auto_complete_text_view);
        autoComplete.setAdapter(adapter);
    }
Creates an adapter and sets it to an {@link AutoCompleteTextView} to enable suggestions.
ui/espresso/MultiWindowSample/app/src/main/java/com/example/android/testing/espresso/MultiWindowSample/SuggestActivity.java