PresenterSwitcher
abstract class PresenterSwitcher
HorizontalHoverCardSwitcher |
A helper class for showing a hover card view below a |
An abstract helper class that switches a view in its parent view using a PresenterSelector. A subclass should implement insertView to define how to add the view in parent, and may optionally override onViewSelected.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Unit |
clear()Destroys created views. |
ViewGroup! |
Returns the parent. |
Unit |
init(parent: ViewGroup!, presenterSelector: PresenterSelector!)Initializes the switcher with a parent view to insert view into and a |
Unit |
Selects a view based on the given object and shows that view. |
Unit |
unselect()Hides the view. |
Protected functions |
|
|---|---|
abstract Unit |
insertView(view: View!) |
Unit |
onViewSelected(view: View!)Called when a view is bound to the object of |
Unit |
Public constructors
Public functions
init
fun init(parent: ViewGroup!, presenterSelector: PresenterSelector!): Unit
Initializes the switcher with a parent view to insert view into and a PresenterSelector for choosing a Presenter for a given object. This will destroy any existing views.
Protected functions
onViewSelected
protected fun onViewSelected(view: View!): Unit
Called when a view is bound to the object of select.