public abstract class Renderer<T>
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
Renderer() |
| Modifier and Type | Method and Description |
|---|---|
protected T |
getContent() |
protected android.content.Context |
getContext()
Method to access to the current Renderer Context.
|
android.view.View |
getRootView()
Method to access the root view rendered in the Renderer.
|
protected abstract void |
hookListeners(android.view.View rootView)
Set all the listeners to members mapped in setUpView method.
|
protected abstract android.view.View |
inflate(android.view.LayoutInflater inflater,
android.view.ViewGroup parent)
Inflate renderer layout.
|
void |
onCreate(T content,
android.view.LayoutInflater layoutInflater,
android.view.ViewGroup parent)
Method called when the renderer is going to be created.
|
void |
onRecycle(T content)
Method called when the Renderer has been recycled.
|
abstract void |
render()
Method where the presentation logic algorithm have to be declared or implemented.
|
protected void |
setContent(T content)
Configures the content stored in the Renderer.
|
protected abstract void |
setUpView(android.view.View rootView)
Map all the widgets from the rootView to Renderer members.
|
public void onCreate(T content, android.view.LayoutInflater layoutInflater, android.view.ViewGroup parent)
content - to render. If you are using Renderers with RecyclerView widget the content will
be null in this method.layoutInflater - used to inflate the view.parent - used to inflate the view.public void onRecycle(T content)
content - to render.public android.view.View getRootView()
protected android.content.Context getContext()
protected final T getContent()
protected void setContent(T content)
content - associated to the Renderer instance.protected abstract void setUpView(android.view.View rootView)
rootView - inflated using previously.protected abstract void hookListeners(android.view.View rootView)
rootView - inflated using previously.protected abstract android.view.View inflate(android.view.LayoutInflater inflater,
android.view.ViewGroup parent)
inflater - LayoutInflater service to inflate.parent - view group associated to the current Renderer instance.public abstract void render()