SearchHeader.Builder
class SearchHeader.Builder
A builder of SearchHeader.
Summary
Public constructors |
|---|
Builder(callback: SearchCallback)Creates a new |
Public functions |
|
|---|---|
SearchHeader |
build()Constructs the |
SearchHeader.Builder |
@CanIgnoreReturnValueAdds an |
SearchHeader.Builder |
@CanIgnoreReturnValueSets the initial search text to display in the search box. |
SearchHeader.Builder |
@CanIgnoreReturnValueSets the text hint to display in the search box when it is empty. |
SearchHeader.Builder |
@CanIgnoreReturnValueSets whether the keyboard should be displayed by default. |
SearchHeader.Builder |
@CanIgnoreReturnValueSets the start header |
Public constructors
Builder
Builder(callback: SearchCallback)
Creates a new Builder with provided search callback SearchCallback.
| Parameters | |
|---|---|
callback: SearchCallback |
the callback to be invoked for search events |
| Throws | |
|---|---|
java.lang.NullPointerException |
if |
Public functions
setEndHeaderActions
@CanIgnoreReturnValue
fun setEndHeaderActions(endHeaderActions: (Mutable)List<Action!>): SearchHeader.Builder
Adds an Action to be displayed at the end of the header.
| Throws | |
|---|---|
java.lang.NullPointerException |
if |
setInitialSearchText
@CanIgnoreReturnValue
fun setInitialSearchText(initialSearchText: String): SearchHeader.Builder
Sets the initial search text to display in the search box.
| Throws | |
|---|---|
java.lang.NullPointerException |
if |
setSearchHint
@CanIgnoreReturnValue
fun setSearchHint(searchHint: String): SearchHeader.Builder
Sets the text hint to display in the search box when it is empty.
| Throws | |
|---|---|
java.lang.NullPointerException |
if |
setShowKeyboardByDefault
@CanIgnoreReturnValue
fun setShowKeyboardByDefault(showKeyboardByDefault: Boolean): SearchHeader.Builder
Sets whether the keyboard should be displayed by default. Defaults to true.
setStartHeaderAction
@CanIgnoreReturnValue
fun setStartHeaderAction(headerAction: Action): SearchHeader.Builder
Sets the start header Action.
| Throws | |
|---|---|
java.lang.NullPointerException |
if |
java.lang.IllegalArgumentException |
if |