java.lang.Object | |
↳ | com.pdftron.collab.ui.base.component.BaseUIComponent<V extends com.pdftron.collab.ui.base.component.BaseUIView<E extends com.pdftron.collab.ui.base.component.BaseUIEvent>, E, VM extends ViewModel> |
Known Direct Subclasses |
A BaseUIComponent
describes a UI component on the screen, which could be a part of an
activity or fragment (basically anything that is a LifecycleOwner. The main responsibility
of the BaseUIComponent
is to define the business logic of its views and maintain the data
associated with the views.
The data for BaseUIComponent
is contained within a ViewModel object.
Updates to the data can be observed directly by the BaseUIComponent
, or by the caller if
needed (usually a Fragment or an android.app.Activity).
Android views are handled by a BaseUIView
object. The only responsibilities of this object
are to inflate the views and to emit user interaction events to the component.
User interaction is captured through BaseUIEvent
s and these events can be observed
directly by the BaseUIComponent
, or by the caller.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BaseUIComponent(ViewGroup parent, LifecycleOwner lifecycleOwner, VM model, Constructor for creating a UI component.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
final
|
getObservable()
Returns the Observable that emits user events
BaseUIEvent of type E . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructor for creating a UI component.
parent | the ViewGroup to inflate this component's UI |
---|---|
lifecycleOwner | the LifecycleOwner that uses this component |
model | the ViewModel that contains the view state data for this component |
observable | the observable that will be used to emit user UI interfaction events |
Returns the Observable that emits user events BaseUIEvent
of type E
.
This is typically called outside of the component, by Fragments or Activities that would like
to listen to user events.