T - the data modelpublic static final class Autocomplete.Builder<T>
extends java.lang.Object
Autocomplete.
The only mandatory item is a presenter, with(AutocompletePresenter).| Modifier and Type | Method and Description |
|---|---|
Autocomplete<T> |
build()
Builds an Autocomplete instance.
|
Autocomplete.Builder<T> |
with(AutocompleteCallback<T> callback)
Registers the
AutocompleteCallback to be used, responsible for listening to
clicks provided by the presenter, and visibility changes. |
Autocomplete.Builder<T> |
with(AutocompletePolicy policy)
Registers the
AutocompletePolicy to be used, responsible for showing / dismissing
the popup when certain events happen (e.g. |
Autocomplete.Builder<T> |
with(AutocompletePresenter<T> presenter)
Registers the
AutocompletePresenter to be used, responsible for showing
items. |
Autocomplete.Builder<T> |
with(android.graphics.drawable.Drawable backgroundDrawable)
Sets a background drawable for the popup.
|
Autocomplete.Builder<T> |
with(float elevationDp)
Sets elevation for the popup.
|
public Autocomplete.Builder<T> with(AutocompletePresenter<T> presenter)
AutocompletePresenter to be used, responsible for showing
items. See the class for info.presenter - desired presenterpublic Autocomplete.Builder<T> with(AutocompleteCallback<T> callback)
AutocompleteCallback to be used, responsible for listening to
clicks provided by the presenter, and visibility changes.callback - desired callbackpublic Autocomplete.Builder<T> with(AutocompletePolicy policy)
AutocompletePolicy to be used, responsible for showing / dismissing
the popup when certain events happen (e.g. certain characters are typed).policy - desired policypublic Autocomplete.Builder<T> with(android.graphics.drawable.Drawable backgroundDrawable)
backgroundDrawable - drawablepublic Autocomplete.Builder<T> with(float elevationDp)
elevationDp - popup elevation, in DPpublic Autocomplete<T> build()
java.lang.RuntimeException - if either EditText or the presenter are null